From 222966c6b03f97163e69b585febfc4457a541cd3 Mon Sep 17 00:00:00 2001 From: craifiskerinc <108751807+craifiskerinc@users.noreply.github.com> Date: Mon, 16 Jan 2023 13:00:16 -0500 Subject: [PATCH 01/10] CEC-3236 Germany (#264) * CEC-3236 Germany testing initial workflow * CEC-3236 Germany testing * CEC-3236 testing germany * CEC-3236 removing euprdTest and adding it to deploy Co-authored-by: Christopher Rai --- .env.cec-euprd | 9 +++++++++ .github/workflows/deploy.yml | 28 ++++++++++++++++++++++++++++ k8s/values-cec-euprd.yaml | 12 ++++++++++++ package.json | 1 + 4 files changed, 50 insertions(+) create mode 100644 .env.cec-euprd create mode 100644 k8s/values-cec-euprd.yaml diff --git a/.env.cec-euprd b/.env.cec-euprd new file mode 100644 index 0000000..763a959 --- /dev/null +++ b/.env.cec-euprd @@ -0,0 +1,9 @@ +REACT_APP_AUTH_CALLBACK_URL=https://ota-admin.cec-euprd.fiskerinc.com +REACT_APP_AUTH_SERVICE_URL=https://gw.cec-prd.fiskerinc.com/compute_auth +REACT_APP_CERT_SERVICE_URL=https://gw.cec-prd.fiskerinc.com/certificate +REACT_APP_MAGNA_PROVIDER=Magna +REACT_APP_MAGNA_GROUP_ID=68273225-9da4-4fa7-aea5-38e16ec471fe +REACT_APP_OTA_SERVICE_URL=https://gw.cec-euprd.fiskerinc.com/ota_update +REACT_APP_SECURITY_DLL_URL=https://assets.fiskerdps.com/cloud-supplier/fisker_security_32.dll +REACT_APP_SECURITY_DLL_64_URL=https://assets.fiskerdps.com/cloud-supplier/fisker_security_64.dll +REACT_APP_SUPERSET_URL=https://superset.cec-euprd.fiskerinc.com diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index e9cc99f..87e430a 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -84,6 +84,17 @@ jobs: cache-from: type=gha cache-to: type=gha,mode=max + - name: Build and push Germany + if: github.ref == 'refs/heads/main' + uses: docker/build-push-action@v3 + with: + context: . + build-args: ENVIRONMENT=cec-eu${{ env.ENVIRONMENT }} + push: true + tags: ${{ env.REGISTRY }}/${{ env.PROJECT }}:${{ env.TAG }}-cec-eu${{ env.ENVIRONMENT }} + cache-from: type=gha + cache-to: type=gha,mode=max + deploy: needs: build runs-on: [self-hosted, azure] @@ -130,6 +141,23 @@ jobs: MSG_MINIMAL: true SLACK_MESSAGE: "Successfully deployed ${{ env.PROJECT }} to cec-${{ env.ENVIRONMENT }}! :gopher_party:" + - name: Deploy Germany + if: github.ref == 'refs/heads/main' + run: |- + helm upgrade \ + --kube-context cec-eu$ENVIRONMENT-cluster-1 \ + --set image.registry=$REGISTRY \ + --set image.name=$PROJECT \ + --set image.tag=$TAG-cec-eu$ENVIRONMENT \ + --wait -i -f k8s/values-cec-eu$ENVIRONMENT.yaml $PROJECT k8s/ + + - name: Notify deploy Germany + if: github.ref == 'refs/heads/main' + uses: rtCamp/action-slack-notify@v2 + env: + MSG_MINIMAL: true + SLACK_MESSAGE: "Successfully deployed ${{ env.PROJECT }} to cec-eu${{ env.ENVIRONMENT }}! :gopher_party:" + - name: Notify if failure if: ${{ failure() }} uses: rtCamp/action-slack-notify@v2 diff --git a/k8s/values-cec-euprd.yaml b/k8s/values-cec-euprd.yaml new file mode 100644 index 0000000..12f9d4a --- /dev/null +++ b/k8s/values-cec-euprd.yaml @@ -0,0 +1,12 @@ +ingress: + hostname: ota-admin.cec-euprd.fiskerinc.com + +resources: + requests: + cpu: 100m + memory: 128Mi + limits: + cpu: 250m + memory: 256Mi + +replicas: 3 diff --git a/package.json b/package.json index f584165..e62f375 100644 --- a/package.json +++ b/package.json @@ -43,6 +43,7 @@ "build:stg": "env-cmd -f .env.stg react-scripts build", "build:prd": "env-cmd -f .env.prd react-scripts build", "build:cec-prd": "env-cmd -f .env.cec-prd react-scripts build", + "build:cec-euprd": "env-cmd -f .env.cec-euprd react-scripts build", "build:local": "env-cmd -f .env.local react-scripts build", "test": "env-cmd -f .env.local react-scripts test --no-cache", "test:debug": "react-scripts --inspect-brk test --runInBand --no-cache", From a9a14c9493bb1245967f8a52e7d8faf2b746f3ea Mon Sep 17 00:00:00 2001 From: Milamary <118387423+Milamary@users.noreply.github.com> Date: Mon, 16 Jan 2023 18:17:21 -0600 Subject: [PATCH 02/10] added PR Jira Check pipeline (#267) --- .github/workflows/pr.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .github/workflows/pr.yml diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml new file mode 100644 index 0000000..75f6ebf --- /dev/null +++ b/.github/workflows/pr.yml @@ -0,0 +1,10 @@ +name: Pull Request Jira Check + +on: + pull_request: + types: [opened, edited, synchronize, reopened] + + +jobs: + prcheck: + uses: Fisker-Inc/github-actions/.github/workflows/pr.yml@main \ No newline at end of file From 1bc6419c698f05add3c2550a8d9de6f41a1b5bb4 Mon Sep 17 00:00:00 2001 From: John Wu <76966357+jwu-fisker@users.noreply.github.com> Date: Tue, 17 Jan 2023 15:35:10 -0800 Subject: [PATCH 03/10] CEC-3542 Missing Permissions import (#269) * CEC-3542 Missing Permissions import * silence deprecation warnings Co-authored-by: Rafi Greenberg --- .github/workflows/test.yml | 4 ++-- src/components/Controls/CarUpdatesTable/index.jsx | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1da55ae..cd2e6ee 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,12 +11,12 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: fetch-depth: 0 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: node-version: "16" cache: "npm" diff --git a/src/components/Controls/CarUpdatesTable/index.jsx b/src/components/Controls/CarUpdatesTable/index.jsx index 4ea66ca..f2f2842 100644 --- a/src/components/Controls/CarUpdatesTable/index.jsx +++ b/src/components/Controls/CarUpdatesTable/index.jsx @@ -6,7 +6,7 @@ import { TableFooter, TablePagination, TableRow, - Tooltip, + Tooltip } from "@material-ui/core"; import CancelIcon from "@material-ui/icons/Cancel"; import React, { useEffect, useState } from "react"; @@ -14,9 +14,10 @@ import { Link } from "react-router-dom"; import { logger } from "../../../services/monitoring"; import { LocalDateTimeString } from "../../../utils/dates"; +import { Permissions } from "../../../utils/roles"; import { CarUpdatesProvider, - useCarUpdatesContext, + useCarUpdatesContext } from "../../Contexts/CarUpdatesContext"; import { useStatusContext } from "../../Contexts/StatusContext"; import { useUserContext } from "../../Contexts/UserContext"; From eee36cc858ae877f993e67a18ac698ab424e50c4 Mon Sep 17 00:00:00 2001 From: Paul Adamsen <117673433+pauladamseniii@users.noreply.github.com> Date: Wed, 18 Jan 2023 15:21:08 -0500 Subject: [PATCH 04/10] CEC-3150 - Track Deployment User (#268) --- .../__snapshots__/CarUpdatesTab.test.jsx.snap | 23 ++++++++++++ .../Contexts/__mocks__/CarUpdatesContext.jsx | 3 ++ .../Controls/CarUpdatesTable/index.jsx | 37 +++++++++++-------- 3 files changed, 48 insertions(+), 15 deletions(-) diff --git a/src/components/Cars/Status/__snapshots__/CarUpdatesTab.test.jsx.snap b/src/components/Cars/Status/__snapshots__/CarUpdatesTab.test.jsx.snap index d3e7afe..62cdde9 100644 --- a/src/components/Cars/Status/__snapshots__/CarUpdatesTab.test.jsx.snap +++ b/src/components/Cars/Status/__snapshots__/CarUpdatesTab.test.jsx.snap @@ -80,6 +80,29 @@ exports[`CarUpdatesTab Render 1`] = ` + + + Username + + + { {updateName(row)} + + {row.username} + {row.status} {row.progress > -1 && ( @@ -198,22 +205,22 @@ const MainForm = ({ vin, token }) => { - {totalCarUpdates === 0 ? ( - No Car Updates found + {totalCarUpdates === 0 ? ( + No Car Updates found ) : ( - )} + )} From 6fb4b9cfa4578b1eeae6b752df4e88f2d2333a04 Mon Sep 17 00:00:00 2001 From: Paul Adamsen <117673433+pauladamseniii@users.noreply.github.com> Date: Fri, 20 Jan 2023 20:28:00 -0500 Subject: [PATCH 05/10] CEC-3579 - Add debug_mask to config message (#270) --- .../App/__snapshots__/App.test.js.snap | 6 ++++ .../Details/__snapshots__/index.test.jsx.snap | 6 ++++ src/components/Cars/Status/Details/index.jsx | 3 ++ .../__snapshots__/DetailsTab.test.jsx.snap | 6 ++++ .../Update/__snapshots__/index.test.jsx.snap | 36 +++++++++++++++++++ src/components/Cars/Update/index.jsx | 22 +++++++++++- 6 files changed, 78 insertions(+), 1 deletion(-) diff --git a/src/components/App/__snapshots__/App.test.js.snap b/src/components/App/__snapshots__/App.test.js.snap index 89e8f20..fd02840 100644 --- a/src/components/App/__snapshots__/App.test.js.snap +++ b/src/components/App/__snapshots__/App.test.js.snap @@ -9958,6 +9958,12 @@ exports[`App Route /vehicle-status authenticated 1`] = ` : 3

+

+ + Debug Mask + + : +

+

+ + Debug Mask + + : +

{

Filters: {vehicle.canbus.filters ? vehicle.canbus.filters.length : 0}

+

+ Debug Mask: {vehicle.debug_mask} +

)} diff --git a/src/components/Cars/Status/__snapshots__/DetailsTab.test.jsx.snap b/src/components/Cars/Status/__snapshots__/DetailsTab.test.jsx.snap index 08c875a..1975ba7 100644 --- a/src/components/Cars/Status/__snapshots__/DetailsTab.test.jsx.snap +++ b/src/components/Cars/Status/__snapshots__/DetailsTab.test.jsx.snap @@ -144,6 +144,12 @@ exports[`DetailsTab Render 1`] = ` : 3

+

+ + Debug Mask + + : +

+
+ +
+ + +
+