Skip to content

Commit

Permalink
Merge branch 'main' into feat/bff-token-refresh-polling
Browse files Browse the repository at this point in the history
  • Loading branch information
kodiakhq[bot] authored Nov 29, 2024
2 parents 2cb31ac + 253bfe7 commit bfa90bc
Show file tree
Hide file tree
Showing 1,069 changed files with 41,661 additions and 24,140 deletions.
17 changes: 11 additions & 6 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
/apps/icelandic-names-registry*/ @island-is/juni
/apps/web/screens/PetitionView/ @island-is/juni
/libs/cms/ @island-is/juni @island-is/stefna
/libs/clients/cms/ @island-is/juni @island-is/aranja
/libs/residence-history @island-is/juni
/libs/api/domains/endorsement-system @island-is/juni
/libs/api/domains/icelandic-names-registry/ @island-is/juni
Expand Down Expand Up @@ -130,6 +131,9 @@ codemagic.yaml
/apps/portals/my-pages*/ @island-is/hugsmidjan
/apps/services/regulations-admin-backend/ @island-is/hugsmidjan
/apps/services/user-profile/ @island-is/hugsmidjan @island-is/juni @island-is/aranja
/apps/web/components/Grant/ @island-is/hugsmidjan
/apps/web/components/PlazaCard/ @island-is/hugsmidjan
/apps/web/screens/Grants/ @island-is/hugsmidjan
/apps/web/screens/Regulations/ @island-is/hugsmidjan
/apps/web/components/Regulations/ @island-is/hugsmidjan
/apps/web/screens/OfficialJournalOfIceland/ @island-is/hugsmidjan
Expand Down Expand Up @@ -194,7 +198,8 @@ codemagic.yaml
/libs/portals/admin/regulations-admin/ @island-is/hugsmidjan
/libs/portals/admin/document-provider/ @island-is/hugsmidjan @island-is/core
/libs/clients/icelandic-health-insurance/rights-portal/ @island-is/hugsmidjan
/libs/clients/health-directorate @island-is/hugsmidjan @island-is/origo
/libs/clients/health-directorate @island-is/hugsmidjan
/libs/clients/health-directorate/src/lib/clients/occupational-license @island-is/hugsmidjan @island-is/origo
/libs/clients/mms/grade @island-is/hugsmidjan
/libs/portals/admin/air-discount-scheme @island-is/hugsmidjan
/libs/application/templates/official-journal-of-iceland/ @island-is/hugsmidjan
Expand Down Expand Up @@ -229,6 +234,10 @@ codemagic.yaml
/libs/application/template-api-modules/src/lib/modules/templates/general-fishing-license/ @island-is/norda
/libs/application/template-api-modules/src/lib/modules/templates/data-protection-complaint/ @island-is/norda
/libs/shared/form-fields/ @island-is/norda @island-is/island-ui
/libs/clients/financial-statements-inao @island-is/norda
/libs/api/domains/financial-statements-inao/ @island-is/norda
/libs/application/templates/financial-statements-inao/ @island-is/norda
/libs/application/template-api-modules/src/lib/modules/templates/financial-statements-inao @island-is/norda

/libs/portals/my-pages/applications/ @island-is/norda-applications
/libs/portals/admin/application-system/ @island-is/norda-applications
Expand Down Expand Up @@ -310,10 +319,6 @@ codemagic.yaml

/apps/services/auth/personal-representative/ @island-is/programm @island-is/aranja
/apps/services/auth/personal-representative-public/ @island-is/programm @island-is/aranja
/libs/api/domains/financial-statements-inao/ @island-is/programm
/libs/clients/financial-statements-inao @island-is/programm
/libs/application/templates/financial-statements-inao/ @island-is/programm
/libs/application/template-api-modules/src/lib/modules/templates/financial-statements-inao @island-is/programm

/libs/application/templates/criminal-record/ @island-is/origo
/libs/application/template-api-modules/src/lib/modules/templates/criminal-record-submission/ @island-is/origo
Expand Down Expand Up @@ -388,7 +393,7 @@ codemagic.yaml

# QA
/apps/system-e2e/ @island-is/qa
/libs/testing/e2e @island-is/qa
/libs/testing/e2e @island-is/qa

