Skip to content

Fixed the e2e jobs broken by ActivityPub and runner drift - #446

Merged
acburdine merged 4 commits into
next-dockerfrom
fix/e2e-drift
Nov 2, 2026
Merged

acburdine merged 4 commits into
next-dockerfrom
fix/e2e-drift

Conversation

@acburdine

@acburdine acburdine commented Nov 2, 2026 •

Copy link
Copy Markdown
Member

Every PR since about 2026-11-02 (#445, #427) fails the same two e2e jobs. Neither failure comes from a PR; both are drift. next-docker last passed on 2026-10-21.

Migration from the released main layout on Linux

main's compose.yml moved ActivityPub to 1.2.16 (renovate #434); next-docker still pinned 1.2.14. tests/e2e/migrate-main.sh installs main's HEAD, which migrates the ActivityPub database with 1.2.16, then runs next-docker's 1.2.14 activitypub-migrate, which exits 1 on the newer schema.

Fixed by pinning activitypub and activitypub-migrations to main's exact 1.2.16 refs and digests.

Why renovate missed it: .github/renovate.json5 sets no baseBranchPatterns, so Renovate only updates the default branch (main). next-docker gets no image updates at all, so main will keep drifting ahead until the branches merge (2026-12-18). Options: add baseBranchPatterns: ["$default", "next-docker"] (it reads config from the default branch, so that change lands on main), or keep bumping by hand.

Follow-up (not fixed here): migrating a main site whose ActivityPub is newer than the release's pin should be refused before anything changes, with a message to update ghost-docker first, rather than failing mid-migration in activitypub-migrate. Real users on main get renovate's bumps before a release carries them, so this will happen outside CI too.

Production import on Linux

ubuntu-latest moved to ubuntu-26.04, whose sudo is sudo-rs. Ghost-CLI 1.34.0's migrate-export runs knex-migrator-health with sudo -E -u ghost and NODE_ENV=production in the environment. The job's Ghost-CLI debug log (now printed on failure, see below) shows:

sudo: preserving the entire environment is not supported, '-E' is ignored
...
ERROR The module '.../better-sqlite3/.../better_sqlite3.node' was compiled against a different Node.js version
INFO Unknown database error

So NODE_ENV is dropped, knex-migrator reads Ghost's development config (SQLite) instead of production's MySQL, and fails. Not a MySQL version or auth change: Ghost itself installed and ran against MySQL fine.

Ghost-CLI 1.34.1 fixes this upstream, so the job moves to ghost-cli@1.34.1 and stays on ubuntu-latest. (An earlier commit here pinned it to ubuntu-24.04 as a stopgap; that pin is gone.) docs/install.md now asks for Ghost-CLI 1.34.1 or later, since 1.34.0's export fails on Ubuntu 26.04 and other sudo-rs hosts.

Also

  • tests/e2e/production-import.sh: ghost_cli now appends the tail of Ghost-CLI's debug log on failure, since a failed subprocess's stderr only appears there. That is how the cause above was found.

Changes

  • compose.yml: ActivityPub and its migrations at 1.2.16, matching main.
  • .github/workflows/test.yml: production import on Ghost-CLI 1.34.1.
  • docs/install.md: Ghost-CLI 1.34.1 or later for imports.
  • tests/e2e/production-import.sh: print Ghost-CLI's debug log on failure.

🤖 Generated with Claude Code

WIP: ActivityPub pins match main; production import prints Ghost-CLI's
debug log on failure to find the ubuntu-26.04 cause.
@coderabbitai

coderabbitai Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 24054347-a30b-43ca-96b6-e3c9fb41f5ed
Commits

Reviewing files that changed from the base of the PR and between edc3bcb and ad0b83e.

Files selected for processing: 1
  • tests/e2e/import.sh

Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 4 reviews per hour.

Walkthrough

The workflow, installation documentation, and import test defaults now use Ghost-CLI version 1.34.1. The production-import test adds Ghost-CLI debug-log lines to captured output when the log exists and reports up to 100 lines on failure. The ActivityPub service and migration service images advance to version 1.2.16, with updated digests.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: Minimal · up to ad0b8

The documented and tested Ghost-CLI versions are aligned, with no unresolved merge-blocking issue identified.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title clearly identifies the two e2e job failures and their ActivityPub and runner drift causes. It accurately summarizes the main changes.
Description check Passed The description directly explains the ActivityPub version update, Ghost-CLI update, runner-related failure, and diagnostic logging changes.
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 1 functions across 2 files.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.
@acburdine acburdine changed the title Fixed the e2e jobs broken by drift since 2026-11-02 Fixed the e2e jobs broken by ActivityPub and runner drift Nov 2, 2026
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
@acburdine
acburdine marked this pull request as ready for review November 2, 2026 19:26

@coderabbitai coderabbitai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Fix comments: Fix CodeRabbit comments on this PR

Comment thread docs/install.md Resolved
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.
@acburdine
acburdine merged commit 36e2435 into next-docker Nov 2, 2026
17 checks passed
@acburdine
acburdine deleted the fix/e2e-drift branch November 2, 2026 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant