diff --git a/.github/workflows/dev-release.yaml b/.github/workflows/dev-release.yaml index e0779594c..c369316a1 100644 --- a/.github/workflows/dev-release.yaml +++ b/.github/workflows/dev-release.yaml @@ -1,11 +1,11 @@ ## For each release, the value of name, branches, RELEASE_NAME and PR_NUMBER need to be adjusted accordingly ## For each release, update lib/config.js: version and releaseBranch -name: TFRS Dev release-2.20.0 +name: TFRS Dev release-2.21.0 on: push: - branches: [ release-2.20.0 ] + branches: [release-2.21.0] paths: - frontend/** - backend/** @@ -15,17 +15,15 @@ on: env: ## The pull request number of the Tracking pull request to merge the release branch to main ## Also remember to update the version in .pipeline/lib/config.js - PR_NUMBER: 2894 - RELEASE_NAME: release-2.20.0 + PR_NUMBER: 2908 + RELEASE_NAME: release-2.21.0 concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: - unit-test: - name: Run Backend Unit Tests runs-on: ubuntu-latest timeout-minutes: 60 @@ -33,17 +31,16 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - - - name: Run coverage report for django tests + + - name: Run coverage report for django tests uses: kuanfandevops/django-test-action@itvr-django-test continue-on-error: true with: settings-dir-path: "backend/api" requirements-file: "backend/requirements.txt" managepy-dir: backend - - lint: + lint: name: Linting runs-on: ubuntu-latest timeout-minutes: 60 @@ -52,13 +49,13 @@ jobs: - name: Checkout uses: actions/checkout@v3 - - name: Frontend Linting + - name: Frontend Linting continue-on-error: true run: | cd frontend pwd npm install - npm run lint + npm run lint - name: Backend linting uses: github/super-linter/slim@v4 @@ -71,13 +68,11 @@ jobs: LOG_LEVEL: WARN build: - name: Build TFRS on Openshift runs-on: ubuntu-latest timeout-minutes: 60 steps: - ## it will checkout to /home/runner/work/itvr/itvr - name: Check out repository uses: actions/checkout@v3 @@ -96,17 +91,15 @@ jobs: run: | cd .pipeline npm install - npm run build -- --pr=${{ env.PR_NUMBER }} --env=build + npm run build -- --pr=${{ env.PR_NUMBER }} --env=build deploy-on-dev: - name: Deploy TFRS on Dev runs-on: ubuntu-latest timeout-minutes: 240 needs: build steps: - ## it will checkout to /home/runner/work/itvr/itvr - name: Check out repository uses: actions/checkout@v3 @@ -117,11 +110,10 @@ jobs: openshift_server_url: ${{ secrets.OPENSHIFT_SERVER }} openshift_token: ${{ secrets.OPENSHIFT_TOKEN }} insecure_skip_tls_verify: true - namespace: ${{ secrets.OPENSHIFT_NAMESPACE_PLATE }}-tools + namespace: ${{ secrets.OPENSHIFT_NAMESPACE_PLATE }}-tools - name: Run deploy run: | cd .pipeline npm install - npm run deploy -- --pr=${{ env.PR_NUMBER }} --env=dev - + npm run deploy -- --pr=${{ env.PR_NUMBER }} --env=dev diff --git a/.github/workflows/tfrs-release.yaml b/.github/workflows/tfrs-release.yaml index f668f8ea9..38f920b3c 100644 --- a/.github/workflows/tfrs-release.yaml +++ b/.github/workflows/tfrs-release.yaml @@ -1,7 +1,7 @@ ## For each release, the value of name, branches, RELEASE_NAME and PR_NUMBER need to be adjusted accordingly ## For each release, update lib/config.js: version and releaseBranch -name: TFRS release-2.20.0 +name: TFRS release-2.21.0 on: workflow_dispatch: @@ -10,8 +10,8 @@ on: env: ## The pull request number of the Tracking pull request to merge the release branch to main ## Also remember to update the version in .pipeline/lib/config.js - PR_NUMBER: 2894 - RELEASE_NAME: release-2.20.0 + PR_NUMBER: 2908 + RELEASE_NAME: release-2.21.0 concurrency: group: ${{ github.workflow }}-${{ github.ref }} diff --git a/.pipeline/lib/config.js b/.pipeline/lib/config.js index 9761549db..7c2e3ebaa 100644 --- a/.pipeline/lib/config.js +++ b/.pipeline/lib/config.js @@ -1,95 +1,261 @@ -'use strict'; -const options= require('@bcgov/pipeline-cli').Util.parseArguments() -const changeId = options.pr //aka pull-request -const version = '2.20.0' -const name = 'tfrs' -const ocpName = 'apps.silver.devops' +"use strict"; +const options = require("@bcgov/pipeline-cli").Util.parseArguments(); +const changeId = options.pr; //aka pull-request +const version = "2.21.0"; +const name = "tfrs"; +const ocpName = "apps.silver.devops"; -options.git.owner='bcgov' -//Have to set options.git.repository to be zeva otherwise an error will be thrown as the label github-repo +options.git.owner = "bcgov"; +//Have to set options.git.repository to be zeva otherwise an error will be thrown as the label github-repo //will contain https://github.com/bcgov/zeva which is not allowed as a valid label -options.git.repository='tfrs' +options.git.repository = "tfrs"; const phases = { - build: { namespace:'0ab226-tools' , name: `${name}`, phase: 'build' , changeId:changeId, suffix: `-build-${changeId}` , - instance: `${name}-build-${changeId}` , version:`${version}-${changeId}`, tag:`build-${version}-${changeId}`, - releaseBranch: 'release-2.20.0' - }, - dev: {namespace:'0ab226-dev' , name: `${name}`, phase: 'dev' , changeId:changeId, suffix: `-dev` , - instance: `${name}-dev` , version:`${version}`, tag:`dev-${version}`, dbServiceName: 'tfrs-spilo', - frontendCpuRequest: '100m', frontendCpuLimit: '200m', frontendMemoryRequest: '300Mi', frontendMemoryLimit: '600Mi', frontendReplicas: 2, - frontendKeycloakAuthority: 'https://dev.loginproxy.gov.bc.ca/auth', frontendKeycloakClientId: 'tfrs-on-gold-4308', frontendKeycloakCallbackUrl: `https://tfrs-dev.${ocpName}.gov.bc.ca`, - frontendKeycloakLogoutUrl: `https://tfrs-dev.${ocpName}.gov.bc.ca`, - frontendHost: `tfrs-dev.${ocpName}.gov.bc.ca`, frontendSiteminderLogoutUrl: 'https://logontest7.gov.bc.ca/clp-cgi/logoff.cgi?retnow=1&returl=', - frontendDebugEnabled: 'true', - backendCpuRequest: '200m', backendCpuLimit: '400m', backendMemoryRequest: '600Mi', backendMemoryLimit: '1200Mi', backendHealthCheckDelay: 30, - backendHost: `tfrs-backend-dev.${ocpName}.gov.bc.ca`, backendReplicas: 2, - backendKeycloakAudience: 'tfrs-on-gold-4308', - backendWellKnownEndpoint: 'https://dev.loginproxy.gov.bc.ca/auth/realms/standard/.well-known/openid-configuration', - backendKeycloakCertsUrl: 'https://dev.loginproxy.gov.bc.ca/auth/realms/standard/protocol/openid-connect/certs', - celeryCpuRequest: '100m', celeryCpuLimit: '250m', celeryMemoryRequest: '1600Mi', celeryMemoryLimit: '3Gi', - scanHandlerCpuRequest: '25m', scanHandlerCpuLimit: '50m', scanHandlerMemoryRequest: '50Mi', scanHandlerMemoryLimit: '100Mi', - scanCoordinatorCpuRequest: '50m', scanCoordinatorCpuLimit: '100m', scanCoordinatorMemoryRequest: '30Mi', scanCoordinatorMemoryLimit: '60Mi', - notificationServerCpuRequest: '100m', notificationServerCpuLimit: '200m', notificationServerMemoryRequest: '120Mi', notificationServerMemoryLimit: '240Mi', - patroniCpuRequest: '500m', patroniCpuLimit: '1000m', patroniMemoryRequest: '250Mi', patroniMemoryLimit: '1Gi', patroniPvcSize: '2Gi', - patroniReplica: 1, storageClass: 'netapp-block-standard', ocpName: `${ocpName}`, - rabbitmqCpuRequest: '250m', rabbitmqCpuLimit: '700m', rabbitmqMemoryRequest: '500Mi', rabbitmqMemoryLimit: '1Gi', rabbitmqPvcSize: '1Gi', - rabbitmqReplica: 1, rabbitmqPostStartSleep: 120, storageClass: 'netapp-block-standard', - schemaSpyPublicCpuRequest: '50m', schemaSpyPublicCpuLimit: '500m', schemaSpyPublicMemoryRequest: '512Mi', schemaSpyPublicMemoryLimit: '2Gi', - schemaSpyAuditCpuRequest: '50m', schemaSpyAuditCpuLimit: '300m', schemaSpyAuditMemoryRequest: '256Mi', schemaSpyAuditMemoryLimit: '512Mi' - }, - test: {namespace:'0ab226-test' , name: `${name}`, phase: 'test' , changeId:changeId, suffix: `-test` , - instance: `${name}-test` , version:`${version}`, tag:`test-${version}`, dbServiceName: 'tfrs-spilo', - frontendCpuRequest: '40m', frontendCpuLimit: '80m', frontendMemoryRequest: '60Mi', frontendMemoryLimit: '120Mi', frontendReplicas: 2, - frontendKeycloakAuthority: 'https://test.loginproxy.gov.bc.ca/auth', frontendKeycloakClientId: 'tfrs-on-gold-4308', frontendKeycloakCallbackUrl: `https://tfrs-test.${ocpName}.gov.bc.ca`, - frontendKeycloakLogoutUrl: `https://tfrs-test.${ocpName}.gov.bc.ca`, - frontendHost: `tfrs-test.${ocpName}.gov.bc.ca`, frontendSiteminderLogoutUrl: 'https://logontest7.gov.bc.ca/clp-cgi/logoff.cgi?retnow=1&returl=', - frontendDebugEnabled: 'true', - backendCpuRequest: '200m', backendCpuLimit: '400m', backendMemoryRequest: '600Mi', backendMemoryLimit: '1200Mi', backendHealthCheckDelay: 30, - backendHost: `tfrs-backend-test.${ocpName}.gov.bc.ca`, backendReplicas: 4, - backendKeycloakAudience: 'tfrs-on-gold-4308', - backendWellKnownEndpoint: 'https://test.loginproxy.gov.bc.ca/auth/realms/standard/.well-known/openid-configuration', - backendKeycloakCertsUrl: 'https://test.loginproxy.gov.bc.ca/auth/realms/standard/protocol/openid-connect/certs', - celeryCpuRequest: '100m', celeryCpuLimit: '250m', celeryMemoryRequest: '1600Mi', celeryMemoryLimit: '3Gi', - scanHandlerCpuRequest: '25m', scanHandlerCpuLimit: '50m', scanHandlerMemoryRequest: '50Mi', scanHandlerMemoryLimit: '100Mi', - scanCoordinatorCpuRequest: '50m', scanCoordinatorCpuLimit: '100m', scanCoordinatorMemoryRequest: '30Mi', scanCoordinatorMemoryLimit: '60Mi', - notificationServerCpuRequest: '100m', notificationServerCpuLimit: '200m', notificationServerMemoryRequest: '120Mi', notificationServerMemoryLimit: '240Mi', - patroniCpuRequest: '300m', patroniCpuLimit: '700m', patroniMemoryRequest: '250Mi', patroniMemoryLimit: '1Gi', patroniPvcSize: '3Gi', - patroniReplica: 2, storageClass: 'netapp-block-standard', ocpName: `${ocpName}`, - rabbitmqCpuRequest: '250m', rabbitmqCpuLimit: '400m', rabbitmqMemoryRequest: '500Mi', rabbitmqMemoryLimit: '1Gi', rabbitmqPvcSize: '1Gi', - rabbitmqReplica: 2, rabbitmqPostStartSleep: 120, storageClass: 'netapp-block-standard', - schemaSpyPublicCpuRequest: '50m', schemaSpyPublicCpuLimit: '500m', schemaSpyPublicMemoryRequest: '512Mi', schemaSpyPublicMemoryLimit: '2Gi', - schemaSpyAuditCpuRequest: '50m', schemaSpyAuditCpuLimit: '300m', schemaSpyAuditMemoryRequest: '256Mi', schemaSpyAuditMemoryLimit: '512Mi' - }, - prod: {namespace:'0ab226-prod' , name: `${name}`, phase: 'prod' , changeId:changeId, suffix: `-prod` , - instance: `${name}-prod` , version:`${version}`, tag:`prod-${version}`, dbServiceName: 'tfrs-crunchy-prod-pgbouncer', - frontendCpuRequest: '40m', frontendCpuLimit: '80m', frontendMemoryRequest: '60Mi', frontendMemoryLimit: '120Mi', frontendReplicas: 4, - frontendKeycloakAuthority: 'https://loginproxy.gov.bc.ca/auth', frontendKeycloakClientId: 'tfrs-on-gold-4308', frontendKeycloakCallbackUrl: 'https://lowcarbonfuels.gov.bc.ca', - frontendKeycloakLogoutUrl: 'https://lowcarbonfuels.gov.bc.ca', - frontendHost: 'lowcarbonfuels.gov.bc.ca', frontendSiteminderLogoutUrl: 'https://logon7.gov.bc.ca/clp-cgi/logoff.cgi?retnow=1&returl=', - frontendDebugEnabled: 'false', - backendCpuRequest: '200m', backendCpuLimit: '400m', backendMemoryRequest: '600Mi', backendMemoryLimit: '1200Mi', backendHealthCheckDelay: 30, - backendHost: `tfrs-backend-prod.${ocpName}.gov.bc.ca`, backendReplicas: 4, - backendKeycloakAudience: 'tfrs-on-gold-4308', - backendWellKnownEndpoint: 'https://loginproxy.gov.bc.ca/auth/realms/standard/.well-known/openid-configuration', - backendKeycloakCertsUrl: 'https://loginproxy.gov.bc.ca/auth/realms/standard/protocol/openid-connect/certs', - celeryCpuRequest: '100m', celeryCpuLimit: '250mm', celeryMemoryRequest: '1600Mi', celeryMemoryLimit: '3Gi', - scanHandlerCpuRequest: '25m', scanHandlerCpuLimit: '50m', scanHandlerMemoryRequest: '50Mi', scanHandlerMemoryLimit: '100Mi', - scanCoordinatorCpuRequest: '50m', scanCoordinatorCpuLimit: '100m', scanCoordinatorMemoryRequest: '30Mi', scanCoordinatorMemoryLimit: '60Mi', - notificationServerCpuRequest: '100m', notificationServerCpuLimit: '200m', notificationServerMemoryRequest: '120Mi', notificationServerMemoryLimit: '240Mi', - patroniCpuRequest: '300m', patroniCpuLimit: '600m', patroniMemoryRequest: '500Mi', patroniMemoryLimit: '2Gi', patroniPvcSize: '10Gi', - patroniReplica: 3, storageClass: 'netapp-block-standard', ocpName: `${ocpName}`, - rabbitmqCpuRequest: '250m', rabbitmqCpuLimit: '400m', rabbitmqMemoryRequest: '500Mi', rabbitmqMemoryLimit: '1Gi', rabbitmqPvcSize: '1Gi', - rabbitmqReplica: 2, rabbitmqPostStartSleep: 120, storageClass: 'netapp-block-standard' , - schemaSpyPublicCpuRequest: '50m', schemaSpyPublicCpuLimit: '500m', schemaSpyPublicMemoryRequest: '512Mi', schemaSpyPublicMemoryLimit: '2Gi', - schemaSpyAuditCpuRequest: '50m', schemaSpyAuditCpuLimit: '300m', schemaSpyAuditMemoryRequest: '256Mi', schemaSpyAuditMemoryLimit: '512Mi' - }, + build: { + namespace: "0ab226-tools", + name: `${name}`, + phase: "build", + changeId: changeId, + suffix: `-build-${changeId}`, + instance: `${name}-build-${changeId}`, + version: `${version}-${changeId}`, + tag: `build-${version}-${changeId}`, + releaseBranch: "release-2.21.0", + }, + dev: { + namespace: "0ab226-dev", + name: `${name}`, + phase: "dev", + changeId: changeId, + suffix: `-dev`, + instance: `${name}-dev`, + version: `${version}`, + tag: `dev-${version}`, + dbServiceName: "tfrs-spilo", + frontendCpuRequest: "100m", + frontendCpuLimit: "200m", + frontendMemoryRequest: "300Mi", + frontendMemoryLimit: "600Mi", + frontendReplicas: 2, + frontendKeycloakAuthority: "https://dev.loginproxy.gov.bc.ca/auth", + frontendKeycloakClientId: "tfrs-on-gold-4308", + frontendKeycloakCallbackUrl: `https://tfrs-dev.${ocpName}.gov.bc.ca`, + frontendKeycloakLogoutUrl: `https://tfrs-dev.${ocpName}.gov.bc.ca`, + frontendHost: `tfrs-dev.${ocpName}.gov.bc.ca`, + frontendSiteminderLogoutUrl: + "https://logontest7.gov.bc.ca/clp-cgi/logoff.cgi?retnow=1&returl=", + frontendDebugEnabled: "true", + backendCpuRequest: "200m", + backendCpuLimit: "400m", + backendMemoryRequest: "600Mi", + backendMemoryLimit: "1200Mi", + backendHealthCheckDelay: 30, + backendHost: `tfrs-backend-dev.${ocpName}.gov.bc.ca`, + backendReplicas: 2, + backendKeycloakAudience: "tfrs-on-gold-4308", + backendWellKnownEndpoint: + "https://dev.loginproxy.gov.bc.ca/auth/realms/standard/.well-known/openid-configuration", + backendKeycloakCertsUrl: + "https://dev.loginproxy.gov.bc.ca/auth/realms/standard/protocol/openid-connect/certs", + celeryCpuRequest: "100m", + celeryCpuLimit: "250m", + celeryMemoryRequest: "1600Mi", + celeryMemoryLimit: "3Gi", + scanHandlerCpuRequest: "25m", + scanHandlerCpuLimit: "50m", + scanHandlerMemoryRequest: "50Mi", + scanHandlerMemoryLimit: "100Mi", + scanCoordinatorCpuRequest: "50m", + scanCoordinatorCpuLimit: "100m", + scanCoordinatorMemoryRequest: "30Mi", + scanCoordinatorMemoryLimit: "60Mi", + notificationServerCpuRequest: "100m", + notificationServerCpuLimit: "200m", + notificationServerMemoryRequest: "120Mi", + notificationServerMemoryLimit: "240Mi", + patroniCpuRequest: "500m", + patroniCpuLimit: "1000m", + patroniMemoryRequest: "250Mi", + patroniMemoryLimit: "1Gi", + patroniPvcSize: "2Gi", + patroniReplica: 1, + storageClass: "netapp-block-standard", + ocpName: `${ocpName}`, + rabbitmqCpuRequest: "250m", + rabbitmqCpuLimit: "700m", + rabbitmqMemoryRequest: "500Mi", + rabbitmqMemoryLimit: "1Gi", + rabbitmqPvcSize: "1Gi", + rabbitmqReplica: 1, + rabbitmqPostStartSleep: 120, + storageClass: "netapp-block-standard", + schemaSpyPublicCpuRequest: "50m", + schemaSpyPublicCpuLimit: "500m", + schemaSpyPublicMemoryRequest: "512Mi", + schemaSpyPublicMemoryLimit: "2Gi", + schemaSpyAuditCpuRequest: "50m", + schemaSpyAuditCpuLimit: "300m", + schemaSpyAuditMemoryRequest: "256Mi", + schemaSpyAuditMemoryLimit: "512Mi", + }, + test: { + namespace: "0ab226-test", + name: `${name}`, + phase: "test", + changeId: changeId, + suffix: `-test`, + instance: `${name}-test`, + version: `${version}`, + tag: `test-${version}`, + dbServiceName: "tfrs-spilo", + frontendCpuRequest: "40m", + frontendCpuLimit: "80m", + frontendMemoryRequest: "60Mi", + frontendMemoryLimit: "120Mi", + frontendReplicas: 2, + frontendKeycloakAuthority: "https://test.loginproxy.gov.bc.ca/auth", + frontendKeycloakClientId: "tfrs-on-gold-4308", + frontendKeycloakCallbackUrl: `https://tfrs-test.${ocpName}.gov.bc.ca`, + frontendKeycloakLogoutUrl: `https://tfrs-test.${ocpName}.gov.bc.ca`, + frontendHost: `tfrs-test.${ocpName}.gov.bc.ca`, + frontendSiteminderLogoutUrl: + "https://logontest7.gov.bc.ca/clp-cgi/logoff.cgi?retnow=1&returl=", + frontendDebugEnabled: "true", + backendCpuRequest: "200m", + backendCpuLimit: "400m", + backendMemoryRequest: "600Mi", + backendMemoryLimit: "1200Mi", + backendHealthCheckDelay: 30, + backendHost: `tfrs-backend-test.${ocpName}.gov.bc.ca`, + backendReplicas: 4, + backendKeycloakAudience: "tfrs-on-gold-4308", + backendWellKnownEndpoint: + "https://test.loginproxy.gov.bc.ca/auth/realms/standard/.well-known/openid-configuration", + backendKeycloakCertsUrl: + "https://test.loginproxy.gov.bc.ca/auth/realms/standard/protocol/openid-connect/certs", + celeryCpuRequest: "100m", + celeryCpuLimit: "250m", + celeryMemoryRequest: "1600Mi", + celeryMemoryLimit: "3Gi", + scanHandlerCpuRequest: "25m", + scanHandlerCpuLimit: "50m", + scanHandlerMemoryRequest: "50Mi", + scanHandlerMemoryLimit: "100Mi", + scanCoordinatorCpuRequest: "50m", + scanCoordinatorCpuLimit: "100m", + scanCoordinatorMemoryRequest: "30Mi", + scanCoordinatorMemoryLimit: "60Mi", + notificationServerCpuRequest: "100m", + notificationServerCpuLimit: "200m", + notificationServerMemoryRequest: "120Mi", + notificationServerMemoryLimit: "240Mi", + patroniCpuRequest: "300m", + patroniCpuLimit: "700m", + patroniMemoryRequest: "250Mi", + patroniMemoryLimit: "1Gi", + patroniPvcSize: "3Gi", + patroniReplica: 2, + storageClass: "netapp-block-standard", + ocpName: `${ocpName}`, + rabbitmqCpuRequest: "250m", + rabbitmqCpuLimit: "400m", + rabbitmqMemoryRequest: "500Mi", + rabbitmqMemoryLimit: "1Gi", + rabbitmqPvcSize: "1Gi", + rabbitmqReplica: 2, + rabbitmqPostStartSleep: 120, + storageClass: "netapp-block-standard", + schemaSpyPublicCpuRequest: "50m", + schemaSpyPublicCpuLimit: "500m", + schemaSpyPublicMemoryRequest: "512Mi", + schemaSpyPublicMemoryLimit: "2Gi", + schemaSpyAuditCpuRequest: "50m", + schemaSpyAuditCpuLimit: "300m", + schemaSpyAuditMemoryRequest: "256Mi", + schemaSpyAuditMemoryLimit: "512Mi", + }, + prod: { + namespace: "0ab226-prod", + name: `${name}`, + phase: "prod", + changeId: changeId, + suffix: `-prod`, + instance: `${name}-prod`, + version: `${version}`, + tag: `prod-${version}`, + dbServiceName: "tfrs-crunchy-prod-pgbouncer", + frontendCpuRequest: "40m", + frontendCpuLimit: "80m", + frontendMemoryRequest: "60Mi", + frontendMemoryLimit: "120Mi", + frontendReplicas: 4, + frontendKeycloakAuthority: "https://loginproxy.gov.bc.ca/auth", + frontendKeycloakClientId: "tfrs-on-gold-4308", + frontendKeycloakCallbackUrl: "https://lowcarbonfuels.gov.bc.ca", + frontendKeycloakLogoutUrl: "https://lowcarbonfuels.gov.bc.ca", + frontendHost: "lowcarbonfuels.gov.bc.ca", + frontendSiteminderLogoutUrl: + "https://logon7.gov.bc.ca/clp-cgi/logoff.cgi?retnow=1&returl=", + frontendDebugEnabled: "false", + backendCpuRequest: "200m", + backendCpuLimit: "400m", + backendMemoryRequest: "600Mi", + backendMemoryLimit: "1200Mi", + backendHealthCheckDelay: 30, + backendHost: `tfrs-backend-prod.${ocpName}.gov.bc.ca`, + backendReplicas: 4, + backendKeycloakAudience: "tfrs-on-gold-4308", + backendWellKnownEndpoint: + "https://loginproxy.gov.bc.ca/auth/realms/standard/.well-known/openid-configuration", + backendKeycloakCertsUrl: + "https://loginproxy.gov.bc.ca/auth/realms/standard/protocol/openid-connect/certs", + celeryCpuRequest: "100m", + celeryCpuLimit: "250mm", + celeryMemoryRequest: "1600Mi", + celeryMemoryLimit: "3Gi", + scanHandlerCpuRequest: "25m", + scanHandlerCpuLimit: "50m", + scanHandlerMemoryRequest: "50Mi", + scanHandlerMemoryLimit: "100Mi", + scanCoordinatorCpuRequest: "50m", + scanCoordinatorCpuLimit: "100m", + scanCoordinatorMemoryRequest: "30Mi", + scanCoordinatorMemoryLimit: "60Mi", + notificationServerCpuRequest: "100m", + notificationServerCpuLimit: "200m", + notificationServerMemoryRequest: "120Mi", + notificationServerMemoryLimit: "240Mi", + patroniCpuRequest: "300m", + patroniCpuLimit: "600m", + patroniMemoryRequest: "500Mi", + patroniMemoryLimit: "2Gi", + patroniPvcSize: "10Gi", + patroniReplica: 3, + storageClass: "netapp-block-standard", + ocpName: `${ocpName}`, + rabbitmqCpuRequest: "250m", + rabbitmqCpuLimit: "400m", + rabbitmqMemoryRequest: "500Mi", + rabbitmqMemoryLimit: "1Gi", + rabbitmqPvcSize: "1Gi", + rabbitmqReplica: 2, + rabbitmqPostStartSleep: 120, + storageClass: "netapp-block-standard", + schemaSpyPublicCpuRequest: "50m", + schemaSpyPublicCpuLimit: "500m", + schemaSpyPublicMemoryRequest: "512Mi", + schemaSpyPublicMemoryLimit: "2Gi", + schemaSpyAuditCpuRequest: "50m", + schemaSpyAuditCpuLimit: "300m", + schemaSpyAuditMemoryRequest: "256Mi", + schemaSpyAuditMemoryLimit: "512Mi", + }, }; // This callback forces the node process to exit as failure. -process.on('unhandledRejection', (reason) => { +process.on("unhandledRejection", (reason) => { console.log(reason); process.exit(1); }); -module.exports = exports = {phases, options}; +module.exports = exports = { phases, options }; diff --git a/backend/api/serializers/ComplianceReport.py b/backend/api/serializers/ComplianceReport.py index 5b7f58741..1ab1634f6 100644 --- a/backend/api/serializers/ComplianceReport.py +++ b/backend/api/serializers/ComplianceReport.py @@ -1093,9 +1093,9 @@ def create(self, validated_data): while current is not None: if current.status.director_status_id == 'Accepted' and current.summary: - if current.summary.credits_offset > 0: + if current.summary.credits_offset is not None and current.summary.credits_offset > 0: total_accepted_reductions += current.summary.credits_offset - elif current.summary.credits_offset_b > 0: + elif current.summary.credits_offset_b is not None and current.summary.credits_offset_b > 0: total_accepted_reductions += current.summary.credits_offset_b current = current.supplements diff --git a/frontend/package.json b/frontend/package.json index 74b8885a5..7af5661d9 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,6 +1,6 @@ { "name": "tfrs", - "version": "2.20.0", + "version": "2.21.0", "dependencies": { "@babel/eslint-parser": "^7.19.1", "@babel/plugin-proposal-object-rest-spread": "^7.20.7", diff --git a/openshift-v4/templates/knp/2-allow-backend-accepts.yaml b/openshift-v4/templates/knp/2-allow-backend-accepts.yaml index 66d7bde24..98dec8b00 100644 --- a/openshift-v4/templates/knp/2-allow-backend-accepts.yaml +++ b/openshift-v4/templates/knp/2-allow-backend-accepts.yaml @@ -27,6 +27,17 @@ objects: - podSelector: matchLabels: name: tfrs-frontend-${ENVIRONMENT} + - ports: + - protocol: TCP + port: 8080 + from: + - namespaceSelector: + matchLabels: + environment: ${ENVIRONMENT} + name: d2bd59 + - podSelector: + matchLabels: + app.kubernetes.io/instance: lcfs-backend-${ENVIRONMENT} policyTypes: - Ingress status: {}