# Islandis
/apps/system-e2e/src/tests/islandis/admin-portal/ @island-is/aranja
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/pullrequest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ jobs:
runs-on: ec2-runners
container:
image: public.ecr.aws/m3u4c4h9/island-is/actions-runner-public:latest
timeout-minutes: 35
timeout-minutes: 45
env:
AFFECTED_PROJECTS: ${{ matrix.projects }}
MAX_JOBS: 1
Expand Down Expand Up @@ -220,7 +220,7 @@ jobs:
runs-on: ec2-runners
container:
image: public.ecr.aws/m3u4c4h9/island-is/actions-runner-public:latest
timeout-minutes: 35
timeout-minutes: 45
env:
AFFECTED_PROJECT: ${{ matrix.projects }}
CYPRESS_PROJECT_ID: 4q7jz8
Expand Down Expand Up @@ -288,8 +288,7 @@ jobs:
with:
github_token: ${{ secrets.github_token }}
reporter: github-pr-review
fail_on_error: true
level: info
fail-level: info
exclude: >-
*/node_modules/*
Expand Down
105 changes: 105 additions & 0 deletions .github/workflows/revert-pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
name: Checksuit

on:
workflow_run:
workflows:
- Monorepo pipeline - build and deploy
types:
- completed
branches:
- main
pull_request:
types:
- opened
- synchronize
- labeled

permissions:
contents: write
pull-requests: write

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
detect-failure:
name: Determine Failure
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
runs-on: ec2-runners
container:
image: public.ecr.aws/m3u4c4h9/island-is/actions-runner-public:latest
outputs:
PR_NUMBER: ${{ steps.fetch-pr.outputs.PR_NUMBER }}
steps:
- uses: actions/checkout@v4

- name: Debug
run: |
echo "Conclusion: ${{ github.event.workflow_run.conclusion }}"
- name: Fetch PR
id: fetch-pr
run: |
COMMIT_SHA="${{ github.event.workflow_run.head_commit.id }}"
if ! PR_NUMBER=$(bash ./scripts/ci/get-pr.sh "$COMMIT_SHA"); then
echo "Error: Failed to get PR number for commit $COMMIT_SHA"
exit 1
fi
if [ -n "$PR_NUMBER" ]; then
echo "PR_NUMBER=$PR_NUMBER" >> $GITHUB_OUTPUT
else
echo "No merged PR found for commit $COMMIT_SHA."
fi
- name: Add Revert Label
id: add-revert-label
if: ${{ steps.fetch-pr.outputs.PR_NUMBER && github.event.workflow_run.conclusion == 'failure' }}
run: |
PR_NUMBER="${{ steps.fetch-pr.outputs.PR_NUMBER }}"
if [ -z "$PR_NUMBER" ]; then
echo "Error: PR number is empty"
exit 1
fi
echo "Adding revert label to PR: $PR_NUMBER"
if ! gh pr edit "$PR_NUMBER" --add-label "revert"; then
echo "Error: Failed to add revert label"
exit 1
fi
create-revert-pr:
name: Automated PR revert
needs: detect-failure
if: ${{ needs.detect-failure.outputs.PR_NUMBER && github.event.workflow_run.conclusion == 'failure' }}
runs-on: ec2-runners
container:
image: public.ecr.aws/m3u4c4h9/island-is/actions-runner-public:latest
steps:
- name: Debug
run: |
PR_NUMBER=${{ needs.detect-failure.outputs.PR_NUMBER }}
echo "Reverting PR: $PR_NUMBER"
- name: Execute PR revert
if: ${{ vars.ENABLE_PR_REVERT == 'true' }}
run: |
REVERT_PR=$(bash ./scripts/ci/revert-pr.sh "$PR_NUMBER")
gh pr edit $REVERT_PR --add-label "automerge,high priority"
manual-revert-pr:
name: Manual PR revert
runs-on: ec2-runners
container:
image: public.ecr.aws/m3u4c4h9/island-is/actions-runner-public:latest
if: ${{ github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'revert') && (github.event.pull_request.merged == true || github.event.pull_request.draft == true) && github.actor != 'github-actions' }}
steps:
- name: Debug
run: |
echo "actor: ${{ github.actor }}"
echo "Reverting PR: ${{ github.event.pull_request.number }}"
- name: Execute PR revert
if: ${{ vars.ENABLE_PR_REVERT == 'true' }}
run: |
REVERT_PR=$(bash ./scripts/ci/revert-pr.sh "${{ github.event.pull_request.number }}")
gh pr edit $REVERT_PR --add-label "automerge,high priority"
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ Run on whenever you check out a branch:

```bash
yarn install
yarn infra install
(cd infra/ && yarn install)
yarn codegen
```

Expand Down
8 changes: 4 additions & 4 deletions apps/application-system/api/infra/application-system-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -346,11 +346,11 @@ export const serviceSetup = (services: {
})
.db()
.migrations()
.liveness('/liveness')
.readiness('/liveness')
.liveness({ path: '/liveness', initialDelaySeconds: 20 })
.readiness({ path: '/liveness', initialDelaySeconds: 20 })
.resources({
limits: { cpu: '400m', memory: '1024Mi' },
requests: { cpu: '75m', memory: '512Mi' },
limits: { cpu: '600m', memory: '1024Mi' },
requests: { cpu: '200m', memory: '512Mi' },
})
.replicaCount({
default: 2,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,10 @@ import { ApplicationResponseDto } from './dto/application.response.dto'
import { PresignedUrlResponseDto } from './dto/presignedUrl.response.dto'
import { AssignApplicationDto } from './dto/assignApplication.dto'
import { verifyToken } from './utils/tokenUtils'
import { getApplicationLifecycle } from './utils/application'
import {
getApplicationLifecycle,
removeObjectWithKeyFromAnswers,
} from './utils/application'
import { DecodedAssignmentToken } from './types'
import { ApplicationAccessService } from './tools/applicationAccess.service'
import { CurrentLocale } from './utils/currentLocale'
Expand Down Expand Up @@ -870,6 +873,10 @@ export class ApplicationController {
existingApplication.id,
{
attachments: omit(existingApplication.attachments, key),
answers: removeObjectWithKeyFromAnswers(
existingApplication.answers,
key,
),
},
)

Expand Down
Loading

0 comments on commit bfa90bc

Please sign in to comment.