From a2d107d8a96db21ad559e3449d74ebd8de098a09 Mon Sep 17 00:00:00 2001 From: alxndrsn Date: Mon, 9 Nov 2026 12:42:46 +0000 Subject: [PATCH 01/75] ci: test db backup & restore Closes #2318 --- test/package.json | 4 ++- test/test-db-backup-restore.sh | 54 ++++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+), 1 deletion(-) create mode 100755 test/test-db-backup-restore.sh diff --git a/test/package.json b/test/package.json index bf36d59d7..7b4043459 100644 --- a/test/package.json +++ b/test/package.json @@ -6,7 +6,9 @@ "test:nginx": "npm run test:nginx:mocha && npm run test:nginx:playwright", "test:nginx:mocha": "NODE_TLS_REJECT_UNAUTHORIZED=0 mocha './nginx/src/mocha/**/*.spec.js' --require ./nginx/src/mocha/mocha.setup.js", "test:nginx:playwright": "NODE_TLS_REJECT_UNAUTHORIZED=0 playwright test", - "test:service": "mocha ./service/service.spec.js", + "test:service": "npm run test:service:mocha && npm run test:service:db-backup-restore", + "test:service:db-backup-restore": "./test-db-backup-restore.sh", + "test:service:mocha": "mocha ./service/service.spec.js", "test": "npm run lint && npm run test:github-actions && npm run test:nginx && npm run test:service" }, "dependencies": { diff --git a/test/test-db-backup-restore.sh b/test/test-db-backup-restore.sh new file mode 100755 index 000000000..0eaa26837 --- /dev/null +++ b/test/test-db-backup-restore.sh @@ -0,0 +1,54 @@ +#!/bin/bash -eux +set -o pipefail +shopt -s inherit_errexit + +log() { echo >&2 "[$(basename "$0")] $*"; } + +test_backup_restore() { + local testDescription="$1" + local passphrase="$2" + local tmpConfig + tmpConfig="$(mktemp)" + backupsDir="$(mktemp --directory)" + + log "Testing backup $testDescription..." + + log "Writing curl config file..." + cat >"$tmpConfig" < Date: Mon, 9 Nov 2026 12:47:52 +0000 Subject: [PATCH 02/75] add docs --- test/test-db-backup-restore.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/test-db-backup-restore.sh b/test/test-db-backup-restore.sh index 0eaa26837..77b2a373b 100755 --- a/test/test-db-backup-restore.sh +++ b/test/test-db-backup-restore.sh @@ -4,6 +4,18 @@ shopt -s inherit_errexit log() { echo >&2 "[$(basename "$0")] $*"; } +# Test integration of various packages & compatibility between versions, including: +# +# * pg_dump & pg_restore inside service container +# * postgres version in postgres14 container +# * openssl version in service container +# * openssl version in postgres14 container +# +# NOTE the backup, verify & restore commands/processes used in these tests should +# follow the official documentation as closely as possible. +# +# See: https://docs.getodk.org/central-backup/ + test_backup_restore() { local testDescription="$1" local passphrase="$2" From 9f8a4668bfbda019fd2bbf9d2ea40420e140a6df Mon Sep 17 00:00:00 2001 From: alxndrsn Date: Mon, 9 Nov 2026 12:48:20 +0000 Subject: [PATCH 03/75] shellcheck --- test/test-db-backup-restore.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test-db-backup-restore.sh b/test/test-db-backup-restore.sh index 77b2a373b..1290b1097 100755 --- a/test/test-db-backup-restore.sh +++ b/test/test-db-backup-restore.sh @@ -1,4 +1,4 @@ -#!/bin/bash -eux +#!/bin/bash -eu set -o pipefail shopt -s inherit_errexit From e980f78e9e7da3b9a45f09d808602f3a43d1af68 Mon Sep 17 00:00:00 2001 From: alxndrsn Date: Mon, 9 Nov 2026 12:52:51 +0000 Subject: [PATCH 04/75] shellcheck --- test/test-db-backup-restore.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/test-db-backup-restore.sh b/test/test-db-backup-restore.sh index 1290b1097..3fbe94a44 100755 --- a/test/test-db-backup-restore.sh +++ b/test/test-db-backup-restore.sh @@ -46,13 +46,16 @@ EOF curl --config "$tmpConfig" log "Identifying backup file..." - backupFile="$backupsDir"/* + # TODO this likely needs some work + backupFile="$(find "$backupsDir" -type f)" log "Backup found at: $backupFile" log "Verifying backup..." openssl enc -d -chacha20 -pbkdf2 -pass "pass:$passphrase" <"$backupFile" | pg_restore --file /dev/null log "Restoring backup..." + # N.B. "useless use of cat" deliberately echoes documented command at https://docs.getodk.org/central-backup/#restoring-a-backup + # shellcheck disable=SC2002 cat "$backupFile" | docker compose exec -T service node /usr/odk/lib/bin/restore.js - "$passphrase" } From 96d7c96d281f0c9e0c5aa1e47b64c7d34540e922 Mon Sep 17 00:00:00 2001 From: alxndrsn Date: Mon, 9 Nov 2026 12:56:32 +0000 Subject: [PATCH 05/75] streamline ci --- .github/workflows/close-issues.yml | 47 ---------- .github/workflows/main.yml | 139 +---------------------------- 2 files changed, 1 insertion(+), 185 deletions(-) delete mode 100644 .github/workflows/close-issues.yml diff --git a/.github/workflows/close-issues.yml b/.github/workflows/close-issues.yml deleted file mode 100644 index 2041ab485..000000000 --- a/.github/workflows/close-issues.yml +++ /dev/null @@ -1,47 +0,0 @@ -name: Close Issues on PR Merge to Next - -on: - pull_request: - types: - - closed - -jobs: - close_issues: - if: github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'next' - runs-on: ubuntu-24.04 - permissions: - issues: write - pull-requests: read - - steps: - - name: Parse and close linked issues - uses: actions/github-script@v7 - with: - script: | - const body = context.payload.pull_request.body || ""; - const closedIssues = new Set(); - const issueRegex = /(Close|Closes|Closed|Fix|Fixes|Fixed|Resolve|Resolves|Resolved)\s*:?\s+(?:(?:https:\/\/)?github.com\/getodk\/central\/issues\/|getodk\/central#|#)(\d+)/gi; - let match; - - while ((match = issueRegex.exec(body)) !== null) { - const issueNumber = Number(match[2]); - if (!closedIssues.has(issueNumber)) { - closedIssues.add(issueNumber); - try { - await github.rest.issues.update({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: issueNumber, - state: 'closed' - }); - console.log(`Closed issue #${issueNumber}`); - } catch (e) { - console.error(e); - console.error(`Could not automatically close issue #${issueNumber}. Skipping issue.`); - } - } - } - - if (closedIssues.size === 0) { - console.log("No issues found to close."); - } diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2371d1cbf..9ac004f05 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -19,53 +19,8 @@ jobs: - run: docker --version - run: docker compose version - uses: actions/checkout@v5 - - run: ./test/check-submodules.sh - - run: ./test/test-with-pgenvblock.sh - run: sudo apt-get install shellcheck - run: ./test/check-scripts.sh - - run: ./test/check-for-large-files.sh - - run: ./test/check-dockerfiles.sh - - run: cd test && npm clean-install --no-audit - - run: cd test && npm run lint - - run: cd test && npm run test:github-actions - test-envsub: - timeout-minutes: 2 - runs-on: ubuntu-24.04 - steps: - - uses: actions/checkout@v5 - - run: cd test/envsub && ./run-tests.sh - test-nginx: - timeout-minutes: 4 - runs-on: ubuntu-24.04 - steps: - - uses: actions/checkout@v5 - - uses: actions/setup-node@v5 - with: - node-version-file: test/package.json - - run: cd test && npm clean-install --no-audit - - run: cd test/nginx && ./setup-tests.sh - - run: cd test && npm run test:nginx:mocha - - run: cd test/nginx && ./lint-config.sh - - - run: cd test && npx playwright install --with-deps chromium-headless-shell - - run: cd test && npm run test:nginx:playwright - - - if: always() - run: cd test/nginx && docker compose -f nginx.test.docker-compose.yml logs --no-log-prefix nginx-ssl-selfsign - - if: always() - run: cd test/nginx && docker compose -f nginx.test.docker-compose.yml logs --no-log-prefix nginx-ssl-upstream - - if: always() - run: cd test/nginx && docker compose -f nginx.test.docker-compose.yml logs --no-log-prefix service - - if: always() - run: cd test/nginx && docker compose -f nginx.test.docker-compose.yml logs --no-log-prefix enketo - - if: always() - run: cd test/nginx && docker compose -f nginx.test.docker-compose.yml logs --no-log-prefix sentry-mock - test-secrets: - timeout-minutes: 2 - runs-on: ubuntu-24.04 - steps: - - uses: actions/checkout@v5 - - run: ./test/test-secrets.sh test-service: timeout-minutes: 5 runs-on: ubuntu-24.04 @@ -78,96 +33,4 @@ jobs: node-version-file: test/package.json - run: cd test && npm clean-install --no-audit - run: touch ./files/allow-postgres14-upgrade - - run: cd test && npm run test:service - test-images: - timeout-minutes: 10 - needs: - - test-misc - - test-envsub - - test-nginx - - test-secrets - - test-service - runs-on: ubuntu-24.04 # TODO matrix to run on all expected versions? - steps: - - uses: actions/checkout@v5 - with: - fetch-depth: 0 - fetch-tags: true - submodules: recursive - - - run: ./test/check-docker-context.sh --min-size 5000 --max-size 10000 --min-count 650 --max-count 750 - - - run: ./files/ci/extract-frontend-version.sh - - run: FRONTEND_BUILD_MODE=fetch ./test/test-images.sh - - # Check out the current frontend version referenced by docker-compose, as it should build OK. - - run: | - git clone \ - --depth 1 \ - --branch "$FRONTEND_VERSION" \ - https://github.com/getodk/central-frontend.git \ - client - - run: FRONTEND_BUILD_MODE=source ./test/test-images.sh - - - if: always() - run: docker compose logs - build-push-image: - if: | - (github.event_name == 'workflow_dispatch' && inputs.publish_images == true) || - (github.event_name != 'workflow_dispatch' && ( - github.ref == 'refs/heads/master' || - startsWith(github.ref, 'refs/tags/v') - )) - needs: - - test-images - runs-on: ubuntu-24.04 - permissions: - contents: read - packages: write - strategy: - matrix: - image: [nginx, service] - env: - REGISTRY: ghcr.io - steps: - - name: Checkout repository - uses: actions/checkout@v5 - with: - fetch-depth: 0 - fetch-tags: true - submodules: recursive - - name: Log into registry ${{ env.REGISTRY }} - uses: docker/login-action@v4 - with: - registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - name: Show Docker Context - run: ./test/check-docker-context.sh --report - - - name: Extract Docker metadata - id: meta - uses: docker/metadata-action@v6 - with: - images: ${{ env.REGISTRY }}/${{ github.repository_owner }}/central-${{ matrix.image }} - - - name: Set up QEMU emulator for multi-arch images - uses: docker/setup-qemu-action@v4 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v4 - - - run: ./files/ci/extract-frontend-version.sh - - - name: Build and push ${{ matrix.image }} Docker image - uses: docker/build-push-action@v7 - with: - file: ${{ matrix.image }}.dockerfile - context: . - push: true - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} - platforms: 'linux/amd64,linux/arm64' - build-args: | - FRONTEND_BUILD_MODE=fetch - FRONTEND_VERSION=${{ env.FRONTEND_VERSION }} + - run: cd test && npm run test:service:db-backup-restore From 5d7de8487924805064a453521af75a3f8a6b3faf Mon Sep 17 00:00:00 2001 From: alxndrsn Date: Mon, 9 Nov 2026 12:57:57 +0000 Subject: [PATCH 06/75] touch env --- test/test-db-backup-restore.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/test/test-db-backup-restore.sh b/test/test-db-backup-restore.sh index 3fbe94a44..260bde517 100755 --- a/test/test-db-backup-restore.sh +++ b/test/test-db-backup-restore.sh @@ -60,6 +60,7 @@ EOF } log "Starting containers..." +touch .env docker compose up log "Ensuring admin user exists..." docker compose exec --no-tty service node /usr/odk/lib/bin/cli From acb9b62d053eb1e615a15b00e31c6c3464f0cc05 Mon Sep 17 00:00:00 2001 From: alxndrsn Date: Mon, 9 Nov 2026 13:00:19 +0000 Subject: [PATCH 07/75] touch higher --- test/test-db-backup-restore.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test-db-backup-restore.sh b/test/test-db-backup-restore.sh index 260bde517..fed0ca903 100755 --- a/test/test-db-backup-restore.sh +++ b/test/test-db-backup-restore.sh @@ -60,7 +60,7 @@ EOF } log "Starting containers..." -touch .env +touch ../.env docker compose up log "Ensuring admin user exists..." docker compose exec --no-tty service node /usr/odk/lib/bin/cli From cb38fa52e6b9441282e44273caba331089f52027 Mon Sep 17 00:00:00 2001 From: alxndrsn Date: Mon, 9 Nov 2026 13:03:38 +0000 Subject: [PATCH 08/75] try to separate things abit --- .github/workflows/main.yml | 2 ++ test/test-db-backup-restore.sh | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9ac004f05..38850051d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -28,6 +28,8 @@ jobs: - uses: actions/checkout@v5 with: submodules: true + - run: touch .env + - run: docker compose pull --include-deps service - uses: actions/setup-node@v5 with: node-version-file: test/package.json diff --git a/test/test-db-backup-restore.sh b/test/test-db-backup-restore.sh index fed0ca903..d953d6fbf 100755 --- a/test/test-db-backup-restore.sh +++ b/test/test-db-backup-restore.sh @@ -61,7 +61,7 @@ EOF log "Starting containers..." touch ../.env -docker compose up +docker compose up service log "Ensuring admin user exists..." docker compose exec --no-tty service node /usr/odk/lib/bin/cli log "Starting backup/restore tests..." From 3a93c6d128780a757a9487be94e58d1ee2997d5c Mon Sep 17 00:00:00 2001 From: alxndrsn Date: Mon, 9 Nov 2026 13:07:40 +0000 Subject: [PATCH 09/75] envstuff --- test/test-db-backup-restore.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/test-db-backup-restore.sh b/test/test-db-backup-restore.sh index d953d6fbf..71edb075c 100755 --- a/test/test-db-backup-restore.sh +++ b/test/test-db-backup-restore.sh @@ -60,7 +60,9 @@ EOF } log "Starting containers..." -touch ../.env +echo 'SSL_TYPE=selfsign +DOMAIN=local +SYSADMIN_EMAIL=no-reply@getodk.org' > ../.env docker compose up service log "Ensuring admin user exists..." docker compose exec --no-tty service node /usr/odk/lib/bin/cli From 5eedd7cd38655a9abba0e3a374e1c3b0cc2041ff Mon Sep 17 00:00:00 2001 From: alxndrsn Date: Mon, 9 Nov 2026 13:15:25 +0000 Subject: [PATCH 10/75] background docker --- test/test-db-backup-restore.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/test-db-backup-restore.sh b/test/test-db-backup-restore.sh index 71edb075c..4bfc0fccb 100755 --- a/test/test-db-backup-restore.sh +++ b/test/test-db-backup-restore.sh @@ -63,7 +63,11 @@ log "Starting containers..." echo 'SSL_TYPE=selfsign DOMAIN=local SYSADMIN_EMAIL=no-reply@getodk.org' > ../.env -docker compose up service +docker compose up --detach service + +log "Waiting for service to become available..." +sleep 30 # TODO do this properly + log "Ensuring admin user exists..." docker compose exec --no-tty service node /usr/odk/lib/bin/cli log "Starting backup/restore tests..." From cb6eb2b49bdd9260b3efd79e5cdc4e281c9ba6dc Mon Sep 17 00:00:00 2001 From: alxndrsn Date: Mon, 9 Nov 2026 13:20:59 +0000 Subject: [PATCH 11/75] --build --- test/test-db-backup-restore.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test-db-backup-restore.sh b/test/test-db-backup-restore.sh index 4bfc0fccb..a71b9e645 100755 --- a/test/test-db-backup-restore.sh +++ b/test/test-db-backup-restore.sh @@ -63,7 +63,7 @@ log "Starting containers..." echo 'SSL_TYPE=selfsign DOMAIN=local SYSADMIN_EMAIL=no-reply@getodk.org' > ../.env -docker compose up --detach service +docker compose up --build --detach service log "Waiting for service to become available..." sleep 30 # TODO do this properly From 1e6fc981dccfb3807f9586d4cb728f704caec770 Mon Sep 17 00:00:00 2001 From: alxndrsn Date: Mon, 9 Nov 2026 13:21:21 +0000 Subject: [PATCH 12/75] -T --- test/test-db-backup-restore.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test-db-backup-restore.sh b/test/test-db-backup-restore.sh index a71b9e645..c7e3c5769 100755 --- a/test/test-db-backup-restore.sh +++ b/test/test-db-backup-restore.sh @@ -69,7 +69,7 @@ log "Waiting for service to become available..." sleep 30 # TODO do this properly log "Ensuring admin user exists..." -docker compose exec --no-tty service node /usr/odk/lib/bin/cli +docker compose exec -T service node /usr/odk/lib/bin/cli log "Starting backup/restore tests..." test_backup_restore "without passphrase" "" test_backup_restore "with passphrase" "hunter2" From 7406fbdaade35ebd93d246a19ae39d643702a13e Mon Sep 17 00:00:00 2001 From: alxndrsn Date: Mon, 9 Nov 2026 13:21:37 +0000 Subject: [PATCH 13/75] wait-for-http-response --- test/nginx/setup-tests.sh | 25 +++---------------------- test/test-db-backup-restore.sh | 2 +- test/wait-for-http-response.sh | 23 +++++++++++++++++++++++ 3 files changed, 27 insertions(+), 23 deletions(-) create mode 100644 test/wait-for-http-response.sh diff --git a/test/nginx/setup-tests.sh b/test/nginx/setup-tests.sh index 44774afaa..fb375ecb0 100755 --- a/test/nginx/setup-tests.sh +++ b/test/nginx/setup-tests.sh @@ -8,33 +8,14 @@ docker_compose() { docker compose --file nginx.test.docker-compose.yml "$@" } -wait_for_http_response() { - local seconds="$1" - local url="$2" - local expectedStatus="${3-200}" - echo >&2 -n "[$(basename "$0")] [$(date)] Waiting for server: $url " - if timeout "$seconds" bash -c -- " - until [[ \$(curl --max-time 1 --silent --output /dev/null -w '%{http_code}' '$url') = \"$expectedStatus\" ]]; do - printf >&2 . - sleep 0.25 - done - "; then - printf >&2 '✅\n' - else - printf >&2 '❌\n' - log "!!! URL timed out: $url" - exit 1 - fi -} - log "Starting test services..." docker_compose up --build --detach log "Waiting for mock backend..." -wait_for_http_response 5 localhost:8383/__mock_http_server/health 200 +../wait-for-http-response.sh 5 localhost:8383/__mock_http_server/health 200 log "Waiting for mock enketo..." -wait_for_http_response 5 localhost:8005/__mock_http_server/health 200 +../wait-for-http-response.sh 5 localhost:8005/__mock_http_server/health 200 log "Waiting for nginx..." -wait_for_http_response 5 localhost:9000 421 +../wait-for-http-response.sh 5 localhost:9000 421 log "Completed OK." diff --git a/test/test-db-backup-restore.sh b/test/test-db-backup-restore.sh index c7e3c5769..e5fc49413 100755 --- a/test/test-db-backup-restore.sh +++ b/test/test-db-backup-restore.sh @@ -66,7 +66,7 @@ SYSADMIN_EMAIL=no-reply@getodk.org' > ../.env docker compose up --build --detach service log "Waiting for service to become available..." -sleep 30 # TODO do this properly +./wait-for-http-response.sh 30 localhost:8383 log "Ensuring admin user exists..." docker compose exec -T service node /usr/odk/lib/bin/cli diff --git a/test/wait-for-http-response.sh b/test/wait-for-http-response.sh new file mode 100644 index 000000000..d31f2e3a4 --- /dev/null +++ b/test/wait-for-http-response.sh @@ -0,0 +1,23 @@ +#!/bin/bash -eu +set -o pipefail +shopt -s inherit_errexit + +log() { echo >&2 "[$(basename "$0")] $*"; } + +seconds="$1" +url="$2" +expectedStatus="${3-200}" + +echo >&2 -n "[$(basename "$0")] [$(date)] Waiting for server: $url " +if timeout "$seconds" bash -c -- " + until [[ \$(curl --max-time 1 --silent --output /dev/null -w '%{http_code}' '$url') = \"$expectedStatus\" ]]; do + printf >&2 . + sleep 0.25 + done +"; then + printf >&2 '✅\n' +else + printf >&2 '❌\n' + log "!!! URL timed out: $url" + exit 1 +fi From 97fe0632bf47ad141e42c50a9a2cfaf298265780 Mon Sep 17 00:00:00 2001 From: alxndrsn Date: Mon, 9 Nov 2026 13:21:59 +0000 Subject: [PATCH 14/75] wait- --- test/wait-for-http-response.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 test/wait-for-http-response.sh diff --git a/test/wait-for-http-response.sh b/test/wait-for-http-response.sh old mode 100644 new mode 100755 From 9dcdd826e232a1d0bd850c58686cf2092ec7cb8f Mon Sep 17 00:00:00 2001 From: alxndrsn Date: Mon, 9 Nov 2026 13:25:46 +0000 Subject: [PATCH 15/75] wip --- test/test-db-backup-restore.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/test-db-backup-restore.sh b/test/test-db-backup-restore.sh index e5fc49413..b77768b58 100755 --- a/test/test-db-backup-restore.sh +++ b/test/test-db-backup-restore.sh @@ -66,7 +66,9 @@ SYSADMIN_EMAIL=no-reply@getodk.org' > ../.env docker compose up --build --detach service log "Waiting for service to become available..." -./wait-for-http-response.sh 30 localhost:8383 +sleep 30 # FIXME wait better +#./wait-for-http-response.sh 30 localhost:8383 +docker ps # FIXME remove this log "Ensuring admin user exists..." docker compose exec -T service node /usr/odk/lib/bin/cli From bc2ec23e1f81250753f8b691b86c968461f77022 Mon Sep 17 00:00:00 2001 From: alxndrsn Date: Mon, 9 Nov 2026 13:39:34 +0000 Subject: [PATCH 16/75] create admin user --- test/test-db-backup-restore.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/test-db-backup-restore.sh b/test/test-db-backup-restore.sh index b77768b58..40f714d92 100755 --- a/test/test-db-backup-restore.sh +++ b/test/test-db-backup-restore.sh @@ -28,7 +28,7 @@ test_backup_restore() { log "Writing curl config file..." cat >"$tmpConfig" < Date: Mon, 9 Nov 2026 13:43:22 +0000 Subject: [PATCH 17/75] echo admin password at curl --- test/test-db-backup-restore.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/test-db-backup-restore.sh b/test/test-db-backup-restore.sh index 40f714d92..1675e09d4 100755 --- a/test/test-db-backup-restore.sh +++ b/test/test-db-backup-restore.sh @@ -16,6 +16,8 @@ log() { echo >&2 "[$(basename "$0")] $*"; } # # See: https://docs.getodk.org/central-backup/ +adminPassword="topSecret-$RANDOM|123" + test_backup_restore() { local testDescription="$1" local passphrase="$2" @@ -43,7 +45,7 @@ write-out = "%{onerror}%{stderr}\n\n\n\tAN ERROR OCCURRED AND YOUR BACKUP WAS NO EOF log "Backing up..." - curl --config "$tmpConfig" + echo "$adminPassword" | curl --config "$tmpConfig" log "Identifying backup file..." # TODO this likely needs some work @@ -71,7 +73,6 @@ sleep 30 # FIXME wait better docker ps # FIXME remove this log "Ensuring admin user exists..." -adminPassword="topSecret-$RANDOM|123" echo "$adminPassword" | docker compose exec -T service node /usr/odk/lib/bin/cli --email test-admin@example.test user-create docker compose exec -T service node /usr/odk/lib/bin/cli --email test-admin@example.test user-promote log "Starting backup/restore tests..." From 56c45da08f7329518a69d9647de5395297c67605 Mon Sep 17 00:00:00 2001 From: alxndrsn Date: Mon, 9 Nov 2026 13:55:47 +0000 Subject: [PATCH 18/75] try wiaint properly; fix port --- test/test-db-backup-restore.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test-db-backup-restore.sh b/test/test-db-backup-restore.sh index 1675e09d4..06d140689 100755 --- a/test/test-db-backup-restore.sh +++ b/test/test-db-backup-restore.sh @@ -29,7 +29,7 @@ test_backup_restore() { log "Writing curl config file..." cat >"$tmpConfig" < Date: Mon, 9 Nov 2026 13:56:38 +0000 Subject: [PATCH 19/75] parameterise serviceHost --- test/test-db-backup-restore.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/test-db-backup-restore.sh b/test/test-db-backup-restore.sh index 06d140689..96951fb6d 100755 --- a/test/test-db-backup-restore.sh +++ b/test/test-db-backup-restore.sh @@ -17,6 +17,7 @@ log() { echo >&2 "[$(basename "$0")] $*"; } # See: https://docs.getodk.org/central-backup/ adminPassword="topSecret-$RANDOM|123" +serviceHost="127.0.0.1:8383" test_backup_restore() { local testDescription="$1" @@ -29,7 +30,7 @@ test_backup_restore() { log "Writing curl config file..." cat >"$tmpConfig" < Date: Mon, 9 Nov 2026 14:03:44 +0000 Subject: [PATCH 20/75] relax waiting --- test/test-db-backup-restore.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/test-db-backup-restore.sh b/test/test-db-backup-restore.sh index 96951fb6d..c1d7e9691 100755 --- a/test/test-db-backup-restore.sh +++ b/test/test-db-backup-restore.sh @@ -70,7 +70,8 @@ docker compose up --build --detach service log "Waiting for service to become available..." sleep 30 # FIXME wait better -./wait-for-http-response.sh 30 "$serviceHost" +curl --head "$serviceHost" +./wait-for-http-response.sh 30 "$serviceHost" || true docker ps # FIXME remove this log "Ensuring admin user exists..." From c247281d49471053d5e117e19326286d2f8e4961 Mon Sep 17 00:00:00 2001 From: alxndrsn Date: Mon, 9 Nov 2026 14:06:27 +0000 Subject: [PATCH 21/75] skip wait-for-it --- test/test-db-backup-restore.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test-db-backup-restore.sh b/test/test-db-backup-restore.sh index c1d7e9691..ee030f400 100755 --- a/test/test-db-backup-restore.sh +++ b/test/test-db-backup-restore.sh @@ -71,7 +71,7 @@ docker compose up --build --detach service log "Waiting for service to become available..." sleep 30 # FIXME wait better curl --head "$serviceHost" -./wait-for-http-response.sh 30 "$serviceHost" || true +#./wait-for-http-response.sh 30 "$serviceHost" || true docker ps # FIXME remove this log "Ensuring admin user exists..." From 27485e8ee4fa592d9132a6fdd1e94f5959b124ce Mon Sep 17 00:00:00 2001 From: alxndrsn Date: Mon, 9 Nov 2026 14:10:32 +0000 Subject: [PATCH 22/75] more logging, more curling --- test/test-db-backup-restore.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/test-db-backup-restore.sh b/test/test-db-backup-restore.sh index ee030f400..d4fb493c4 100755 --- a/test/test-db-backup-restore.sh +++ b/test/test-db-backup-restore.sh @@ -70,7 +70,10 @@ docker compose up --build --detach service log "Waiting for service to become available..." sleep 30 # FIXME wait better -curl --head "$serviceHost" +log "curling $serviceHost..." +curl --head "$serviceHost" || true +log "curling localhost:8383..." +curl --head "http://localhost:8383" || true #./wait-for-http-response.sh 30 "$serviceHost" || true docker ps # FIXME remove this From 59df1bbcc5608931647f1a3464165d3e42020e8c Mon Sep 17 00:00:00 2001 From: alxndrsn Date: Mon, 9 Nov 2026 14:13:59 +0000 Subject: [PATCH 23/75] add container logs --- .github/workflows/main.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 38850051d..91e763001 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -36,3 +36,17 @@ jobs: - run: cd test && npm clean-install --no-audit - run: touch ./files/allow-postgres14-upgrade - run: cd test && npm run test:service:db-backup-restore + - if: always() + run: cd test/nginx && docker compose -f nginx.test.docker-compose.yml logs --no-log-prefix nginx-ssl-selfsign + - if: always() + run: cd test/nginx && docker compose -f nginx.test.docker-compose.yml logs --no-log-prefix nginx-ssl-upstream + - if: always() + run: cd test/nginx && docker compose -f nginx.test.docker-compose.yml logs --no-log-prefix service + - if: always() + run: cd test/nginx && docker compose -f nginx.test.docker-compose.yml logs --no-log-prefix enketo + - if: always() + run: cd test/nginx && docker compose -f nginx.test.docker-compose.yml logs --no-log-prefix sentry-mock + - if: always() + run: cd test/nginx && docker compose -f nginx.test.docker-compose.yml logs --no-log-prefix postgres + - if: always() + run: cd test/nginx && docker compose -f nginx.test.docker-compose.yml logs --no-log-prefix postgres14 From bc005bd6aa87ce6babd5312572b1d7dbe433a5ba Mon Sep 17 00:00:00 2001 From: alxndrsn Date: Tue, 10 Nov 2026 10:47:42 +0000 Subject: [PATCH 24/75] move to test-images --- .github/workflows/main.yml | 54 +++++++++++---------- test/test-db-backup-restore.sh | 86 ---------------------------------- test/test-images.sh | 69 +++++++++++++++++++++++++++ 3 files changed, 98 insertions(+), 111 deletions(-) delete mode 100755 test/test-db-backup-restore.sh diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 91e763001..a31b43e2d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -19,34 +19,38 @@ jobs: - run: docker --version - run: docker compose version - uses: actions/checkout@v5 + - run: ./test/check-submodules.sh + - run: ./test/test-with-pgenvblock.sh - run: sudo apt-get install shellcheck - run: ./test/check-scripts.sh - test-service: - timeout-minutes: 5 - runs-on: ubuntu-24.04 + - run: ./test/check-for-large-files.sh + - run: ./test/check-dockerfiles.sh + - run: cd test && npm clean-install --no-audit + - run: cd test && npm run lint + - run: cd test && npm run test:github-actions + test-images: + timeout-minutes: 10 + runs-on: ubuntu-24.04 # TODO matrix to run on all expected versions? steps: - uses: actions/checkout@v5 with: - submodules: true - - run: touch .env - - run: docker compose pull --include-deps service - - uses: actions/setup-node@v5 - with: - node-version-file: test/package.json - - run: cd test && npm clean-install --no-audit - - run: touch ./files/allow-postgres14-upgrade - - run: cd test && npm run test:service:db-backup-restore - - if: always() - run: cd test/nginx && docker compose -f nginx.test.docker-compose.yml logs --no-log-prefix nginx-ssl-selfsign - - if: always() - run: cd test/nginx && docker compose -f nginx.test.docker-compose.yml logs --no-log-prefix nginx-ssl-upstream - - if: always() - run: cd test/nginx && docker compose -f nginx.test.docker-compose.yml logs --no-log-prefix service - - if: always() - run: cd test/nginx && docker compose -f nginx.test.docker-compose.yml logs --no-log-prefix enketo - - if: always() - run: cd test/nginx && docker compose -f nginx.test.docker-compose.yml logs --no-log-prefix sentry-mock - - if: always() - run: cd test/nginx && docker compose -f nginx.test.docker-compose.yml logs --no-log-prefix postgres + fetch-depth: 0 + fetch-tags: true + submodules: recursive + + - run: ./test/check-docker-context.sh --min-size 5000 --max-size 10000 --min-count 650 --max-count 750 + + - run: ./files/ci/extract-frontend-version.sh + - run: FRONTEND_BUILD_MODE=fetch ./test/test-images.sh + + # Check out the current frontend version referenced by docker-compose, as it should build OK. + - run: | + git clone \ + --depth 1 \ + --branch "$FRONTEND_VERSION" \ + https://github.com/getodk/central-frontend.git \ + client + - run: FRONTEND_BUILD_MODE=source ./test/test-images.sh + - if: always() - run: cd test/nginx && docker compose -f nginx.test.docker-compose.yml logs --no-log-prefix postgres14 + run: docker compose logs diff --git a/test/test-db-backup-restore.sh b/test/test-db-backup-restore.sh deleted file mode 100755 index d4fb493c4..000000000 --- a/test/test-db-backup-restore.sh +++ /dev/null @@ -1,86 +0,0 @@ -#!/bin/bash -eu -set -o pipefail -shopt -s inherit_errexit - -log() { echo >&2 "[$(basename "$0")] $*"; } - -# Test integration of various packages & compatibility between versions, including: -# -# * pg_dump & pg_restore inside service container -# * postgres version in postgres14 container -# * openssl version in service container -# * openssl version in postgres14 container -# -# NOTE the backup, verify & restore commands/processes used in these tests should -# follow the official documentation as closely as possible. -# -# See: https://docs.getodk.org/central-backup/ - -adminPassword="topSecret-$RANDOM|123" -serviceHost="127.0.0.1:8383" - -test_backup_restore() { - local testDescription="$1" - local passphrase="$2" - local tmpConfig - tmpConfig="$(mktemp)" - backupsDir="$(mktemp --directory)" - - log "Testing backup $testDescription..." - - log "Writing curl config file..." - cat >"$tmpConfig" < ../.env -docker compose up --build --detach service - -log "Waiting for service to become available..." -sleep 30 # FIXME wait better -log "curling $serviceHost..." -curl --head "$serviceHost" || true -log "curling localhost:8383..." -curl --head "http://localhost:8383" || true -#./wait-for-http-response.sh 30 "$serviceHost" || true -docker ps # FIXME remove this - -log "Ensuring admin user exists..." -echo "$adminPassword" | docker compose exec -T service node /usr/odk/lib/bin/cli --email test-admin@example.test user-create - docker compose exec -T service node /usr/odk/lib/bin/cli --email test-admin@example.test user-promote -log "Starting backup/restore tests..." -test_backup_restore "without passphrase" "" -test_backup_restore "with passphrase" "hunter2" -log "All tests completed OK." diff --git a/test/test-images.sh b/test/test-images.sh index 3849fa3c0..a74845b91 100755 --- a/test/test-images.sh +++ b/test/test-images.sh @@ -93,4 +93,73 @@ if [[ "$processCount" != 4 ]]; then exit 1 fi +log "Verifying db backup/restore..." +# Test integration of various packages & compatibility between versions, including: +# +# * pg_dump & pg_restore inside service container +# * postgres version in postgres14 container +# * openssl version in service container +# * openssl version in postgres14 container +# +# NOTE the backup, verify & restore commands/processes used in these tests should +# follow the official documentation as closely as possible. +# +# See: https://docs.getodk.org/central-backup/ + +adminPassword="topSecret-$RANDOM|123" +serviceHost="127.0.0.1:8989" + +test_backup_restore() { + local testDescription="$1" + local passphrase="$2" + local tmpConfig + tmpConfig="$(mktemp)" + backupsDir="$(mktemp --directory)" + + log "Testing backup $testDescription..." + + log "Writing curl config file..." + cat >"$tmpConfig" < Date: Tue, 10 Nov 2026 10:52:01 +0000 Subject: [PATCH 25/75] fix path --- test/test-images.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test-images.sh b/test/test-images.sh index a74845b91..7491bd815 100755 --- a/test/test-images.sh +++ b/test/test-images.sh @@ -153,7 +153,7 @@ EOF } log "Waiting for service to become available..." -./wait-for-http-response.sh 30 "$serviceHost" || true +./test/wait-for-http-response.sh 30 "$serviceHost" || true log "Ensuring admin user exists..." echo "$adminPassword" | docker compose exec -T service node /usr/odk/lib/bin/cli --email test-admin@example.test user-create From 440f56dd40f54ef2746f192d32790b07d3940675 Mon Sep 17 00:00:00 2001 From: alxndrsn Date: Tue, 10 Nov 2026 10:52:24 +0000 Subject: [PATCH 26/75] ps --- test/test-images.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/test-images.sh b/test/test-images.sh index 7491bd815..fa4a03d05 100755 --- a/test/test-images.sh +++ b/test/test-images.sh @@ -152,6 +152,9 @@ EOF cat "$backupFile" | docker compose exec -T service node /usr/odk/lib/bin/restore.js - "$passphrase" } +# FIXME debug remove +docker ps + log "Waiting for service to become available..." ./test/wait-for-http-response.sh 30 "$serviceHost" || true From ebefe6e40b461b1553538df6e458d2908ac99249 Mon Sep 17 00:00:00 2001 From: alxndrsn Date: Tue, 10 Nov 2026 10:55:35 +0000 Subject: [PATCH 27/75] try localhost https --- test/test-images.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/test-images.sh b/test/test-images.sh index fa4a03d05..9a7e798b9 100755 --- a/test/test-images.sh +++ b/test/test-images.sh @@ -107,7 +107,7 @@ log "Verifying db backup/restore..." # See: https://docs.getodk.org/central-backup/ adminPassword="topSecret-$RANDOM|123" -serviceHost="127.0.0.1:8989" +nginxHost="https://localhost" test_backup_restore() { local testDescription="$1" @@ -120,7 +120,7 @@ test_backup_restore() { log "Writing curl config file..." cat >"$tmpConfig" < Date: Tue, 10 Nov 2026 10:59:27 +0000 Subject: [PATCH 28/75] insecure --- test/test-images.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test-images.sh b/test/test-images.sh index 9a7e798b9..93fb53109 100755 --- a/test/test-images.sh +++ b/test/test-images.sh @@ -136,7 +136,7 @@ write-out = "%{onerror}%{stderr}\n\n\n\tAN ERROR OCCURRED AND YOUR BACKUP WAS NO EOF log "Backing up..." - echo "$adminPassword" | curl --config "$tmpConfig" + echo "$adminPassword" | curl --insecure --config "$tmpConfig" log "Identifying backup file..." # TODO this likely needs some work From f19bb0f789f605337a876092cfa58d880cbd20af Mon Sep 17 00:00:00 2001 From: alxndrsn Date: Tue, 10 Nov 2026 11:00:36 +0000 Subject: [PATCH 29/75] alignment --- test/test-images.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test-images.sh b/test/test-images.sh index 93fb53109..41ab21b3f 100755 --- a/test/test-images.sh +++ b/test/test-images.sh @@ -101,8 +101,8 @@ log "Verifying db backup/restore..." # * openssl version in service container # * openssl version in postgres14 container # -# NOTE the backup, verify & restore commands/processes used in these tests should -# follow the official documentation as closely as possible. +# NOTE the backup, verify & restore commands, processes & config used in these +# tests should follow the official documentation as closely as possible. # # See: https://docs.getodk.org/central-backup/ From d6f4dd4445ffdfc8fe95deced7003e01e5fbc908 Mon Sep 17 00:00:00 2001 From: alxndrsn Date: Tue, 10 Nov 2026 11:24:43 +0000 Subject: [PATCH 30/75] resolve --- test/test-images.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test-images.sh b/test/test-images.sh index 41ab21b3f..18c446fc7 100755 --- a/test/test-images.sh +++ b/test/test-images.sh @@ -120,7 +120,7 @@ test_backup_restore() { log "Writing curl config file..." cat >"$tmpConfig" < Date: Tue, 10 Nov 2026 11:28:20 +0000 Subject: [PATCH 31/75] CIULORP --- test/test-images.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test-images.sh b/test/test-images.sh index 18c446fc7..a54a00e9c 100755 --- a/test/test-images.sh +++ b/test/test-images.sh @@ -136,7 +136,7 @@ write-out = "%{onerror}%{stderr}\n\n\n\tAN ERROR OCCURRED AND YOUR BACKUP WAS NO EOF log "Backing up..." - echo "$adminPassword" | curl --insecure --resolve local:127.0.0.1 --config "$tmpConfig" + echo "$adminPassword" | curl --insecure --resolve local:443:127.0.0.1 --config "$tmpConfig" log "Identifying backup file..." # TODO this likely needs some work From c534d04d054857b84a9e96cb9e38c8337d3c380d Mon Sep 17 00:00:00 2001 From: alxndrsn Date: Tue, 10 Nov 2026 11:35:07 +0000 Subject: [PATCH 32/75] use --pass --- test/test-images.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/test-images.sh b/test/test-images.sh index a54a00e9c..38321133d 100755 --- a/test/test-images.sh +++ b/test/test-images.sh @@ -136,7 +136,11 @@ write-out = "%{onerror}%{stderr}\n\n\n\tAN ERROR OCCURRED AND YOUR BACKUP WAS NO EOF log "Backing up..." - echo "$adminPassword" | curl --insecure --resolve local:443:127.0.0.1 --config "$tmpConfig" + curl \ + --pass "$adminPassword" \ + --insecure \ + --resolve local:443:127.0.0.1 \ + --config "$tmpConfig" log "Identifying backup file..." # TODO this likely needs some work From 127f1e2b364b3362ac3cf599ba7b27bbdd09a82c Mon Sep 17 00:00:00 2001 From: alxndrsn Date: Tue, 10 Nov 2026 11:37:13 +0000 Subject: [PATCH 33/75] try --user : --- test/test-images.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test-images.sh b/test/test-images.sh index 38321133d..05cde5a7f 100755 --- a/test/test-images.sh +++ b/test/test-images.sh @@ -137,7 +137,7 @@ EOF log "Backing up..." curl \ - --pass "$adminPassword" \ + --user ":$adminPassword" \ --insecure \ --resolve local:443:127.0.0.1 \ --config "$tmpConfig" From e3001903ef7a8bf4249486c82fbab2a0259c0f3c Mon Sep 17 00:00:00 2001 From: alxndrsn Date: Tue, 10 Nov 2026 11:38:55 +0000 Subject: [PATCH 34/75] centralise password --- test/test-images.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/test/test-images.sh b/test/test-images.sh index 05cde5a7f..5837f4255 100755 --- a/test/test-images.sh +++ b/test/test-images.sh @@ -106,7 +106,8 @@ log "Verifying db backup/restore..." # # See: https://docs.getodk.org/central-backup/ -adminPassword="topSecret-$RANDOM|123" +adminUserEmail=odk-central-admin@example.test +adminUserPword="topSecret-$RANDOM|123" nginxHost="https://localhost" test_backup_restore() { @@ -121,7 +122,7 @@ test_backup_restore() { log "Writing curl config file..." cat >"$tmpConfig" < Date: Tue, 10 Nov 2026 11:47:35 +0000 Subject: [PATCH 35/75] user in ocning --- test/test-images.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/test-images.sh b/test/test-images.sh index 5837f4255..459d7b864 100755 --- a/test/test-images.sh +++ b/test/test-images.sh @@ -122,7 +122,7 @@ test_backup_restore() { log "Writing curl config file..." cat >"$tmpConfig" < Date: Tue, 10 Nov 2026 11:52:30 +0000 Subject: [PATCH 36/75] more debug --- test/test-images.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/test-images.sh b/test/test-images.sh index 459d7b864..703fcbced 100755 --- a/test/test-images.sh +++ b/test/test-images.sh @@ -138,6 +138,8 @@ EOF log "Backing up..." curl \ + --trace-ascii \ + --verbose \ --insecure \ --resolve local:443:127.0.0.1 \ --config "$tmpConfig" From 6afd045c9e276ce19c717918393433fc3e7e71ac Mon Sep 17 00:00:00 2001 From: alxndrsn Date: Tue, 10 Nov 2026 11:57:52 +0000 Subject: [PATCH 37/75] notraceascii --- test/test-images.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/test/test-images.sh b/test/test-images.sh index 703fcbced..28dc33ad5 100755 --- a/test/test-images.sh +++ b/test/test-images.sh @@ -138,7 +138,6 @@ EOF log "Backing up..." curl \ - --trace-ascii \ --verbose \ --insecure \ --resolve local:443:127.0.0.1 \ From a98d88c132c59dd5ce0389e0650d990909e08615 Mon Sep 17 00:00:00 2001 From: alxndrsn Date: Thu, 12 Nov 2026 17:23:07 +0000 Subject: [PATCH 38/75] restore close-iosses --- .github/workflows/close-issues.yml | 47 ++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/close-issues.yml diff --git a/.github/workflows/close-issues.yml b/.github/workflows/close-issues.yml new file mode 100644 index 000000000..2041ab485 --- /dev/null +++ b/.github/workflows/close-issues.yml @@ -0,0 +1,47 @@ +name: Close Issues on PR Merge to Next + +on: + pull_request: + types: + - closed + +jobs: + close_issues: + if: github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'next' + runs-on: ubuntu-24.04 + permissions: + issues: write + pull-requests: read + + steps: + - name: Parse and close linked issues + uses: actions/github-script@v7 + with: + script: | + const body = context.payload.pull_request.body || ""; + const closedIssues = new Set(); + const issueRegex = /(Close|Closes|Closed|Fix|Fixes|Fixed|Resolve|Resolves|Resolved)\s*:?\s+(?:(?:https:\/\/)?github.com\/getodk\/central\/issues\/|getodk\/central#|#)(\d+)/gi; + let match; + + while ((match = issueRegex.exec(body)) !== null) { + const issueNumber = Number(match[2]); + if (!closedIssues.has(issueNumber)) { + closedIssues.add(issueNumber); + try { + await github.rest.issues.update({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: issueNumber, + state: 'closed' + }); + console.log(`Closed issue #${issueNumber}`); + } catch (e) { + console.error(e); + console.error(`Could not automatically close issue #${issueNumber}. Skipping issue.`); + } + } + } + + if (closedIssues.size === 0) { + console.log("No issues found to close."); + } From ad7ec3d330d4c3661dd6f4bdba884c500280a39a Mon Sep 17 00:00:00 2001 From: alxndrsn Date: Thu, 12 Nov 2026 17:33:16 +0000 Subject: [PATCH 39/75] Avoid curl: (18) transfer closed with outstanding read data remaining --- files/nginx/odk.conf.template | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/files/nginx/odk.conf.template b/files/nginx/odk.conf.template index d98dd3ae5..5f9257375 100644 --- a/files/nginx/odk.conf.template +++ b/files/nginx/odk.conf.template @@ -211,6 +211,11 @@ server { proxy_request_buffering on; proxy_buffering on; proxy_read_timeout 2m; + + # Disable proxy buffering for backup downloads to prevent chunk truncation + location = /v1/backup { + proxy_buffering off; + } } location @blank.html { From 2e538edf3c79bdc59369b7e50139393254971bff Mon Sep 17 00:00:00 2001 From: alxndrsn Date: Thu, 12 Nov 2026 17:40:15 +0000 Subject: [PATCH 40/75] try smarter --- files/nginx/odk.conf.template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/nginx/odk.conf.template b/files/nginx/odk.conf.template index 5f9257375..827668d02 100644 --- a/files/nginx/odk.conf.template +++ b/files/nginx/odk.conf.template @@ -213,7 +213,7 @@ server { proxy_read_timeout 2m; # Disable proxy buffering for backup downloads to prevent chunk truncation - location = /v1/backup { + location ~ /v\d/backup { proxy_buffering off; } } From dd4149dc050d9a9212f975496ad044e396e47595 Mon Sep 17 00:00:00 2001 From: alxndrsn Date: Thu, 12 Nov 2026 17:44:46 +0000 Subject: [PATCH 41/75] try mapping --- files/nginx/odk.conf.template | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/files/nginx/odk.conf.template b/files/nginx/odk.conf.template index 827668d02..35e7d142e 100644 --- a/files/nginx/odk.conf.template +++ b/files/nginx/odk.conf.template @@ -114,6 +114,12 @@ map $upstream_http_content_security_policy $central_backend_csp { default $upstream_http_content_security_policy; } +# Disable proxy buffering for backup downloads to prevent chunk truncation +map $uri $backend_proxy_buffering { + ~^/v1/backup$ "off"; + default "on"; +} + server { listen 443 ssl; http2 on; @@ -209,13 +215,8 @@ server { proxy_redirect off; proxy_request_buffering on; - proxy_buffering on; + proxy_buffering $backend_proxy_buffering; proxy_read_timeout 2m; - - # Disable proxy buffering for backup downloads to prevent chunk truncation - location ~ /v\d/backup { - proxy_buffering off; - } } location @blank.html { From ec131e14406934adc1ba6124859b15ec8c5622bf Mon Sep 17 00:00:00 2001 From: alxndrsn Date: Thu, 12 Nov 2026 17:51:51 +0000 Subject: [PATCH 42/75] on/off --- files/nginx/odk.conf.template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/files/nginx/odk.conf.template b/files/nginx/odk.conf.template index 35e7d142e..856ff317d 100644 --- a/files/nginx/odk.conf.template +++ b/files/nginx/odk.conf.template @@ -116,8 +116,8 @@ map $upstream_http_content_security_policy $central_backend_csp { # Disable proxy buffering for backup downloads to prevent chunk truncation map $uri $backend_proxy_buffering { - ~^/v1/backup$ "off"; - default "on"; + ~^/v1/backup$ off; + default on; } server { From dd5dcda11bd8ae213a63ce39f1773fbd5edb7e40 Mon Sep 17 00:00:00 2001 From: alxndrsn Date: Thu, 12 Nov 2026 18:06:50 +0000 Subject: [PATCH 43/75] try separate file & routes --- files/nginx/central-backend.conf | 11 +++++++++++ files/nginx/odk.conf.template | 24 ++++++------------------ nginx.dockerfile | 1 + 3 files changed, 18 insertions(+), 18 deletions(-) create mode 100644 files/nginx/central-backend.conf diff --git a/files/nginx/central-backend.conf b/files/nginx/central-backend.conf new file mode 100644 index 000000000..91b53fc24 --- /dev/null +++ b/files/nginx/central-backend.conf @@ -0,0 +1,11 @@ +proxy_hide_header Content-Security-Policy; +add_header Content-Security-Policy $central_backend_csp always; + +include /usr/share/odk/nginx/common-headers.conf; + +proxy_set_header X-Forwarded-Proto $scheme; +proxy_pass http://service:8383; +proxy_redirect off; + +proxy_request_buffering on; +proxy_read_timeout 2m; diff --git a/files/nginx/odk.conf.template b/files/nginx/odk.conf.template index 856ff317d..207a7e1cf 100644 --- a/files/nginx/odk.conf.template +++ b/files/nginx/odk.conf.template @@ -114,12 +114,6 @@ map $upstream_http_content_security_policy $central_backend_csp { default $upstream_http_content_security_policy; } -# Disable proxy buffering for backup downloads to prevent chunk truncation -map $uri $backend_proxy_buffering { - ~^/v1/backup$ off; - default on; -} - server { listen 443 ssl; http2 on; @@ -205,18 +199,12 @@ server { # central-backend location ~ ^/v\d { - proxy_hide_header Content-Security-Policy; - add_header Content-Security-Policy $central_backend_csp always; - - include /usr/share/odk/nginx/common-headers.conf; - - proxy_set_header X-Forwarded-Proto $scheme; - proxy_pass http://service:8383; - proxy_redirect off; - - proxy_request_buffering on; - proxy_buffering $backend_proxy_buffering; - proxy_read_timeout 2m; + include /usr/share/odk/nginx/central-backend.conf; + proxy_buffering on; + } + location = /v1/backup { + include /usr/share/odk/nginx/central-backend.conf; + proxy_buffering off; } location @blank.html { diff --git a/nginx.dockerfile b/nginx.dockerfile index 65eeb07d4..797d2739e 100644 --- a/nginx.dockerfile +++ b/nginx.dockerfile @@ -42,6 +42,7 @@ COPY files/nginx/setup-odk.sh \ COPY files/nginx/redirector.conf /usr/share/odk/nginx/ COPY files/nginx/common-headers.conf /usr/share/odk/nginx/ +COPY files/nginx/central-backend.conf /usr/share/odk/nginx/ COPY files/nginx/robots.txt /usr/share/nginx/html COPY --from=intermediate dist/ /usr/share/nginx/html COPY --from=intermediate /tmp/version.txt /usr/share/nginx/html From 877ced0eb953e78e1a6a2a1a9d44071f6048990b Mon Sep 17 00:00:00 2001 From: alxndrsn Date: Fri, 13 Nov 2026 06:17:50 +0000 Subject: [PATCH 44/75] specify backup file; disable remote-header-name --- test/test-images.sh | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/test/test-images.sh b/test/test-images.sh index 28dc33ad5..d13154fd7 100755 --- a/test/test-images.sh +++ b/test/test-images.sh @@ -129,25 +129,22 @@ http1.1 show-error fail remote-name -remote-header-name +#remote-header-name # disabled; maybe not a good recommendation? FIXME research if docs should be updated to remove this remove-on-error no-clobber create-dirs write-out = "%{onerror}%{stderr}\n\n\n\tAN ERROR OCCURRED AND YOUR BACKUP WAS NOT SAVED\n\n\n" EOF - log "Backing up..." + backupFile="$backupsDir/backup.enc.bin" + log "Backing up to $backupFile ..." curl \ --verbose \ --insecure \ --resolve local:443:127.0.0.1 \ + --output "$backupFile" \ --config "$tmpConfig" - log "Identifying backup file..." - # TODO this likely needs some work - backupFile="$(find "$backupsDir" -type f)" - log "Backup found at: $backupFile" - log "Verifying backup..." openssl enc -d -chacha20 -pbkdf2 -pass "pass:$passphrase" <"$backupFile" | pg_restore --file /dev/null From 761604a6e0f13760e5031448c061d33afab4e490 Mon Sep 17 00:00:00 2001 From: alxndrsn Date: Fri, 13 Nov 2026 06:25:10 +0000 Subject: [PATCH 45/75] don't duplicate backupsDir in path --- test/test-images.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test-images.sh b/test/test-images.sh index d13154fd7..09c0c8f64 100755 --- a/test/test-images.sh +++ b/test/test-images.sh @@ -136,7 +136,7 @@ create-dirs write-out = "%{onerror}%{stderr}\n\n\n\tAN ERROR OCCURRED AND YOUR BACKUP WAS NOT SAVED\n\n\n" EOF - backupFile="$backupsDir/backup.enc.bin" + backupFile="backup.enc.bin" log "Backing up to $backupFile ..." curl \ --verbose \ From dc21f773b279da779392d582c42e78e82d58b673 Mon Sep 17 00:00:00 2001 From: alxndrsn Date: Fri, 13 Nov 2026 06:27:00 +0000 Subject: [PATCH 46/75] reverse conf order --- files/nginx/odk.conf.template | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/files/nginx/odk.conf.template b/files/nginx/odk.conf.template index 207a7e1cf..f7bc9a4c7 100644 --- a/files/nginx/odk.conf.template +++ b/files/nginx/odk.conf.template @@ -198,14 +198,14 @@ server { # End of Enketo Configuration. # central-backend - location ~ ^/v\d { - include /usr/share/odk/nginx/central-backend.conf; - proxy_buffering on; - } location = /v1/backup { include /usr/share/odk/nginx/central-backend.conf; proxy_buffering off; } + location ~ ^/v\d { + include /usr/share/odk/nginx/central-backend.conf; + proxy_buffering on; + } location @blank.html { root /usr/share/nginx/html; From 8a00612a8b269a0d03318f099368c389ff8a1555 Mon Sep 17 00:00:00 2001 From: alxndrsn Date: Fri, 13 Nov 2026 06:28:44 +0000 Subject: [PATCH 47/75] ghttp 1 --- test/test-images.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/test-images.sh b/test/test-images.sh index 09c0c8f64..2ddb3350f 100755 --- a/test/test-images.sh +++ b/test/test-images.sh @@ -143,7 +143,9 @@ EOF --insecure \ --resolve local:443:127.0.0.1 \ --output "$backupFile" \ - --config "$tmpConfig" + --config "$tmpConfig" \ + --http1.0 + # FIXME remove http1.0 - just trying to get things working, but this is not a permanent solution log "Verifying backup..." openssl enc -d -chacha20 -pbkdf2 -pass "pass:$passphrase" <"$backupFile" | pg_restore --file /dev/null From 0b6db54df05a1b83d5377072d6557ba547a448eb Mon Sep 17 00:00:00 2001 From: alxndrsn Date: Fri, 13 Nov 2026 06:32:36 +0000 Subject: [PATCH 48/75] fix path? --- test/test-images.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test-images.sh b/test/test-images.sh index 2ddb3350f..b8892a8ad 100755 --- a/test/test-images.sh +++ b/test/test-images.sh @@ -116,6 +116,7 @@ test_backup_restore() { local tmpConfig tmpConfig="$(mktemp)" backupsDir="$(mktemp --directory)" + backupFile="$backupsDir/backup.enc.bin" log "Testing backup $testDescription..." @@ -124,7 +125,7 @@ test_backup_restore() { url = "https://local/v1/backup" user = "$adminUserEmail:$adminUserPword" json = {"passphrase":"$passphrase"} -output-dir = $backupsDir +#output-dir = $backupsDir http1.1 show-error fail @@ -136,7 +137,6 @@ create-dirs write-out = "%{onerror}%{stderr}\n\n\n\tAN ERROR OCCURRED AND YOUR BACKUP WAS NOT SAVED\n\n\n" EOF - backupFile="backup.enc.bin" log "Backing up to $backupFile ..." curl \ --verbose \ From 0ee83a1cdf38f22627abe3ec711feb268a612f1f Mon Sep 17 00:00:00 2001 From: alxndrsn Date: Fri, 13 Nov 2026 06:36:56 +0000 Subject: [PATCH 49/75] no remote-name --- test/test-images.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test-images.sh b/test/test-images.sh index b8892a8ad..71ba5be93 100755 --- a/test/test-images.sh +++ b/test/test-images.sh @@ -129,7 +129,7 @@ json = {"passphrase":"$passphrase"} http1.1 show-error fail -remote-name +#remote-name #remote-header-name # disabled; maybe not a good recommendation? FIXME research if docs should be updated to remove this remove-on-error no-clobber From 76a3045c3341ae24e2bd43866816bdc64ef15ac7 Mon Sep 17 00:00:00 2001 From: alxndrsn Date: Fri, 13 Nov 2026 06:37:22 +0000 Subject: [PATCH 50/75] remote http1.1 --- test/test-images.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test-images.sh b/test/test-images.sh index 71ba5be93..605518242 100755 --- a/test/test-images.sh +++ b/test/test-images.sh @@ -126,7 +126,7 @@ url = "https://local/v1/backup" user = "$adminUserEmail:$adminUserPword" json = {"passphrase":"$passphrase"} #output-dir = $backupsDir -http1.1 +#http1.1 show-error fail #remote-name From 20ba18a56c0f8f58a3f8d0694a29d84293107511 Mon Sep 17 00:00:00 2001 From: alxndrsn Date: Fri, 13 Nov 2026 06:46:56 +0000 Subject: [PATCH 51/75] try printing pg version --- test/test-images.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/test-images.sh b/test/test-images.sh index 605518242..13ffd8c01 100755 --- a/test/test-images.sh +++ b/test/test-images.sh @@ -118,6 +118,9 @@ test_backup_restore() { backupsDir="$(mktemp --directory)" backupFile="$backupsDir/backup.enc.bin" + log "Checking pg_dump version..." + docker compose exec service pg_dump --version + log "Testing backup $testDescription..." log "Writing curl config file..." From 9aaf0e8b74979fb99f4e0f09b0c8aaf67957b0cb Mon Sep 17 00:00:00 2001 From: alxndrsn Date: Fri, 13 Nov 2026 06:47:31 +0000 Subject: [PATCH 52/75] try anoterh version --- service.dockerfile | 2 +- test/test-images.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/service.dockerfile b/service.dockerfile index 79b48319c..91a30dac5 100644 --- a/service.dockerfile +++ b/service.dockerfile @@ -49,7 +49,7 @@ RUN apt-get update \ gpg \ cron \ procps \ - postgresql-client-14 \ + postgresql-client-18 \ netcat-traditional \ openssl \ && rm -rf /var/lib/apt/lists/* \ diff --git a/test/test-images.sh b/test/test-images.sh index 13ffd8c01..81a805580 100755 --- a/test/test-images.sh +++ b/test/test-images.sh @@ -119,7 +119,7 @@ test_backup_restore() { backupFile="$backupsDir/backup.enc.bin" log "Checking pg_dump version..." - docker compose exec service pg_dump --version + docker compose exec service pg_dump --version # FIXME delete this - just for debug log "Testing backup $testDescription..." From c9381d23dca97d72f8238a2f5fe9ae30d513ec2c Mon Sep 17 00:00:00 2001 From: alxndrsn Date: Fri, 13 Nov 2026 06:53:13 +0000 Subject: [PATCH 53/75] print pg_restore version --- test/test-images.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/test-images.sh b/test/test-images.sh index 81a805580..a3281a4b5 100755 --- a/test/test-images.sh +++ b/test/test-images.sh @@ -120,6 +120,8 @@ test_backup_restore() { log "Checking pg_dump version..." docker compose exec service pg_dump --version # FIXME delete this - just for debug + log "Checking pg_restore version..." + pg_restore --version log "Testing backup $testDescription..." From fb41a3f0846e69842000bbde5f9b9994255ee390 Mon Sep 17 00:00:00 2001 From: alxndrsn Date: Fri, 13 Nov 2026 06:54:38 +0000 Subject: [PATCH 54/75] more version checks --- test/test-images.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/test-images.sh b/test/test-images.sh index a3281a4b5..9618a39c3 100755 --- a/test/test-images.sh +++ b/test/test-images.sh @@ -120,7 +120,9 @@ test_backup_restore() { log "Checking pg_dump version..." docker compose exec service pg_dump --version # FIXME delete this - just for debug - log "Checking pg_restore version..." + log "Checking container pg_restore version..." + docker compose exec service pg_restore --version # FIXME delete this - just for debug + log "Checking local pg_restore version..." pg_restore --version log "Testing backup $testDescription..." @@ -153,6 +155,7 @@ EOF # FIXME remove http1.0 - just trying to get things working, but this is not a permanent solution log "Verifying backup..." + # TODO this may require documentation updates for ensuring the pg_restore version used to check is the same as the version used inside the container openssl enc -d -chacha20 -pbkdf2 -pass "pass:$passphrase" <"$backupFile" | pg_restore --file /dev/null log "Restoring backup..." From cd4b824d8add69c11ffc2b6f4e81ae9e0f7e4c74 Mon Sep 17 00:00:00 2001 From: alxndrsn Date: Fri, 13 Nov 2026 07:02:52 +0000 Subject: [PATCH 55/75] verify with containerised pg_restore --- test/test-images.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test-images.sh b/test/test-images.sh index 9618a39c3..d136099dd 100755 --- a/test/test-images.sh +++ b/test/test-images.sh @@ -156,7 +156,7 @@ EOF log "Verifying backup..." # TODO this may require documentation updates for ensuring the pg_restore version used to check is the same as the version used inside the container - openssl enc -d -chacha20 -pbkdf2 -pass "pass:$passphrase" <"$backupFile" | pg_restore --file /dev/null + openssl enc -d -chacha20 -pbkdf2 -pass "pass:$passphrase" <"$backupFile" | docker compose exec -T service pg_restore --file /dev/null log "Restoring backup..." # N.B. "useless use of cat" deliberately echoes documented command at https://docs.getodk.org/central-backup/#restoring-a-backup From fc2939f89f15b063321f7100479d6a6e6dc6c7b4 Mon Sep 17 00:00:00 2001 From: alxndrsn Date: Fri, 13 Nov 2026 07:27:50 +0000 Subject: [PATCH 56/75] stop container before restoring --- test/test-images.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/test/test-images.sh b/test/test-images.sh index d136099dd..3a66a9c2e 100755 --- a/test/test-images.sh +++ b/test/test-images.sh @@ -158,10 +158,17 @@ EOF # TODO this may require documentation updates for ensuring the pg_restore version used to check is the same as the version used inside the container openssl enc -d -chacha20 -pbkdf2 -pass "pass:$passphrase" <"$backupFile" | docker compose exec -T service pg_restore --file /dev/null + log "Stopping service container to allow db restore..." + docker compose stop service + log "Restoring backup..." # N.B. "useless use of cat" deliberately echoes documented command at https://docs.getodk.org/central-backup/#restoring-a-backup # shellcheck disable=SC2002 - cat "$backupFile" | docker compose exec -T service node /usr/odk/lib/bin/restore.js - "$passphrase" + cat "$backupFile" | docker compose run --rm -T service node /usr/odk/lib/bin/restore.js - "$passphrase" + + log "Restarting service container..." + docker compose start service + check_path 5 /v1/projects '{"message":"Could not authenticate with the provided credentials.","code":401.2}' } # FIXME debug remove From 964b20cf03da667cc607f3c174a46eaa4851ee2d Mon Sep 17 00:00:00 2001 From: alxndrsn Date: Fri, 13 Nov 2026 07:45:16 +0000 Subject: [PATCH 57/75] loggg --- test/test-images.sh | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/test/test-images.sh b/test/test-images.sh index 3a66a9c2e..c4863d396 100755 --- a/test/test-images.sh +++ b/test/test-images.sh @@ -161,6 +161,36 @@ EOF log "Stopping service container to allow db restore..." docker compose stop service + log "Debugging what might be owned by the odk user..." + docker compose exec postgres14 psql -U jubilant jubilant -c " + SELECT n.nspname AS schema_name + , c.relname AS object_name + , CASE c.relkind + WHEN 'r' THEN 'table' + WHEN 'v' THEN 'view' + WHEN 'm' THEN 'materialized view' + WHEN 'S' THEN 'sequence' + WHEN 'f' THEN 'foreign table' + ELSE c.relkind::text + END AS object_type + FROM pg_class c + JOIN pg_namespace n ON n.oid = c.relnamespace + JOIN pg_authid a ON a.oid = c.relowner + WHERE a.rolname = 'odk' + AND n.nspname NOT IN ('pg_catalog', 'information_schema') + " + log "---" + docker compose exec postgres14 psql -U jubilant jubilant -c " + SELECT b.classid::regclass AS dependent_type + , b.objid AS dependent_object_id + , p.refclassid::regclass AS referenced_type + , d.extname AS extension_name + FROM pg_depend b + LEFT JOIN pg_extension d ON d.oid = b.objid + WHERE b.refobjid = (SELECT oid FROM pg_roles WHERE rolname = 'odk') + " + log "---" + log "Restoring backup..." # N.B. "useless use of cat" deliberately echoes documented command at https://docs.getodk.org/central-backup/#restoring-a-backup # shellcheck disable=SC2002 From a4a28c7f017fe04758aca0abeec178bf20860f43 Mon Sep 17 00:00:00 2001 From: alxndrsn Date: Fri, 13 Nov 2026 07:52:50 +0000 Subject: [PATCH 58/75] fix uname and db name --- test/test-images.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test-images.sh b/test/test-images.sh index c4863d396..7c58f50ac 100755 --- a/test/test-images.sh +++ b/test/test-images.sh @@ -162,7 +162,7 @@ EOF docker compose stop service log "Debugging what might be owned by the odk user..." - docker compose exec postgres14 psql -U jubilant jubilant -c " + docker compose exec postgres14 psql -U odk odk -c " SELECT n.nspname AS schema_name , c.relname AS object_name , CASE c.relkind @@ -180,7 +180,7 @@ EOF AND n.nspname NOT IN ('pg_catalog', 'information_schema') " log "---" - docker compose exec postgres14 psql -U jubilant jubilant -c " + docker compose exec postgres14 psql -U odk odk -c " SELECT b.classid::regclass AS dependent_type , b.objid AS dependent_object_id , p.refclassid::regclass AS referenced_type From ea5ab7a488c031a33ffe3f67aeb72b1f9d4495f7 Mon Sep 17 00:00:00 2001 From: alxndrsn Date: Fri, 13 Nov 2026 07:58:23 +0000 Subject: [PATCH 59/75] bp --- test/test-images.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test-images.sh b/test/test-images.sh index 7c58f50ac..00d170555 100755 --- a/test/test-images.sh +++ b/test/test-images.sh @@ -183,7 +183,7 @@ EOF docker compose exec postgres14 psql -U odk odk -c " SELECT b.classid::regclass AS dependent_type , b.objid AS dependent_object_id - , p.refclassid::regclass AS referenced_type + , b.refclassid::regclass AS referenced_type , d.extname AS extension_name FROM pg_depend b LEFT JOIN pg_extension d ON d.oid = b.objid From 3cbf4d06a9552190706c630607fc7d00f55e2f20 Mon Sep 17 00:00:00 2001 From: alxndrsn Date: Fri, 13 Nov 2026 08:27:52 +0000 Subject: [PATCH 60/75] drop & recreate db --- test/test-images.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/test-images.sh b/test/test-images.sh index 00d170555..51224acf7 100755 --- a/test/test-images.sh +++ b/test/test-images.sh @@ -191,6 +191,13 @@ EOF " log "---" + log "Manually dropping and recreating DB to avoid weird errors..." + docker compose run --rm postgres14 psql -U odk odk -c " + DROP DATABASE IF EXISTS odk; + CREATE DATABASE odk OWNER odk; + " + log "DB dropped & recreated." + log "Restoring backup..." # N.B. "useless use of cat" deliberately echoes documented command at https://docs.getodk.org/central-backup/#restoring-a-backup # shellcheck disable=SC2002 From bb0d090c19c2875b744bf072bb748776e544b6cc Mon Sep 17 00:00:00 2001 From: alxndrsn Date: Fri, 13 Nov 2026 08:40:40 +0000 Subject: [PATCH 61/75] exec not urn --- test/test-images.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test-images.sh b/test/test-images.sh index 51224acf7..61cf93b9e 100755 --- a/test/test-images.sh +++ b/test/test-images.sh @@ -192,7 +192,7 @@ EOF log "---" log "Manually dropping and recreating DB to avoid weird errors..." - docker compose run --rm postgres14 psql -U odk odk -c " + docker compose exec postgres14 psql -U odk odk -c " DROP DATABASE IF EXISTS odk; CREATE DATABASE odk OWNER odk; " From 7ccac74e73da5b22f9d719870626eee265eb6114 Mon Sep 17 00:00:00 2001 From: alxndrsn Date: Fri, 13 Nov 2026 09:19:01 +0000 Subject: [PATCH 62/75] drop and recreate separate --- test/test-images.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/test-images.sh b/test/test-images.sh index 61cf93b9e..ad9903076 100755 --- a/test/test-images.sh +++ b/test/test-images.sh @@ -192,11 +192,11 @@ EOF log "---" log "Manually dropping and recreating DB to avoid weird errors..." - docker compose exec postgres14 psql -U odk odk -c " - DROP DATABASE IF EXISTS odk; - CREATE DATABASE odk OWNER odk; - " - log "DB dropped & recreated." + log "Dropping db..." + docker compose exec postgres14 psql -U odk odk -c "DROP DATABASE IF EXISTS odk" + log "DB dropped; recreating..." + docker compose exec postgres14 psql -U odk odk -c "CREATE DATABASE odk OWNER odk" + log "DB recreated." log "Restoring backup..." # N.B. "useless use of cat" deliberately echoes documented command at https://docs.getodk.org/central-backup/#restoring-a-backup From 5b2a1d891e6b983088f7beac7a19ce090095302b Mon Sep 17 00:00:00 2001 From: alxndrsn Date: Fri, 13 Nov 2026 09:19:35 +0000 Subject: [PATCH 63/75] use postggres db --- test/test-images.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test-images.sh b/test/test-images.sh index ad9903076..38ace7a6d 100755 --- a/test/test-images.sh +++ b/test/test-images.sh @@ -193,9 +193,9 @@ EOF log "Manually dropping and recreating DB to avoid weird errors..." log "Dropping db..." - docker compose exec postgres14 psql -U odk odk -c "DROP DATABASE IF EXISTS odk" + docker compose exec postgres14 psql -U odk postgres -c "DROP DATABASE IF EXISTS odk" log "DB dropped; recreating..." - docker compose exec postgres14 psql -U odk odk -c "CREATE DATABASE odk OWNER odk" + docker compose exec postgres14 psql -U odk postgres -c "CREATE DATABASE odk OWNER odk" log "DB recreated." log "Restoring backup..." From 15566eeb3590969c2bba9aef6be7cd37e562c6b8 Mon Sep 17 00:00:00 2001 From: alxndrsn Date: Fri, 13 Nov 2026 09:26:59 +0000 Subject: [PATCH 64/75] more debugb --- test/test-images.sh | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/test/test-images.sh b/test/test-images.sh index 38ace7a6d..6511fa7e2 100755 --- a/test/test-images.sh +++ b/test/test-images.sh @@ -198,6 +198,36 @@ EOF docker compose exec postgres14 psql -U odk postgres -c "CREATE DATABASE odk OWNER odk" log "DB recreated." + log "Debugging what might be owned by the odk user after we dropped the whole db..." + docker compose exec postgres14 psql -U odk odk -c " + SELECT n.nspname AS schema_name + , c.relname AS object_name + , CASE c.relkind + WHEN 'r' THEN 'table' + WHEN 'v' THEN 'view' + WHEN 'm' THEN 'materialized view' + WHEN 'S' THEN 'sequence' + WHEN 'f' THEN 'foreign table' + ELSE c.relkind::text + END AS object_type + FROM pg_class c + JOIN pg_namespace n ON n.oid = c.relnamespace + JOIN pg_authid a ON a.oid = c.relowner + WHERE a.rolname = 'odk' + AND n.nspname NOT IN ('pg_catalog', 'information_schema') + " + log "---" + docker compose exec postgres14 psql -U odk odk -c " + SELECT b.classid::regclass AS dependent_type + , b.objid AS dependent_object_id + , b.refclassid::regclass AS referenced_type + , d.extname AS extension_name + FROM pg_depend b + LEFT JOIN pg_extension d ON d.oid = b.objid + WHERE b.refobjid = (SELECT oid FROM pg_roles WHERE rolname = 'odk') + " + log "---" + log "Restoring backup..." # N.B. "useless use of cat" deliberately echoes documented command at https://docs.getodk.org/central-backup/#restoring-a-backup # shellcheck disable=SC2002 From 24103c71b5e87d23627f84b7c4b215c9c487d3ec Mon Sep 17 00:00:00 2001 From: alxndrsn Date: Fri, 13 Nov 2026 09:34:08 +0000 Subject: [PATCH 65/75] more debug --- test/test-images.sh | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/test/test-images.sh b/test/test-images.sh index 6511fa7e2..429b284a2 100755 --- a/test/test-images.sh +++ b/test/test-images.sh @@ -226,6 +226,44 @@ EOF LEFT JOIN pg_extension d ON d.oid = b.objid WHERE b.refobjid = (SELECT oid FROM pg_roles WHERE rolname = 'odk') " + docker compose exec postgres14 psql -U odk odk -c " + SELECT + 'Table/View/Seq' AS object_type, + n.nspname || '.' || c.relname AS object_name + FROM pg_class c + JOIN pg_namespace n ON n.oid = c.relnamespace + JOIN pg_authid a ON a.oid = c.relowner + WHERE a.rolname = 'odk' AND n.nspname NOT IN ('pg_catalog', 'information_schema') + + UNION ALL + + SELECT + 'Function/Procedure' AS object_type, + n.nspname || '.' || p.proname AS object_name + FROM pg_proc p + JOIN pg_namespace n ON n.oid = p.pronamespace + JOIN pg_authid a ON a.oid = p.proowner + WHERE a.rolname = 'odk' AND n.nspname NOT IN ('pg_catalog', 'information_schema') + + UNION ALL + + SELECT + 'Type' AS object_type, + n.nspname || '.' || t.typname AS object_name + FROM pg_type t + JOIN pg_namespace n ON n.oid = t.typnamespace + JOIN pg_authid a ON a.oid = t.typowner + WHERE a.rolname = 'odk' AND n.nspname NOT IN ('pg_catalog', 'information_schema') + + UNION ALL + + SELECT + 'Extension' AS object_type, + extname AS object_name + FROM pg_extension e + JOIN pg_authid a ON a.oid = e.extowner + WHERE a.rolname = 'odk'; + " log "---" log "Restoring backup..." From 6c0118788f949545aea3c8afac5b9e5135f0f687 Mon Sep 17 00:00:00 2001 From: alxndrsn Date: Fri, 13 Nov 2026 09:36:19 +0000 Subject: [PATCH 66/75] formatting --- test/test-images.sh | 64 ++++++++++++++++++++++----------------------- 1 file changed, 31 insertions(+), 33 deletions(-) diff --git a/test/test-images.sh b/test/test-images.sh index 429b284a2..b28843e66 100755 --- a/test/test-images.sh +++ b/test/test-images.sh @@ -227,42 +227,40 @@ EOF WHERE b.refobjid = (SELECT oid FROM pg_roles WHERE rolname = 'odk') " docker compose exec postgres14 psql -U odk odk -c " - SELECT - 'Table/View/Seq' AS object_type, - n.nspname || '.' || c.relname AS object_name - FROM pg_class c - JOIN pg_namespace n ON n.oid = c.relnamespace - JOIN pg_authid a ON a.oid = c.relowner - WHERE a.rolname = 'odk' AND n.nspname NOT IN ('pg_catalog', 'information_schema') - + ( + SELECT 'Table/View/Seq' AS object_type + , n.nspname || '.' || c.relname AS object_name + FROM pg_class c + JOIN pg_namespace n ON n.oid = c.relnamespace + JOIN pg_authid a ON a.oid = c.relowner + WHERE a.rolname = 'odk' AND n.nspname NOT IN ('pg_catalog', 'information_schema') + ) UNION ALL - - SELECT - 'Function/Procedure' AS object_type, - n.nspname || '.' || p.proname AS object_name - FROM pg_proc p - JOIN pg_namespace n ON n.oid = p.pronamespace - JOIN pg_authid a ON a.oid = p.proowner - WHERE a.rolname = 'odk' AND n.nspname NOT IN ('pg_catalog', 'information_schema') - + ( + SELECT 'Function/Procedure' AS object_type + , n.nspname || '.' || p.proname AS object_name + FROM pg_proc p + JOIN pg_namespace n ON n.oid = p.pronamespace + JOIN pg_authid a ON a.oid = p.proowner + WHERE a.rolname = 'odk' AND n.nspname NOT IN ('pg_catalog', 'information_schema') + ) UNION ALL - - SELECT - 'Type' AS object_type, - n.nspname || '.' || t.typname AS object_name - FROM pg_type t - JOIN pg_namespace n ON n.oid = t.typnamespace - JOIN pg_authid a ON a.oid = t.typowner - WHERE a.rolname = 'odk' AND n.nspname NOT IN ('pg_catalog', 'information_schema') - + ( + SELECT 'Type' AS object_type + , n.nspname || '.' || t.typname AS object_name + FROM pg_type t + JOIN pg_namespace n ON n.oid = t.typnamespace + JOIN pg_authid a ON a.oid = t.typowner + WHERE a.rolname = 'odk' AND n.nspname NOT IN ('pg_catalog', 'information_schema') + ) UNION ALL - - SELECT - 'Extension' AS object_type, - extname AS object_name - FROM pg_extension e - JOIN pg_authid a ON a.oid = e.extowner - WHERE a.rolname = 'odk'; + ( + SELECT 'Extension' AS object_type + , extname AS object_name + FROM pg_extension e + JOIN pg_authid a ON a.oid = e.extowner + WHERE a.rolname = 'odk' + ); " log "---" From ea924006366c503f0f4e6023d1d8992e8ad0cedb Mon Sep 17 00:00:00 2001 From: alxndrsn Date: Fri, 13 Nov 2026 09:42:20 +0000 Subject: [PATCH 67/75] try reassigning --- test/test-images.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/test-images.sh b/test/test-images.sh index b28843e66..fe45eb03c 100755 --- a/test/test-images.sh +++ b/test/test-images.sh @@ -264,6 +264,9 @@ EOF " log "---" + + docker compose exec postgres14 psql -U odk odk -c "ALTER EXTENSION plpgsql OWNER TO postgres" + log "Restoring backup..." # N.B. "useless use of cat" deliberately echoes documented command at https://docs.getodk.org/central-backup/#restoring-a-backup # shellcheck disable=SC2002 From 2d907e68fb710ac6ecb93181df2ce8a057c96705 Mon Sep 17 00:00:00 2001 From: alxndrsn Date: Fri, 13 Nov 2026 09:51:06 +0000 Subject: [PATCH 68/75] try as postgres? --- test/test-images.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test-images.sh b/test/test-images.sh index fe45eb03c..7086e25ef 100755 --- a/test/test-images.sh +++ b/test/test-images.sh @@ -265,7 +265,7 @@ EOF log "---" - docker compose exec postgres14 psql -U odk odk -c "ALTER EXTENSION plpgsql OWNER TO postgres" + docker compose exec postgres14 psql -U odk postgres -c "ALTER EXTENSION plpgsql OWNER TO postgres" log "Restoring backup..." # N.B. "useless use of cat" deliberately echoes documented command at https://docs.getodk.org/central-backup/#restoring-a-backup From 99129551fd7485521e5f43551d4f1877e472145d Mon Sep 17 00:00:00 2001 From: alxndrsn Date: Fri, 13 Nov 2026 09:52:00 +0000 Subject: [PATCH 69/75] try dropping instead --- test/test-images.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/test-images.sh b/test/test-images.sh index 7086e25ef..f56fd12a1 100755 --- a/test/test-images.sh +++ b/test/test-images.sh @@ -265,7 +265,8 @@ EOF log "---" - docker compose exec postgres14 psql -U odk postgres -c "ALTER EXTENSION plpgsql OWNER TO postgres" + docker compose exec postgres14 psql -U odk odk -c "DROP EXTENSION IF EXISTS plpgsql CASCADE" + #docker compose exec postgres14 psql -U odk postgres -c "ALTER EXTENSION plpgsql OWNER TO postgres" log "Restoring backup..." # N.B. "useless use of cat" deliberately echoes documented command at https://docs.getodk.org/central-backup/#restoring-a-backup From a50474abb1ebdbc196bcc204055b9a68f07cda3d Mon Sep 17 00:00:00 2001 From: alxndrsn Date: Fri, 13 Nov 2026 10:01:05 +0000 Subject: [PATCH 70/75] try --- test/test-images.sh | 156 +++++++++++++++++++------------------------- 1 file changed, 67 insertions(+), 89 deletions(-) diff --git a/test/test-images.sh b/test/test-images.sh index f56fd12a1..173abe6c8 100755 --- a/test/test-images.sh +++ b/test/test-images.sh @@ -110,95 +110,8 @@ adminUserEmail=odk-central-admin@example.test adminUserPword="topSecret-$RANDOM|123" nginxHost="https://localhost" -test_backup_restore() { - local testDescription="$1" - local passphrase="$2" - local tmpConfig - tmpConfig="$(mktemp)" - backupsDir="$(mktemp --directory)" - backupFile="$backupsDir/backup.enc.bin" - - log "Checking pg_dump version..." - docker compose exec service pg_dump --version # FIXME delete this - just for debug - log "Checking container pg_restore version..." - docker compose exec service pg_restore --version # FIXME delete this - just for debug - log "Checking local pg_restore version..." - pg_restore --version - - log "Testing backup $testDescription..." - - log "Writing curl config file..." - cat >"$tmpConfig" <"$tmpConfig" < Date: Fri, 13 Nov 2026 10:06:09 +0000 Subject: [PATCH 71/75] log all on postgres db --- test/test-images.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/test-images.sh b/test/test-images.sh index 173abe6c8..c97f837f3 100755 --- a/test/test-images.sh +++ b/test/test-images.sh @@ -112,7 +112,7 @@ nginxHost="https://localhost" show_db_ownership() { log "Checking ownerships..." - docker compose exec postgres14 psql -U odk odk -c " + docker compose exec postgres14 psql -U odk postgres -c " SELECT n.nspname AS schema_name , c.relname AS object_name , CASE c.relkind @@ -130,7 +130,7 @@ show_db_ownership() { AND n.nspname NOT IN ('pg_catalog', 'information_schema') " log "---" - docker compose exec postgres14 psql -U odk odk -c " + docker compose exec postgres14 psql -U odk postgres -c " SELECT b.classid::regclass AS dependent_type , b.objid AS dependent_object_id , b.refclassid::regclass AS referenced_type @@ -139,7 +139,7 @@ show_db_ownership() { LEFT JOIN pg_extension d ON d.oid = b.objid WHERE b.refobjid = (SELECT oid FROM pg_roles WHERE rolname = 'odk') " - docker compose exec postgres14 psql -U odk odk -c " + docker compose exec postgres14 psql -U odk postgres -c " ( SELECT 'Table/View/Seq' AS object_type , n.nspname || '.' || c.relname AS object_name From ddc02e463f9fc7690a2d57edcb6ba5fd3f77e812 Mon Sep 17 00:00:00 2001 From: alxndrsn Date: Fri, 13 Nov 2026 10:13:05 +0000 Subject: [PATCH 72/75] try vacuum --- test/test-images.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/test/test-images.sh b/test/test-images.sh index c97f837f3..d1459774b 100755 --- a/test/test-images.sh +++ b/test/test-images.sh @@ -234,6 +234,7 @@ EOF log "Manually dropping and recreating DB to avoid weird errors..." log "Dropping db..." docker compose exec postgres14 psql -U odk postgres -c "DROP DATABASE IF EXISTS odk" + docker compose exec postgres14 psql -U odk postgres -c "VACUUM FULL ANALYZE;" show_db_ownership log "DB dropped; recreating..." docker compose exec postgres14 psql -U odk postgres -c "CREATE DATABASE odk OWNER odk" From 6bf862f82b0c7d07275ae68264d11287bb9b3627 Mon Sep 17 00:00:00 2001 From: alxndrsn Date: Fri, 13 Nov 2026 10:21:23 +0000 Subject: [PATCH 73/75] try user postgres --- test/test-images.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/test/test-images.sh b/test/test-images.sh index d1459774b..5f99b846b 100755 --- a/test/test-images.sh +++ b/test/test-images.sh @@ -112,7 +112,7 @@ nginxHost="https://localhost" show_db_ownership() { log "Checking ownerships..." - docker compose exec postgres14 psql -U odk postgres -c " + docker compose exec postgres14 psql -U postgres postgres -c " SELECT n.nspname AS schema_name , c.relname AS object_name , CASE c.relkind @@ -130,7 +130,7 @@ show_db_ownership() { AND n.nspname NOT IN ('pg_catalog', 'information_schema') " log "---" - docker compose exec postgres14 psql -U odk postgres -c " + docker compose exec postgres14 psql -U postgres postgres -c " SELECT b.classid::regclass AS dependent_type , b.objid AS dependent_object_id , b.refclassid::regclass AS referenced_type @@ -139,7 +139,7 @@ show_db_ownership() { LEFT JOIN pg_extension d ON d.oid = b.objid WHERE b.refobjid = (SELECT oid FROM pg_roles WHERE rolname = 'odk') " - docker compose exec postgres14 psql -U odk postgres -c " + docker compose exec postgres14 psql -U postgres postgres -c " ( SELECT 'Table/View/Seq' AS object_type , n.nspname || '.' || c.relname AS object_name @@ -233,17 +233,17 @@ EOF log "Manually dropping and recreating DB to avoid weird errors..." log "Dropping db..." - docker compose exec postgres14 psql -U odk postgres -c "DROP DATABASE IF EXISTS odk" - docker compose exec postgres14 psql -U odk postgres -c "VACUUM FULL ANALYZE;" + docker compose exec postgres14 psql -U postgres postgres -c "DROP DATABASE IF EXISTS odk" + docker compose exec postgres14 psql -U postgres postgres -c "VACUUM FULL ANALYZE;" show_db_ownership log "DB dropped; recreating..." - docker compose exec postgres14 psql -U odk postgres -c "CREATE DATABASE odk OWNER odk" + docker compose exec postgres14 psql -U postgres postgres -c "CREATE DATABASE odk OWNER odk" log "DB recreated." show_db_ownership - docker compose exec postgres14 psql -U odk odk -c "DROP EXTENSION IF EXISTS plpgsql CASCADE" - #docker compose exec postgres14 psql -U odk postgres -c "ALTER EXTENSION plpgsql OWNER TO postgres" + docker compose exec postgres14 psql -U postgres odk -c "DROP EXTENSION IF EXISTS plpgsql CASCADE" + #docker compose exec postgres14 psql -U postgres postgres -c "ALTER EXTENSION plpgsql OWNER TO postgres" show_db_ownership From 3304f12c2221439c5cfe425ab55909316753d55f Mon Sep 17 00:00:00 2001 From: alxndrsn Date: Thu, 19 Nov 2026 07:08:44 +0000 Subject: [PATCH 74/75] ci: deprioritise azure ubuntu mirrors (#2329) Periodically, azure.archive.ubuntu.com is ridiculously slow. The standard repo, archive.ubuntu.com, may be marginally slower from GitHub Actions, but it's also significantly more reliable. See also: * https://github.com/getodk/central-backend/pull/1975 * https://github.com/getodk/central-frontend/pull/1990 --- .../actions/relegate-azure-mirrors/action.yml | 19 +++++++++++++++++++ .github/workflows/main.yml | 2 ++ 2 files changed, 21 insertions(+) create mode 100644 .github/actions/relegate-azure-mirrors/action.yml diff --git a/.github/actions/relegate-azure-mirrors/action.yml b/.github/actions/relegate-azure-mirrors/action.yml new file mode 100644 index 000000000..bdbca517f --- /dev/null +++ b/.github/actions/relegate-azure-mirrors/action.yml @@ -0,0 +1,19 @@ +name: Relegate Azure mirrors +description: Relegate azure Ubuntu repo mirrors, as they can be fatally slow + +runs: + using: 'composite' + steps: + - shell: bash + run: cat /etc/apt/apt-mirrors.txt + - name: relegate azure ubuntu mirrors + shell: bash + run: | + sudo sed \ + --in-place \ + -E \ + --expression '/archive.ubuntu.com\/ubuntu\/[[:space:]]+priority:/ s/priority:2/priority:1/' \ + --expression '/azure.archive.ubuntu.com\/ubuntu\/[[:space:]]+priority:/ s/priority:[-0-9]+/priority:999/' \ + /etc/apt/apt-mirrors.txt + - shell: bash + run: cat /etc/apt/apt-mirrors.txt diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a31b43e2d..3b75b0853 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -19,6 +19,7 @@ jobs: - run: docker --version - run: docker compose version - uses: actions/checkout@v5 + - uses: ./.github/actions/relegate-azure-mirrors - run: ./test/check-submodules.sh - run: ./test/test-with-pgenvblock.sh - run: sudo apt-get install shellcheck @@ -37,6 +38,7 @@ jobs: fetch-depth: 0 fetch-tags: true submodules: recursive + - uses: ./.github/actions/relegate-azure-mirrors - run: ./test/check-docker-context.sh --min-size 5000 --max-size 10000 --min-count 650 --max-count 750 From e476548b215155396b5380ac27d5d008d86d0302 Mon Sep 17 00:00:00 2001 From: alxndrsn Date: Thu, 19 Nov 2026 07:11:15 +0000 Subject: [PATCH 75/75] revert package.json changes --- test/package.json | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/test/package.json b/test/package.json index 7b4043459..bf36d59d7 100644 --- a/test/package.json +++ b/test/package.json @@ -6,9 +6,7 @@ "test:nginx": "npm run test:nginx:mocha && npm run test:nginx:playwright", "test:nginx:mocha": "NODE_TLS_REJECT_UNAUTHORIZED=0 mocha './nginx/src/mocha/**/*.spec.js' --require ./nginx/src/mocha/mocha.setup.js", "test:nginx:playwright": "NODE_TLS_REJECT_UNAUTHORIZED=0 playwright test", - "test:service": "npm run test:service:mocha && npm run test:service:db-backup-restore", - "test:service:db-backup-restore": "./test-db-backup-restore.sh", - "test:service:mocha": "mocha ./service/service.spec.js", + "test:service": "mocha ./service/service.spec.js", "test": "npm run lint && npm run test:github-actions && npm run test:nginx && npm run test:service" }, "dependencies": {