From 95f0962e6428c599b9786a696f2681bc7a429899 Mon Sep 17 00:00:00 2001 From: Paulo Gomes da Cruz Junior Date: Mon, 18 Nov 2024 10:32:11 -0800 Subject: [PATCH 1/8] chore: fixing cors issue --- .github/workflows/merge.yml | 2 ++ .github/workflows/pr-open.yml | 1 + 2 files changed, 3 insertions(+) diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index 0213e8c9..4ee951bc 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -63,6 +63,7 @@ jobs: -p AWS_COGNITO_ISSUER_URI=https://cognito-idp.${{ vars.AWS_REGION }}.amazonaws.com/${{ vars.VITE_USER_POOLS_ID }} -p DASHBOARD_JOB_IDIR_USERS=${{ vars.DASHBOARD_JOB_IDIR_USERS }} -p WMS_LAYERS_WHITELIST_USERS=${{ vars.WMS_LAYERS_WHITELIST_USERS }} + -p ALLOWED_ORIGINS=https://silva-test.nrs.gov.bc.ca/ - name: frontend file: frontend/openshift.deploy.yml overwrite: true @@ -153,6 +154,7 @@ jobs: -p AWS_COGNITO_ISSUER_URI=https://cognito-idp.${{ vars.AWS_REGION }}.amazonaws.com/${{ vars.VITE_USER_POOLS_ID }} -p DASHBOARD_JOB_IDIR_USERS=${{ vars.DASHBOARD_JOB_IDIR_USERS }} -p WMS_LAYERS_WHITELIST_USERS=${{ vars.WMS_LAYERS_WHITELIST_USERS }} + -p ALLOWED_ORIGINS=https://silva.nrs.gov.bc.ca/ - name: frontend file: frontend/openshift.deploy.yml overwrite: true diff --git a/.github/workflows/pr-open.yml b/.github/workflows/pr-open.yml index 9c8a196b..1807946e 100644 --- a/.github/workflows/pr-open.yml +++ b/.github/workflows/pr-open.yml @@ -118,6 +118,7 @@ jobs: -p AWS_COGNITO_ISSUER_URI=https://cognito-idp.${{ vars.AWS_REGION }}.amazonaws.com/${{ vars.VITE_USER_POOLS_ID }} -p DASHBOARD_JOB_IDIR_USERS=${{ vars.DASHBOARD_JOB_IDIR_USERS }} -p WMS_LAYERS_WHITELIST_USERS=${{ vars.WMS_LAYERS_WHITELIST_USERS }} + -p ALLOWED_ORIGINS=https://${{ env.PREFIX }}-${{ steps.route.outputs.route }}-frontend.${{ env.DOMAIN }} - name: frontend file: frontend/openshift.deploy.yml parameters: From 4c15c061cffeaee84fcc18af72fea475c45de256 Mon Sep 17 00:00:00 2001 From: Paulo Gomes da Cruz Junior Date: Mon, 18 Nov 2024 10:36:03 -0800 Subject: [PATCH 2/8] fix: fixing wrong param passed --- .github/workflows/pr-open.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-open.yml b/.github/workflows/pr-open.yml index 1807946e..1c9f7675 100644 --- a/.github/workflows/pr-open.yml +++ b/.github/workflows/pr-open.yml @@ -118,7 +118,7 @@ jobs: -p AWS_COGNITO_ISSUER_URI=https://cognito-idp.${{ vars.AWS_REGION }}.amazonaws.com/${{ vars.VITE_USER_POOLS_ID }} -p DASHBOARD_JOB_IDIR_USERS=${{ vars.DASHBOARD_JOB_IDIR_USERS }} -p WMS_LAYERS_WHITELIST_USERS=${{ vars.WMS_LAYERS_WHITELIST_USERS }} - -p ALLOWED_ORIGINS=https://${{ env.PREFIX }}-${{ steps.route.outputs.route }}-frontend.${{ env.DOMAIN }} + -p ALLOWED_ORIGINS=https://${{ github.event.repository.name }}-${{ steps.route.outputs.route }}-frontend.${{ env.DOMAIN }} - name: frontend file: frontend/openshift.deploy.yml parameters: From f7cb2c7dd581bf760f61c8ccdfe2c716050494cc Mon Sep 17 00:00:00 2001 From: Paulo Gomes da Cruz Junior Date: Mon, 18 Nov 2024 10:37:14 -0800 Subject: [PATCH 3/8] fix: fixing wrong parameter --- .github/workflows/pr-open.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-open.yml b/.github/workflows/pr-open.yml index 1c9f7675..458cba69 100644 --- a/.github/workflows/pr-open.yml +++ b/.github/workflows/pr-open.yml @@ -118,7 +118,7 @@ jobs: -p AWS_COGNITO_ISSUER_URI=https://cognito-idp.${{ vars.AWS_REGION }}.amazonaws.com/${{ vars.VITE_USER_POOLS_ID }} -p DASHBOARD_JOB_IDIR_USERS=${{ vars.DASHBOARD_JOB_IDIR_USERS }} -p WMS_LAYERS_WHITELIST_USERS=${{ vars.WMS_LAYERS_WHITELIST_USERS }} - -p ALLOWED_ORIGINS=https://${{ github.event.repository.name }}-${{ steps.route.outputs.route }}-frontend.${{ env.DOMAIN }} + -p ALLOWED_ORIGINS=https://${{ github.event.repository.name }}-${{ needs.init.outputs.route }}-frontend.${{ env.DOMAIN }} - name: frontend file: frontend/openshift.deploy.yml parameters: From 44f292fbd72a3f3fc5d0c8d8830fd1cf1ff02391 Mon Sep 17 00:00:00 2001 From: Paulo Gomes da Cruz Junior Date: Mon, 18 Nov 2024 10:39:36 -0800 Subject: [PATCH 4/8] fix: making ALLOWED_ORIGINS required without a default value --- backend/openshift.deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/openshift.deploy.yml b/backend/openshift.deploy.yml index 32151bfc..3ba338d2 100644 --- a/backend/openshift.deploy.yml +++ b/backend/openshift.deploy.yml @@ -77,7 +77,7 @@ parameters: required: true - name: ALLOWED_ORIGINS description: Sets all the allowed request origins - value: "http://localhost:300*,https://*.apps.silver.devops.gov.bc.ca" + required: true - name: WMS_LAYERS_WHITELIST_USERS description: List of users that can see active layers on the map view required: true From 98b4ba0846422991ce404bc3f57a9d401b18a4b8 Mon Sep 17 00:00:00 2001 From: Paulo Gomes da Cruz Junior Date: Mon, 18 Nov 2024 11:14:33 -0800 Subject: [PATCH 5/8] chore: forcing new build --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 49b8b7d7..ca84bcba 100644 --- a/README.md +++ b/README.md @@ -90,4 +90,4 @@ our [CONTRIBUTING](CONTRIBUTING.md) guide. As mentioned, we're here to help. Feel free to reach out and start a conversation on Rocket chat, you can search for -`@jazz.grewal` or `@ricardo.campos`. +`@jazz.grewal` or `@paulushcgcj`. From efaf6ca39403de06f8169537b752c9031f52ddd6 Mon Sep 17 00:00:00 2001 From: Paulo Gomes da Cruz Junior Date: Mon, 18 Nov 2024 13:52:43 -0800 Subject: [PATCH 6/8] chore: forcing new build --- frontend/src/components/FriendlyDate/index.tsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/frontend/src/components/FriendlyDate/index.tsx b/frontend/src/components/FriendlyDate/index.tsx index bac54091..73e729d4 100644 --- a/frontend/src/components/FriendlyDate/index.tsx +++ b/frontend/src/components/FriendlyDate/index.tsx @@ -61,8 +61,6 @@ const FriendlyDate: React.FC = ({ date }) => { ? formatFutureDateAtlassianStyle(parsedDate) : formatDateAtlassianStyle(parsedDate); - if(cleanDate === formattedDate) - console.log(`cleanDate: ${cleanDate} formattedDate: ${formattedDate}`); return ( <> {(cleanDate === formattedDate) ? ({formattedDate}) : ( From 4bbce49da6146c27ababf9a49514b4b56719bce6 Mon Sep 17 00:00:00 2001 From: Derek Roberts Date: Mon, 18 Nov 2024 14:07:22 -0800 Subject: [PATCH 7/8] env.domain --- .github/workflows/pr-open.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/pr-open.yml b/.github/workflows/pr-open.yml index 458cba69..5c4f6865 100644 --- a/.github/workflows/pr-open.yml +++ b/.github/workflows/pr-open.yml @@ -98,6 +98,8 @@ jobs: deploys: name: Deploys needs: [builds, init] + env: + DOMAIN: apps.silver.devops.gov.bc.ca runs-on: ubuntu-latest strategy: matrix: From 66adb5971ed7570c2f13843a3d8772d4b199abd6 Mon Sep 17 00:00:00 2001 From: Derek Roberts Date: Mon, 18 Nov 2024 14:08:08 -0800 Subject: [PATCH 8/8] env.domain --- .github/workflows/pr-open.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/pr-open.yml b/.github/workflows/pr-open.yml index 5c4f6865..35737adb 100644 --- a/.github/workflows/pr-open.yml +++ b/.github/workflows/pr-open.yml @@ -98,8 +98,6 @@ jobs: deploys: name: Deploys needs: [builds, init] - env: - DOMAIN: apps.silver.devops.gov.bc.ca runs-on: ubuntu-latest strategy: matrix: @@ -120,7 +118,7 @@ jobs: -p AWS_COGNITO_ISSUER_URI=https://cognito-idp.${{ vars.AWS_REGION }}.amazonaws.com/${{ vars.VITE_USER_POOLS_ID }} -p DASHBOARD_JOB_IDIR_USERS=${{ vars.DASHBOARD_JOB_IDIR_USERS }} -p WMS_LAYERS_WHITELIST_USERS=${{ vars.WMS_LAYERS_WHITELIST_USERS }} - -p ALLOWED_ORIGINS=https://${{ github.event.repository.name }}-${{ needs.init.outputs.route }}-frontend.${{ env.DOMAIN }} + -p ALLOWED_ORIGINS=https://${{ github.event.repository.name }}-${{ needs.init.outputs.route }}-frontend.apps.silver.devops.gov.bc.ca - name: frontend file: frontend/openshift.deploy.yml parameters: