fix(e2e): reconcile deploy-sync gate paths + log served commit on skip #439

Merged
nrupard merged 2 commits from fix/BUNYIP-448-e2e-deploy-sync-gate-paths into main 2026-08-03 16:03:43 +02:00
Owner

BUNYIP-448 (relates BUNYIP-445). Triage of the recurring e2e.yml failures.

Problem

e2e/scripts/wait-for-deploy.mjs gates the E2E suite on the deployment serving the right commit, driven by BUILD_TRIGGER_PATHS, which is meant to mirror the OCI build workflows' on.push.paths. That mirror drifted:

  • It named a single build-oci-image workflow that no longer exists (there are now build-api.yml + build-web.yml).
  • It missed .sqlx/, oci-build/, and both .forgejo/workflows/build-*.yml paths, all of which trigger a rebuild. A commit touching only one of those republishes an image the gate does not treat as build-relevant, so resolveBuildSha resolves a stale expected SHA or throws and the gate fail-open skips.
  • It carried a dead migrations entry: there is no top-level migrations/ dir (migrations live under bunyip-api/migrations/, already covered by bunyip-api).

Separately, the fail-open skip path (the branch that fired on run #2453 / a484eb4) logged only that the gate skipped, never what the deployment was actually serving, so a green gate left no record of what was tested.

Change

  • BUILD_TRIGGER_PATHS is now the exact union of build-api.yml + build-web.yml on.push.paths: adds .sqlx, oci-build, .forgejo/workflows/build-api.yml, .forgejo/workflows/build-web.yml; drops migrations. Each entry is annotated with the workflow(s) that list it.
  • Header and constant comments now name the two real workflows and the "audit all three together" invariant.
  • The fail-open skip path fetches <op>/v1/version and logs the currently-served commit before exiting 0, so every run records what it tested.

The gate stays fail-open by design (E2E is a required check that must never lock out a merge on deploy state, per BUNYIP-163); this only makes the skip visible and stops the path drift from misfiring.

Verification

  • node --check e2e/scripts/wait-for-deploy.mjs passes.
  • Not type-checked by tsc: e2e/tsconfig.json includes only **/*.ts, and this is a .mjs node script (behavior unchanged for the happy path; only the constant and the skip-path logging changed).

🤖 Generated with Claude Code

BUNYIP-448 (relates BUNYIP-445). Triage of the recurring e2e.yml failures. ## Problem `e2e/scripts/wait-for-deploy.mjs` gates the E2E suite on the deployment serving the right commit, driven by `BUILD_TRIGGER_PATHS`, which is meant to mirror the OCI build workflows' `on.push.paths`. That mirror drifted: - It named a single `build-oci-image` workflow that no longer exists (there are now `build-api.yml` + `build-web.yml`). - It missed `.sqlx/`, `oci-build/`, and both `.forgejo/workflows/build-*.yml` paths, all of which trigger a rebuild. A commit touching only one of those republishes an image the gate does not treat as build-relevant, so `resolveBuildSha` resolves a stale expected SHA or throws and the gate fail-open skips. - It carried a dead `migrations` entry: there is no top-level `migrations/` dir (migrations live under `bunyip-api/migrations/`, already covered by `bunyip-api`). Separately, the fail-open skip path (the branch that fired on run #2453 / a484eb4) logged only that the gate skipped, never what the deployment was actually serving, so a green gate left no record of what was tested. ## Change - `BUILD_TRIGGER_PATHS` is now the exact union of `build-api.yml` + `build-web.yml` `on.push.paths`: adds `.sqlx`, `oci-build`, `.forgejo/workflows/build-api.yml`, `.forgejo/workflows/build-web.yml`; drops `migrations`. Each entry is annotated with the workflow(s) that list it. - Header and constant comments now name the two real workflows and the "audit all three together" invariant. - The fail-open skip path fetches `<op>/v1/version` and logs the currently-served commit before exiting 0, so every run records what it tested. The gate stays fail-open by design (E2E is a required check that must never lock out a merge on deploy state, per BUNYIP-163); this only makes the skip visible and stops the path drift from misfiring. ## Verification - `node --check e2e/scripts/wait-for-deploy.mjs` passes. - Not type-checked by tsc: `e2e/tsconfig.json` includes only `**/*.ts`, and this is a `.mjs` node script (behavior unchanged for the happy path; only the constant and the skip-path logging changed). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
fix(e2e): reconcile deploy-sync gate paths + log served commit on skip
All checks were successful
E2E PR gate / Install + reachability (no deployment secrets) (pull_request) Successful in 17s
Check / fmt + clippy + build + tests (pull_request) Successful in 13m59s
474808341d
wait-for-deploy.mjs BUILD_TRIGGER_PATHS had drifted from the OCI build workflows: it named a single build-oci-image workflow that no longer exists, missed .sqlx/, oci-build/, and both .forgejo/workflows/build-*.yml paths that now trigger a rebuild, and carried a dead `migrations` entry (there is no top-level migrations dir; bunyip-api/migrations/ is covered by the bunyip-api entry). A commit touching only a missing path republished an image the gate did not recognize as build-relevant, so it polled for a stale expected SHA or fail-open skipped. The constant is now the exact union of build-api.yml + build-web.yml on.push.paths.

Also record the currently-served commit in the fail-open skip path: the gate fetches <op>/v1/version before exiting 0, so the run log always states what the suite actually tested instead of only that the gate skipped.

#BUNYIP-448

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
fix(e2e): track only bunyip-API build paths in the deploy-sync gate
All checks were successful
E2E PR gate / Install + reachability (no deployment secrets) (pull_request) Successful in 17s
Check / fmt + clippy + build + tests (pull_request) Successful in 4m31s
Create release / Create release from merged PR (pull_request) Has been skipped
e9a89bf909
The gate polls bunyip-API's /v1/version, which only advances when the bunyip-API image is rebuilt, so BUILD_TRIGGER_PATHS must mirror build-api.yml's on.push.paths, not the union of both build workflows. Listing bunyip-web-only paths (bunyip-web/**, .forgejo/workflows/build-web.yml) made a web-only commit resolve to an expectedSha the API never reports, hanging the gate until its 10-minute timeout - a false failure, and the same class BUNYIP-445 is about. bunyip-web has no version endpoint (only /healthz), so the gate cannot verify a web deploy anyway; a web-only change now runs against whatever bunyip-web is deployed instead of timing out. This also drops the pre-existing bunyip-web entry that had the same effect.

BUILD_TRIGGER_PATHS is now bunyip-api, crates, Cargo.toml, Cargo.lock, .sqlx, oci-build, and the api build workflow file. The stale build-oci-image references in the throw message and comments are corrected to build-api.yml.

#BUNYIP-448

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
nrupard deleted branch fix/BUNYIP-448-e2e-deploy-sync-gate-paths 2026-08-03 16:03:44 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/bunyip!439
No description provided.