From 8a936f8cf8cc47df7e23ce53cf25e13ac4f43ed4 Mon Sep 17 00:00:00 2001 From: Austin Burdine Date: Mon, 2 Nov 2026 13:40:45 -0500 Subject: [PATCH 1/4] Fixed the e2e jobs broken by drift since 2026-11-02 WIP: ActivityPub pins match main; production import prints Ghost-CLI's debug log on failure to find the ubuntu-26.04 cause. --- compose.yml | 4 ++-- tests/e2e/production-import.sh | 11 +++++++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/compose.yml b/compose.yml index e954c989..5e5c4a17 100644 --- a/compose.yml +++ b/compose.yml @@ -241,7 +241,7 @@ services: - traffic-analytics-${COMPOSE_PROJECT_NAME:-ghost} activitypub: - image: ghcr.io/tryghost/activitypub:1.2.14@sha256:a607c8cd82d7d84eabec7abdb5c98e2788605572a0fa79ba75a872787e0084bc + image: ghcr.io/tryghost/activitypub:1.2.16@sha256:b440548b8a87eaf70c9440d4b157beee4898b85ba4294509926517a85e7573c7 restart: ${RESTART_POLICY:-unless-stopped} profiles: [activitypub] labels: @@ -314,7 +314,7 @@ services: # or failed job stays stopped instead of being restarted by the daemon. activitypub-migrate: - image: ghcr.io/tryghost/activitypub-migrations:1.2.14@sha256:c116a15f9c8a94542440fadc17bc06c15eeee6e3a61ff2731e3b6e2ea91f7356 + image: ghcr.io/tryghost/activitypub-migrations:1.2.16@sha256:1ecd26490dc668c6e5e467f85ea2e40d8bfc033bae8eb70f5378a24a27bb75d6 restart: "no" profiles: [activitypub] labels: diff --git a/tests/e2e/production-import.sh b/tests/e2e/production-import.sh index 13c37ff9..40840ef6 100755 --- a/tests/e2e/production-import.sh +++ b/tests/e2e/production-import.sh @@ -51,9 +51,16 @@ SOURCE_INSTALLED=0 # --- Helpers ----------------------------------------------------------------- # ghost_cli ARGS... -- Ghost-CLI in the source's directory; output to $WORK/ghost.log. +# On failure, its debug log too: a failed subprocess's stderr is only there. ghost_cli() { - (cd "$SOURCE" && "${GHOST_CLI[@]}" "$@") >"$WORK/ghost.log" 2>&1 || - fail "ghost $* failed" "$(tail -40 "$WORK/ghost.log")" + local debug + (cd "$SOURCE" && "${GHOST_CLI[@]}" "$@") >"$WORK/ghost.log" 2>&1 && return + debug=$(grep -o '/[^ ]*ghost-cli-debug-[^ ]*\.log' "$WORK/ghost.log" | tail -1 || true) + [[ -z $debug || ! -f $debug ]] || { + printf '\n--- %s ---\n' "$debug" + tail -60 "$debug" + } >>"$WORK/ghost.log" + fail "ghost $* failed" "$(tail -100 "$WORK/ghost.log")" } # run_import SITE ARGS... -> sets OUT and RC, never exits From 8ae968f3fc215640d089b2fa96445f66eb0bbc0a Mon Sep 17 00:00:00 2001 From: Austin Burdine Date: Mon, 2 Nov 2026 13:43:45 -0500 Subject: [PATCH 2/4] Pinned the production import job to ubuntu-24.04 On ubuntu-26.04, sudo-rs ignores `sudo -E`, so Ghost-CLI 1.34.0's migrate-export loses NODE_ENV when it runs knex-migrator-health as the ghost user, reads Ghost's development config and fails on SQLite. The fix belongs in Ghost-CLI; until then the job runs where sudo keeps -E. --- .github/workflows/test.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e7a47c55..44aa7c49 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -144,9 +144,14 @@ jobs: # admin domain) moved to Docker on the same server, as docs/install.md says: # a forced failure with nginx still running, its recovery, then the move. # It changes the host, which a runner is for. + # + # Pinned to 24.04: 26.04's sudo-rs ignores `sudo -E`, so Ghost-CLI 1.34.0's + # migrate-export runs knex-migrator-health without NODE_ENV=production, + # which reads the development config (SQLite) and fails. Unpin once + # Ghost-CLI passes NODE_ENV in a way sudo-rs keeps. production-import-linux: name: Production import on Linux - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 timeout-minutes: 45 steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 From edc3bcbef8bf3f99eb3245e7129b88ac289dc7b2 Mon Sep 17 00:00:00 2001 From: Austin Burdine Date: Mon, 2 Nov 2026 14:21:38 -0500 Subject: [PATCH 3/4] Moved the production import job to Ghost-CLI 1.34.1 on ubuntu-latest Ghost-CLI 1.34.1 keeps NODE_ENV under sudo-rs, which ignores `sudo -E`, so migrate-export works on ubuntu-26.04 again and the job no longer needs the 24.04 pin. Ubuntu 26.04 sites need that release to export, so the install guide asks for it. - .github/workflows/test.yml: ghost-cli@1.34.1, back on ubuntu-latest - docs/install.md: Ghost-CLI 1.34.1 or later for imports --- .github/workflows/test.yml | 9 ++------- docs/install.md | 2 +- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 44aa7c49..954ceaeb 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -144,14 +144,9 @@ jobs: # admin domain) moved to Docker on the same server, as docs/install.md says: # a forced failure with nginx still running, its recovery, then the move. # It changes the host, which a runner is for. - # - # Pinned to 24.04: 26.04's sudo-rs ignores `sudo -E`, so Ghost-CLI 1.34.0's - # migrate-export runs knex-migrator-health without NODE_ENV=production, - # which reads the development config (SQLite) and fails. Unpin once - # Ghost-CLI passes NODE_ENV in a way sudo-rs keeps. production-import-linux: name: Production import on Linux - runs-on: ubuntu-24.04 + runs-on: ubuntu-latest timeout-minutes: 45 steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 @@ -169,7 +164,7 @@ jobs: # `ghost` user, which cannot reach npx's cache in the runner's home. - name: Ghost-CLI, nginx and MySQL for the source run: | - npm install --global ghost-cli@1.34.0 + npm install --global ghost-cli@1.34.1 sudo apt-get update sudo apt-get install --yes nginx sudo systemctl start nginx mysql diff --git a/docs/install.md b/docs/install.md index 3ee0adba..c4c304fa 100644 --- a/docs/install.md +++ b/docs/install.md @@ -110,7 +110,7 @@ interactive: A Ghost-CLI site, local or production, moves to Docker with its posts, members, staff accounts, settings, themes, images and configuration. It needs: -- **Ghost-CLI 1.34.0 or later** (`ghost --version`), and +- **Ghost-CLI 1.34.1 or later** (`ghost --version`), and - **Ghost 6.61.0 or later** in the site, the first release with a `next` image. The import runs exactly the version the site runs; upgrade afterwards. From ad0b83ebe4b48014c05569cd0761e67a2f5e000e Mon Sep 17 00:00:00 2001 From: Austin Burdine Date: Mon, 2 Nov 2026 14:34:39 -0500 Subject: [PATCH 4/4] Moved the import e2e default exporter to Ghost-CLI 1.34.1 Keeps the tests on the Ghost-CLI release docs/install.md now asks for. The import test's local installs never hit the sudo-rs bug, so this is for consistency, not a fix. --- tests/e2e/import.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/e2e/import.sh b/tests/e2e/import.sh index bc9aeb75..3f445294 100755 --- a/tests/e2e/import.sh +++ b/tests/e2e/import.sh @@ -18,7 +18,7 @@ # and for the MySQL source a `mysqldump` on the PATH; without one that half # fails, or is skipped with GD_E2E_ALLOW_SKIP=1. # -# GD_TEST_GHOST_CLI the exporter to use. Default: npx --yes ghost-cli@1.34.0 +# GD_TEST_GHOST_CLI the exporter to use. Default: npx --yes ghost-cli@1.34.1 # GD_TEST_KEEP=1 leave the work directory and sites in place afterwards # # Exits non-zero at the first check that fails, naming it. @@ -33,7 +33,7 @@ DEFAULT_GHOST=ghost:6-next-alpine source "$ROOT/tests/e2e/lib.sh" require_docker -read -ra GHOST_CLI <<<"${GD_TEST_GHOST_CLI:-npx --yes ghost-cli@1.34.0}" +read -ra GHOST_CLI <<<"${GD_TEST_GHOST_CLI:-npx --yes ghost-cli@1.34.1}" readonly SOURCE_DB_CONTAINER="ghost-docker-test-import-source-db" readonly SQLITE_PORT=23711 readonly MYSQL_SITE_PORT=23712