Skip to content

Commit

Permalink
Merge branch 'main' into feat/ehic-new-client
Browse files Browse the repository at this point in the history
  • Loading branch information
kodiakhq[bot] authored Oct 21, 2024
2 parents cd65d02 + 7c83ad4 commit 8547f55
Show file tree
Hide file tree
Showing 179 changed files with 4,429 additions and 1,742 deletions.
4 changes: 3 additions & 1 deletion .envrc
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,6 @@ fi

# Podman compatibility
# NOTE: Exits direnv if user is using docker.
source_env_if_exists .env.podman
source_env_if_exists .envrc.podman

source_env_if_exists .envrc.kube
24 changes: 24 additions & 0 deletions .envrc.kube
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash

set -euo pipefail

for c in kubectx kubectl aws; do
if ! command -v "$c" >/dev/null; then
echo "$c not installed"
return
fi
done

set-kubectx() {
: "${AWS_PROFILE:=}"
if kubectx | grep -q "${AWS_PROFILE##islandis-}"; then
return
fi
echo "Setting kube context..." >&2
AWS_ACCOUNT_ID="$(aws sts get-caller-identity | jq -r '.Account')"
kubectx "$(kubectx | grep "${AWS_ACCOUNT_ID}")"
CLUSTER="$(kubectl config current-context | sed 's/.*\///')"
export CLUSTER
}

set-kubectx
4 changes: 2 additions & 2 deletions .env.podman → .envrc.podman
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ set -euo pipefail
if [[ -n "${DOCKER_HOST:-}" ]] ||
command -v docker >/dev/null &&
! (docker --version | grep -i podman); then
exit 0
return 0
fi

echo "🐳 Using podman"

SOCKET_DIR="${XDG_RUNTIME_DIR:-/run/user/$(id -u)}"
if [[ -S /run/podman/podman.sock ]]; then
SOCKET_DIR="/run/podman"
exit 0
return 0
fi

export DOCKER_HOST=unix://$SOCKET_DIR/podman/podman.sock
Expand Down
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ TODO
*.todo
.env
.env.*
!.env.podman
.envrc.*
.envrc.private
.nvmrc
.node-version
# IDE - VSCode
Expand Down
5 changes: 0 additions & 5 deletions apps/air-discount-scheme/api/infra/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,6 @@ export const serviceSetup = (services: {
staging: ['loftbru', 'loftbru-cf'],
prod: ['loftbru'],
},
extraAnnotations: {
dev: {},
staging: {},
prod: {},
},
paths: ['/api/graphql'],
public: true,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,12 @@ export const serviceSetup = (): ServiceBuilder<'air-discount-scheme-backend'> =>
prod: 'loftbru',
},
extraAnnotations: {
dev: {},
staging: {},
dev: {
'nginx.ingress.kubernetes.io/enable-global-auth': 'false',
},
staging: {
'nginx.ingress.kubernetes.io/enable-global-auth': 'false',
},
prod: {},
},
paths: ['/api/swagger', '/api/public'],
Expand Down
1 change: 1 addition & 0 deletions apps/air-discount-scheme/web/infra/web.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ export const serviceSetup = (services: {
prod: {
'nginx.ingress.kubernetes.io/proxy-buffering': 'on',
'nginx.ingress.kubernetes.io/proxy-buffer-size': '8k',
'nginx.ingress.kubernetes.io/enable-global-auth': 'false',
'nginx.ingress.kubernetes.io/configuration-snippet':
'rewrite /$ https://island.is/loftbru; rewrite /en$ https://island.is/en/lower-airfares-for-residents-in-rural-areas;',
},
Expand Down
5 changes: 0 additions & 5 deletions apps/api/infra/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -450,11 +450,6 @@ export const serviceSetup = (services: {
prod: ['', 'www.island.is'],
},
paths: ['/api'],
extraAnnotations: {
dev: {},
staging: {},
prod: {},
},
public: true,
},
})
Expand Down
2 changes: 2 additions & 0 deletions apps/application-system/api/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ import { FriggClientConfig } from '@island.is/clients/mms/frigg'
import { smsModuleConfig } from '@island.is/nova-sms'
import { emailModuleConfig } from '@island.is/email-service'
import { sharedModuleConfig } from '@island.is/application/template-api-modules'
import { UserNotificationClientConfig } from '@island.is/clients/user-notification'

@Module({
imports: [
Expand Down Expand Up @@ -119,6 +120,7 @@ import { sharedModuleConfig } from '@island.is/application/template-api-modules'
smsModuleConfig,
emailModuleConfig,
sharedModuleConfig,
UserNotificationClientConfig,
],
}),
],
Expand Down
2 changes: 1 addition & 1 deletion apps/consultation-portal/screens/Case/Case.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"failure": "Ekki tókst á afskrá áskrift fyrir mál"
},
"loginCardSkeleton": {
"text": "Þú þarft að skrá þig inn á island.is til þess að geta skráð þig í eða úr áskrift.",
"text": "Þú þarft að skrá þig inn á Island.is til þess að geta skráð þig í eða úr áskrift.",
"button": "Skrá mig inn"
},
"setEmailCardSkeleton": {
Expand Down
5 changes: 0 additions & 5 deletions apps/contentful-apps/infra/contentful-apps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@ export const serviceSetup = (): ServiceBuilder<'contentful-apps'> =>
prod: 'contentful-apps',
},
paths: ['/'],
extraAnnotations: {
dev: {},
staging: {},
prod: {},
},
},
})
.replicaCount({
Expand Down
5 changes: 0 additions & 5 deletions apps/download-service/infra/download-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,6 @@ export const serviceSetup = (services: {
prod: ['api'],
},
paths: ['/download'],
extraAnnotations: {
dev: {},
staging: {},
prod: {},
},
public: true,
},
})
Expand Down
2 changes: 0 additions & 2 deletions apps/github-actions-cache/infra/github-actions-cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ export const serviceSetup = (): ServiceBuilder<'github-actions-cache'> => {
dev: {
'nginx.ingress.kubernetes.io/enable-global-auth': 'false',
},
staging: {},
prod: {},
},
public: true,
},
Expand Down
20 changes: 10 additions & 10 deletions apps/judicial-system/api/src/app/modules/auth/auth.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -256,16 +256,16 @@ export class AuthController {
? PRISON_CASES_ROUTE
: CASES_ROUTE,
}
} else {
const defender = await this.authService.findDefender(authUser.nationalId)

if (defender) {
return {
userId: defender.id,
userNationalId: defender.nationalId,
jwtToken: this.sharedAuthService.signJwt(defender, csrfToken),
redirectRoute: requestedRedirectRoute ?? DEFENDER_CASES_ROUTE,
}
}

const defender = await this.authService.findDefender(authUser.nationalId)

if (defender) {
return {
userId: defender.id,
userNationalId: defender.nationalId,
jwtToken: this.sharedAuthService.signJwt(defender, csrfToken),
redirectRoute: requestedRedirectRoute ?? DEFENDER_CASES_ROUTE,
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
'use strict'
const replaceEnum = require('sequelize-replace-enum-postgres').default

module.exports = {
up: (queryInterface) => {
// replaceEnum does not support transactions
return replaceEnum({
queryInterface,
tableName: 'notification',
columnName: 'type',
newValues: [
'HEADS_UP',
'READY_FOR_COURT',
'RECEIVED_BY_COURT',
'COURT_DATE',
'RULING',
'MODIFIED',
'REVOKED',
'DEFENDER_ASSIGNED',
'ADVOCATE_ASSIGNED',
'DEFENDANTS_NOT_UPDATED_AT_COURT',
'APPEAL_TO_COURT_OF_APPEALS',
'APPEAL_RECEIVED_BY_COURT',
'APPEAL_STATEMENT',
'APPEAL_COMPLETED',
'APPEAL_JUDGES_ASSIGNED',
'APPEAL_CASE_FILES_UPDATED',
'APPEAL_WITHDRAWN',
'INDICTMENT_DENIED',
'INDICTMENT_RETURNED',
'INDICTMENTS_WAITING_FOR_CONFIRMATION',
'SERVICE_SUCCESSFUL', // New value
'SERVICE_FAILED', // New value
'DEFENDANT_SELECTED_DEFENDER', // New value
],
enumName: 'enum_notification_type',
})
},

down: (queryInterface) => {
// replaceEnum does not support transactions
return replaceEnum({
queryInterface,
tableName: 'notification',
columnName: 'type',
newValues: [
'HEADS_UP',
'READY_FOR_COURT',
'RECEIVED_BY_COURT',
'COURT_DATE',
'RULING',
'MODIFIED',
'REVOKED',
'DEFENDER_ASSIGNED',
'DEFENDANTS_NOT_UPDATED_AT_COURT',
'APPEAL_TO_COURT_OF_APPEALS',
'APPEAL_RECEIVED_BY_COURT',
'APPEAL_STATEMENT',
'APPEAL_COMPLETED',
'APPEAL_JUDGES_ASSIGNED',
'APPEAL_CASE_FILES_UPDATED',
'APPEAL_WITHDRAWN',
'INDICTMENT_DENIED',
'INDICTMENT_RETURNED',
'INDICTMENTS_WAITING_FOR_CONFIRMATION',
],
enumName: 'enum_notification_type',
})
},
}
Loading

0 comments on commit 8547f55

Please sign in to comment.