Skip to content

Real-backend E2E on frontend PRs (fe-backend-e2e.yml) - #190

Draft
senthanal wants to merge 15 commits into
masterfrom
feature/fe-backend-e2e
Draft

senthanal wants to merge 15 commits into
masterfrom
feature/fe-backend-e2e

Conversation

@senthanal

Copy link
Copy Markdown
Contributor

Resolves: no ticket yet. Design and plan: specs/2026-11-19_fe-pr-e2e-reusable-workflow/.

changelog: Frontend-Core: Run real-backend Cypress E2E on frontend PRs against the PR's npm snapshots [PR github-actions#PR-number]

Draft, built phase by phase per plan.md. Staging refs pointing at @feature/fe-backend-e2e are marked # FIXME remove before merging and are reset to @master in Phase 6.

Phase 1 (this push):

  • artifacts-handler.ts writes the outputs version and packages (JSON array) after a PR snapshot publish. Main snapshots and PR close write neither.
  • The artifacts action and fe-pr-snapshot.yml expose both outputs.
  • fe-pr-snapshot.yml gains REQUIRE_SNAPSHOT_LABEL (default true), so existing callers keep the label gate. The job gets timeout-minutes: 60.

Developer Checklist:

  • Updated documentation if needed (README section in Phase 6)
  • Created Changelog according
    to Guidelines

🤖 Generated with Claude Code

senthanal and others added 15 commits November 20, 2026 06:41
The artifacts handler writes the published snapshot version and the
published package names after a PR snapshot. The artifacts action and
fe-pr-snapshot.yml expose them. fe-pr-snapshot.yml gains a
REQUIRE_SNAPSHOT_LABEL input (default true), so existing callers keep the
label gate.

Phase 1 of specs/2026-11-19_fe-pr-e2e-reusable-workflow/plan.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The version and packages outputs of fe-pr-snapshot.yml are empty when the
job is skipped or the tip is a branch-off commit; the descriptions now say
so. The PR-snapshot guard moves from handle() into writePrSnapshotOutputs.

Adds the Phase 1 review with all findings resolved.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The trial cplace-fe PR published without the label and showed both
outputs, and the label caller still skipped without the label.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reusable workflow that builds the backend a frontend PR ships into once,
with the PR's npm snapshot versions pinned into its */assets, and runs
cplace-e2e specs against it in docker on a node matrix. Backend steps
reuse the cplace-gh-workflows composite actions at release/2.0; the
build reaches the nodes as one tarball artifact, so nodes run no gradle.

New bash under tools/scripts/backend-e2e/ (repo and base-branch mapping,
snapshot pinning) with bats tests, wired into pr-checks.yml.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The NODES validation moves from fe-backend-e2e.yml into node-indexes.sh,
called first by backend-e2e-resolve, and the pin-dir glob expansion moves
into pin-snapshots.sh, which now fails when no glob matches a directory.
Both are covered by bats.

pin-snapshots.sh sends npm's stdout to stderr so only the pin lines reach
the step summary. The analytics zip -d tolerates only zip's "nothing to
do" exit code, and the bundle step fails early when main/docker/e2e is
missing.

Records Phase 7 in plan.md and the iteration-3 review triage.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
build and e2e run lifecycle scripts of PR-built snapshot packages, so the
workflow now defaults to contents: read and grants checks and pull-requests
write only to the report job. Records the iteration-4 triage in review.md
and updates plan.md to match.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The cplace e2e compose file extends ../elasticsearch/elasticsearch-base.yml,
so bundling only main/docker/e2e made the compose build fail on the node.
The whole directory is about 375 KB.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nd-e2e

- resolve-backend.sh splits into `repo` and `branches`; the backend and
  cplace-e2e each use the PR's head branch when they have it, the base's
  counterpart otherwise, and master when a release counterpart is missing.
  Branch lookups match exactly and retry an unreachable remote.
- resolve-consumers.sh reads blob-less sparse clones of the manifests and
  skips the run with success when nothing consumed was published.
- The cloned cplace-e2e gets the PR's SDK packages pinned.
- One run per PR: a new push cancels the previous run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The backend's own nightly E2E suite fails the same specs the trial run
failed, so a blocking job would turn every FE PR red. In advisory mode the
e2e nodes continue on error, the test results check does not fail, and the
report job warns with the failure count, or with a missing-results warning
when a node broke before Cypress ran. Build failures still fail the run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…dout

consumed_packages in lib.sh now treats a blank PACKAGES as [], so
pin-snapshots.sh and resolve-consumers.sh no longer duplicate the guard.
resolve_branch prints the branch for command substitution instead of
setting a caller variable, and its warnings go to stderr so they are not
swallowed by the capture.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The sparse clones of the backend and cplace-e2e manifests move from
inline shell in backend-e2e-resolve into fetch-manifests.sh, so the
pr-checks shellcheck and bats steps cover them. The git test stub now
also handles clone, sparse-checkout and checkout. Plan and review are
updated for Phase 8 and findings [5.1]-[5.4].

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The e2e job copies the FE repo's e2e-tests/ into the cloned cplace-e2e
under cypress/e2e/<fe-repo>/ and adds it to the spec filter; the resolve
summary shows whether the folder exists. The report job posts one
marker comment per run with the outcome, branches, pins and failing
specs, and minimizes the earlier ones as outdated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Record each snapshot package's publish integrity and fail the pin when
  a newer push republished the snapshot.
- Resolve the backend and cplace-e2e to commits once; honor
  backend-branch / cplace-e2e-branch lines in the PR body.
- Pin cplace-gh-workflows actions to a commit SHA.
- Report FE version drift, run on e2e-tests-only changes, and add
  SPEC_MAP for per-package specs.
- Build the PR comment in build-report.sh with code-spanned names, and
  classify outcomes, reporting crashed nodes as infrastructure failures.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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