Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix (CI): Fix frontend build in deployment to tst & acc #1007

Merged
merged 8 commits into from May 15, 2024

Conversation

drikusroor
Copy link
Contributor

@drikusroor drikusroor commented May 8, 2024

This PR adds more environment variables to the Podman ci/cd and adds those environment variables to the .env file that's used during the frontend build too. It's not the prettiest solution, but for now I couldn't find any other way to include the environment variables into the frontend build process with just using Docker.

@drikusroor drikusroor self-assigned this May 8, 2024
@drikusroor drikusroor added the Infrastructure Relates to deployment or testing label May 8, 2024
@drikusroor drikusroor marked this pull request as ready for review May 8, 2024 12:32
@drikusroor drikusroor changed the title Draft: Fix (CI): Fix frontend build in deployment to tst & acc Fix (CI): Fix frontend build in deployment to tst & acc May 8, 2024
… files so Sentry knows which environment it is running on (#972)
The `if` conditions in the `podman.yml` workflow file have been updated to include additional checks for the `workflow_dispatch` event. This ensures that the workflow is triggered correctly for the workflow dispatch button in combination with either the `develop` or the `main` branch.
…ailing due to missing environment variables

This commit updates the `podman.yml` workflow file to include additional variables related to the frontend HTML. These variables are used for the favicon, logo URL, Open Graph (OG) description, OG image, OG title, OG URL, and body class. The variables are set to empty strings if not provided. This change ensures that the workflow has the necessary variables for the frontend HTML.
…ironment variables

This commit updates the `podman.yml` workflow file to include additional variables related to the frontend HTML. These variables are used for the favicon, logo URL, Open Graph (OG) description, OG image, OG title, OG URL, and body class. The variables are set to empty strings if not provided. This change ensures that the workflow has the necessary variables for the frontend HTML.
@drikusroor drikusroor merged commit 257b3a7 into develop May 15, 2024
10 checks passed
@drikusroor drikusroor deleted the ci/fix-acc-deploy branch May 15, 2024 13:30
drikusroor added a commit that referenced this pull request May 15, 2024
* config: Set SENTRY_ENVIRONMENT to "test" and "acceptance" in relevant files so Sentry knows which environment it is running on (#972)

* ci: Update podman.yml workflow conditions

The `if` conditions in the `podman.yml` workflow file have been updated to include additional checks for the `workflow_dispatch` event. This ensures that the workflow is triggered correctly for the workflow dispatch button in combination with either the `develop` or the `main` branch.

* chore: Update podman.yml workflow variables to avoid the vite build failing due to missing environment variables

This commit updates the `podman.yml` workflow file to include additional variables related to the frontend HTML. These variables are used for the favicon, logo URL, Open Graph (OG) description, OG image, OG title, OG URL, and body class. The variables are set to empty strings if not provided. This change ensures that the workflow has the necessary variables for the frontend HTML.

* ci: Temporarily turn on deploy for acceptance on this branch

* chore: Try if manually setting the favicon fixes things

* ci: Update podman.yml workflow variables to include frontend HTML environment variables

This commit updates the `podman.yml` workflow file to include additional variables related to the frontend HTML. These variables are used for the favicon, logo URL, Open Graph (OG) description, OG image, OG title, OG URL, and body class. The variables are set to empty strings if not provided. This change ensures that the workflow has the necessary variables for the frontend HTML.

* ci: Test deploy to test environment

* chore: Update podman.yml workflow conditions for develop branch

(cherry picked from commit 257b3a7)
drikusroor added a commit that referenced this pull request May 21, 2024
* Fix (CI): Fix frontend build in deployment to tst & acc (#1007)

* config: Set SENTRY_ENVIRONMENT to "test" and "acceptance" in relevant files so Sentry knows which environment it is running on (#972)

* ci: Update podman.yml workflow conditions

The `if` conditions in the `podman.yml` workflow file have been updated to include additional checks for the `workflow_dispatch` event. This ensures that the workflow is triggered correctly for the workflow dispatch button in combination with either the `develop` or the `main` branch.

* chore: Update podman.yml workflow variables to avoid the vite build failing due to missing environment variables

This commit updates the `podman.yml` workflow file to include additional variables related to the frontend HTML. These variables are used for the favicon, logo URL, Open Graph (OG) description, OG image, OG title, OG URL, and body class. The variables are set to empty strings if not provided. This change ensures that the workflow has the necessary variables for the frontend HTML.

* ci: Temporarily turn on deploy for acceptance on this branch

* chore: Try if manually setting the favicon fixes things

* ci: Update podman.yml workflow variables to include frontend HTML environment variables

This commit updates the `podman.yml` workflow file to include additional variables related to the frontend HTML. These variables are used for the favicon, logo URL, Open Graph (OG) description, OG image, OG title, OG URL, and body class. The variables are set to empty strings if not provided. This change ensures that the workflow has the necessary variables for the frontend HTML.

* ci: Test deploy to test environment

* chore: Update podman.yml workflow conditions for develop branch

(cherry picked from commit 257b3a7)

* chore: Update podman.yml workflow conditions for acceptance deployment

* fix: Preload audio without MEDIA_ROOT

* revert: Do not automatically deploy this PR's commits to acceptance anymore as I (Drikus) have confirmed that Acceptance works again

* revert: Revert fix as I will address it in a separate PR
drikusroor added a commit that referenced this pull request May 27, 2024
* feat: introduce Header component

* add HeaderConfig model in backend

* Rename cards for result output

* Log boardposition in results

* Log response interval in result

* fix for test 'updates score after a match'

* Fix test for renaming cards in results

* feat: add extra view for theme, request and set from ExperimentCollection

* frontend changes to display header

* Refactor: Componentify participant condition, loader container, and cleanup several imports (#917)

* fix: Pass participant id to get experiment collection

* fix(lint): Fix formatting in App.jsx

* test: Update ExperimentCollectionDashboard.test.tsx with new tests and fix linting issues

* refactor: Migrate Zustand store to Typescript and add optional Sentry error capture

* type: Add Participant interface

* revert: Use existing fetch participant functionality and make sure participant is loaded before fetching the experiment collection

* refactor: Convert App.jsx & config.js to .tsx and .ts files

* refactor: Update Participant "current" view to include participant_id_url field

* refactor: Use participantIdUrl instead of participantId to link / redirect to experiments with pre-existing participant_id(_url)

* refactor: Add LoaderContainer and ConditionalRender components

* refactor: Update CongoSameDiff to get participant's group variant based on participant's id or random number

* fix: Handle missing participant / participant id in experiment collection

* test: Test link to experiment with participant id url param

* refactor: Remove unused import in ExperimentCollection.tsx

* fix: Fix linting warnings

* Add comment

* set cards initial state to {}, null throws an error during tests

* optimize code

* Optimize code

* Optimize code

* feat: working implementation to set Header

* add unit test

* reformat backend urls

* reset response interval

* Set first_card seen after posting the result and fix double asignment second_card

* fix serializer, adjust variable conversion

* stub tests

* Chore(deps): Bump ejs from 3.1.9 to 3.1.10 in /frontend (#992)

Bumps [ejs](https://github.com/mde/ejs) from 3.1.9 to 3.1.10.
- [Release notes](https://github.com/mde/ejs/releases)
- [Commits](mde/ejs@v3.1.9...v3.1.10)

---
updated-dependencies:
- dependency-name: ejs
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update backend/theme/admin.py

Co-authored-by: Drikus Roor <drikusroor@gmail.com>

* Chore(deps): Bump tqdm from 4.65.0 to 4.66.3 in /backend/requirements (#996)

Bumps [tqdm](https://github.com/tqdm/tqdm) from 4.65.0 to 4.66.3.
- [Release notes](https://github.com/tqdm/tqdm/releases)
- [Commits](tqdm/tqdm@v4.65.0...v4.66.3)

---
updated-dependencies:
- dependency-name: tqdm
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* quick and diry fix: remove header

* fix: Fix bug report template (#981)

Resolves Fix bug issue template #977

* Fixed: Update final_action_with_optional_button and Final component (#1000)

* chore: Update final_action_with_optional_button to handle and add participant_id_url in redirect URL if participant has participant_id_url

* refactor: Update Final component to use Link instead of anchor tag for button navigation

* fix: Refactor MarkdownPreview widget to be able to use multiple on one page (#991)

* fix: do not call onNext() from within map

* fix: do not call onNext from preloadResources function

* code quality: remove timePassed condition

* fix: loop over all sections also for non-buffer loading

* feat: Update participant_id assignment in CongoSameDiff class (#1004)

The participant_id assignment in the CongoSameDiff class has been updated to use the session's participant ID instead of generating using the participant_id_url property as a base for the pattern index.

* feat: move Header to ExperimentCollectionDashboard

* camelCase backend output

* fix typo

* roll back changes to DefaultPage

* Revert "stub tests"

This reverts commit 76e1863.

* add DefaultPage test

* add tests for conditional render of header

* fix tests and linting issues

* Clear buffers before preloading first section unless previous section was the same

* Fix (CI): Fix frontend build in deployment to tst & acc (#1007)

* config: Set SENTRY_ENVIRONMENT to "test" and "acceptance" in relevant files so Sentry knows which environment it is running on (#972)

* ci: Update podman.yml workflow conditions

The `if` conditions in the `podman.yml` workflow file have been updated to include additional checks for the `workflow_dispatch` event. This ensures that the workflow is triggered correctly for the workflow dispatch button in combination with either the `develop` or the `main` branch.

* chore: Update podman.yml workflow variables to avoid the vite build failing due to missing environment variables

This commit updates the `podman.yml` workflow file to include additional variables related to the frontend HTML. These variables are used for the favicon, logo URL, Open Graph (OG) description, OG image, OG title, OG URL, and body class. The variables are set to empty strings if not provided. This change ensures that the workflow has the necessary variables for the frontend HTML.

* ci: Temporarily turn on deploy for acceptance on this branch

* chore: Try if manually setting the favicon fixes things

* ci: Update podman.yml workflow variables to include frontend HTML environment variables

This commit updates the `podman.yml` workflow file to include additional variables related to the frontend HTML. These variables are used for the favicon, logo URL, Open Graph (OG) description, OG image, OG title, OG URL, and body class. The variables are set to empty strings if not provided. This change ensures that the workflow has the necessary variables for the frontend HTML.

* ci: Test deploy to test environment

* chore: Update podman.yml workflow conditions for develop branch

* ---
updated-dependencies:
- dependency-name: requests
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update frontend/src/components/Header/Header.tsx

Co-authored-by: Drikus Roor <drikusroor@gmail.com>

* Update frontend/src/components/Header/Header.tsx

Co-authored-by: Drikus Roor <drikusroor@gmail.com>

* fix: adjust translation files

* fix: first_round order

* fix: `ready_time` be gone

* fix: don't await onResult in Trial component

* fix: Prefix reversed section url with BASE_URL if present

(cherry picked from commit b42f649)

* chore: Add BASE_URL environment variable to production settings too

(cherry picked from commit 0b4f6d8)

* refactor: Fallback to "http://localhost:8000" even when Docker sets BASE_URL as an empty string

(cherry picked from commit 0af4025)

* refactor: Strip trailing slash from base url

Co-authored-by: Berit <berit.janssen@gmail.com>
(cherry picked from commit 3ef3397)

* fix: problem with questionnaires

* remove await again

* chore: Update package version to 2.1.0

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: BeritJanssen <berit.janssen@gmail.com>
Co-authored-by: Evert-R <evert.rot@gmx.com>
Co-authored-by: Evert-R <49793452+Evert-R@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Infrastructure Relates to deployment or testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant