Skip to content

Commit

Permalink
Merge branch 'main' into fix_submitterId
Browse files Browse the repository at this point in the history
  • Loading branch information
anna-parker authored Jul 25, 2024
2 parents a436549 + f9e6075 commit 5e007a9
Show file tree
Hide file tree
Showing 7 changed files with 107 additions and 41 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/format-backend-on-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Format Backend Code
on:
workflow_dispatch:
pull_request:
types: [synchronize, labeled]
paths:
- "backend/**"
jobs:
format:
if: github.event_name == 'workflow_dispatch' || (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'format_me'))
permissions:
contents: write
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}

- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: "21"
distribution: "adopt"

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3

- name: Format Backend Code
run: ./gradlew ktlintFormat
working-directory: ./backend

- name: Commit and Push Changes
run: |
git config --global user.name 'Loculus bot'
git config --global user.email 'bot@loculus.org'
git add -A
git commit -m "Automated backend code formatting" || echo "No changes to commit"
git push origin HEAD:${{ github.head_ref }}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
emailVerificationSubject=Verify email
emailVerificationBody=Someone has created a new account with this email address. If this was you, click the link below to verify your email address\n\n{0}\n\nThis link will expire within {3}.\n\nIf you didn''t create this account, just ignore this message.
emailVerificationBodyHtml=<p>Someone has created a new account with this email address. If this was you, click the link below to verify your email address</p><p><a href="{0}">Link to e-mail address verification</a></p><p>This link will expire within {3}.</p><p>If you didn''t create this account, just ignore this message.</p>
emailVerificationSubject=Verify email to complete account creation
emailVerificationBody=Welcome!\n\nWe''ve received a request to create a new account using this email address. To complete your registration and verify your email, please click the link below:\n\n{0}\n\nFor your security, this verification link will expire in {3}.\n\nIf you didn''t initiate this account creation, no action is needed. You can safely disregard this message.\n\nIf you have any questions or concerns, please contact our support team.
emailVerificationBodyHtml=<p>Welcome!</p><p>We''ve received a request to create a new account using this email address. To complete your registration and verify your email, please click the link below:</p><p><a href="{0}">Verify your email address</a></p><p>For your security, this verification link will expire in {3}.</p><p>If you didn''t initiate this account creation, no action is needed. You can safely disregard this message.</p><p>If you have any questions or concerns, please contact our support team.</p>
emailUpdateConfirmationSubject=Verify new email
emailUpdateConfirmationBody=To update your {2} account with email address {1}, click the link below\n\n{0}\n\nThis link will expire within {3}.\n\nIf you don''t want to proceed with this modification, just ignore this message.
emailUpdateConfirmationBodyHtml=<p>To update your {2} account with email address {1}, click the link below</p><p><a href="{0}">{0}</a></p><p>This link will expire within {3}.</p><p>If you don''t want to proceed with this modification, just ignore this message.</p>
Expand Down
77 changes: 41 additions & 36 deletions kubernetes/appset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,52 +4,57 @@ kind: ApplicationSet
metadata:
name: pp-preview
namespace: argocd
resourceVersion: "33491144"
spec:
goTemplate: true
generators:
- pullRequest:
github:
owner: loculus-project
labels:
- preview
repo: loculus
tokenRef:
key: token
secretName: github-access-token
requeueAfterSeconds: 60
- git:
repoURL: https://github.com/loculus-project/argocd_metadata.git
revision: HEAD
files:
- path: "config.json"
- pullRequest:
github:
labels:
- preview
owner: loculus-project
repo: loculus
tokenRef:
key: token
secretName: github-access-token
requeueAfterSeconds: 60
- git:
files:
- path: config.json
repoURL: https://github.com/loculus-project/argocd_metadata.git
revision: HEAD
goTemplate: true
template:
metadata:
name: 'pp-{{ (printf "%.25s" .branch) | replace "_" "-" | replace "/" "-" | trimSuffix "-" | lower }}-{{.number}}'
name: pp-{{ (printf "%.25s" .branch) | replace "_" "-" | replace "/" "-" | trimSuffix "-" | lower }}-{{.number}}
spec:
destination:
server: 'https://kubernetes.default.svc'
namespace: 'prev-{{ (printf "%.25s" .branch) | replace "_" "-" | replace "/" "-" | trimSuffix "-" | lower }}'
namespace: prev-{{ (printf "%.25s" .branch) | replace "_" "-" | replace "/" "-" | trimSuffix "-" | lower }}
server: https://kubernetes.default.svc
project: default
source:
path: 'kubernetes/loculus/'
repoURL: 'https://github.com/loculus-project/loculus.git'
targetRevision: '{{.branch}}'
helm:
parameters:
- name: shortbranch
value: '{{ (printf "%.25s" .branch) | replace "_" "-" | replace "/" "-" | trimSuffix "-" | lower }}'
- name: namespace # TODO(https://github.com/loculus-project/loculus/issues/979) delete this once no unsynced up branches need it
value: 'preview-{{ (printf "%.25s" .branch) | replace "_" "-" | replace "/" "-" | trimSuffix "-" | lower }}'
- name: sha
value: '{{.head_short_sha_7}}'
- name: branch
value: '{{.branch}}'
- name: host
value: '{{ (printf "%.25s" .branch) | replace "_" "-" | replace "/" "-" | trimSuffix "-" | lower }}.loculus.org'
- name: shortbranch
value: '{{ (printf "%.25s" .branch) | replace "_" "-" | replace "/" "-"
| trimSuffix "-" | lower }}'
- name: sha
value: '{{.head_short_sha_7}}'
- name: branch
value: '{{.branch}}'
- name: bannerMessage
value: Dev build, data will not be persisted. SHA {{.head_short_sha_7}}
- name: host
value: '{{ (printf "%.25s" .branch) | replace "_" "-" | replace "/" "-"
| trimSuffix "-" | lower }}.loculus.org'
valueFiles:
- values.yaml
- values_preview_server.yaml
path: kubernetes/loculus/
repoURL: https://github.com/loculus-project/loculus.git
targetRevision: '{{.branch}}'
syncPolicy:
syncOptions:
- CreateNamespace=true
automated:
selfHeal: true
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true
- ServerSideApply=true
7 changes: 7 additions & 0 deletions kubernetes/loculus/templates/_config-processor.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@
mountPath: /output
command: ["python3"]
args: ["/app/config-processor.py", "/input", "/output"]
resources:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 500m
memory: 256Mi
env:
- name: LOCULUSSUB_smtpPassword
valueFrom:
Expand Down
7 changes: 7 additions & 0 deletions kubernetes/loculus/templates/ena-submission-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@ spec:
initContainers:
- name: ena-submission-flyway
image: "ghcr.io/loculus-project/ena-submission-flyway:{{ $dockerTag }}"
resources:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 500m
memory: 256Mi
command: ['flyway', 'migrate']
env:
- name: FLYWAY_URL
Expand Down
7 changes: 7 additions & 0 deletions kubernetes/loculus/templates/keycloak-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@ spec:
initContainers:
{{- include "loculus.configProcessor" (dict "name" "keycloak-config" "dockerTag" $dockerTag) | nindent 8 }}
- name: keycloak-theme-prep
resources:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 500m
memory: 256Mi
image: "ghcr.io/loculus-project/keycloakify:{{ $dockerTag }}"
volumeMounts:
- name: theme-volume
Expand Down
4 changes: 2 additions & 2 deletions kubernetes/loculus/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1162,8 +1162,8 @@ insecureCookies: false
bannerMessage: "This is a development environment. Data will not be persisted."
additionalHeadHTML: '<script defer data-domain="main.loculus.org" src="https://plausible.io/js/script.js"></script>'
images:
lapisSilo: "ghcr.io/genspectrum/lapis-silo:0.2.7"
lapis: "ghcr.io/genspectrum/lapis:0.2.3"
lapisSilo: "ghcr.io/genspectrum/lapis-silo:0.2.11"
lapis: "ghcr.io/genspectrum/lapis:0.2.7"
secrets:
smtp-password:
type: raw
Expand Down

0 comments on commit 5e007a9

Please sign in to comment.