Skip to content

ci(e2e): replace label dispatcher with comment-only helper#990

Merged
pimlock merged 1 commit intomainfrom
ci/e2e-label-hint-instead-of-dispatch
Apr 27, 2026
Merged

ci(e2e): replace label dispatcher with comment-only helper#990
pimlock merged 1 commit intomainfrom
ci/e2e-label-hint-instead-of-dispatch

Conversation

@pimlock
Copy link
Copy Markdown
Collaborator

@pimlock pimlock commented Apr 27, 2026

Summary

The label dispatcher we landed in #975 worked for the merge gate but had a UX gap: workflow_dispatch-triggered runs are not associated with a PR-context event, so the PR's Checks tab does not surface them while they run. Maintainers had no live progress visibility on the PR until the gate flipped from red to green many minutes later.

This PR replaces the dispatcher with a comment-only helper. When test:e2e / test:e2e-gpu is applied:

  • If the mirror is fresh: the comment links to the existing Branch E2E Checks (or GPU Test) run for the PR head SHA and tells the maintainer to click Re-run all jobs. That re-run replays the original push event, so its check-runs show up on the PR's Checks tab in real time.
  • If the mirror is missing or stale: the comment tells the maintainer to run /ok to test <SHA> to refresh the mirror.

Costs one human click per label application; in return we get live in-progress visibility on the PR.

We considered three alternatives before landing on this approach:

  • Push an empty marker commit to pull-request/<N> to fake a push event. Changes the SHA, breaks the gate's head-SHA equivalence, and writes to a branch copy-pr-bot owns. Architecturally bad.
  • Re-trigger copy-pr-bot programmatically. copy-pr-bot only listens for pull_request.* and issue_comment.created events. Even commenting /ok to test <SHA> is a no-op when the mirror is already at that SHA. There is no programmatic way to make the bot re-fire a push.
  • Have the dispatcher post mirror Check Runs against the PR head SHA via the Checks API. Possible, but adds a polling/webhook loop. Not worth the complexity for a flow a maintainer goes through manually anyway.

Changes

  • .github/workflows/e2e-label-dispatch.yml deleted; .github/workflows/e2e-label-help.yml added. Trigger and pull_request_target: [labeled] shape unchanged. Drops actions: write (no longer dispatches anything); keeps only pull-requests: write for posting the comment.
  • CI.md flow descriptions updated to reflect the new manual re-run step.
  • architecture/ci-e2e.md rewritten: trigger taxonomy, happy-path mermaid diagram, design-rationale sections, permissions table, and edge cases all updated. New "Why we don't auto-dispatch" section captures the alternatives we considered.

Testing

  • YAML parses cleanly.
  • Pre-merge: code review.
  • Post-merge: apply test:e2e to a PR with a fresh mirror, confirm the help comment links to the existing run with the right SHA. Open the linked run, click "Re-run all jobs", confirm Branch E2E Checks jobs appear on the PR's Checks tab in real time.
  • Post-merge: apply the label before copy-pr-bot mirrors the PR; confirm the help comment tells the maintainer to run /ok to test <SHA>.

Checklist

  • Conventional commit message
  • DCO sign-off
  • Commit signed

The dispatcher fired the gated workflow via workflow_dispatch, which
worked for the merge gate but did not surface the run on the PR's
Checks tab - workflow_dispatch-triggered runs are not associated with
a PR-context event and the PR UI filters them out.

Replace the dispatcher with E2E Label Help: when a test:e2e* label is
applied, post a PR comment pointing the maintainer at the existing
push-event run on the mirror, with instructions to click 'Re-run all
jobs'. That re-run replays the original push event so its check-runs
do show up on the PR. Costs one human click per label application; in
return we get live in-progress visibility on the PR.

When the mirror is missing or stale, the comment instead tells the
maintainer to run /ok to test <SHA>.

Drops actions: write from the workflow's permissions; only
pull-requests: write remains.

Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com>
@pimlock pimlock requested a review from a team as a code owner April 27, 2026 17:36
@pimlock pimlock merged commit c428664 into main Apr 27, 2026
19 checks passed
@pimlock pimlock deleted the ci/e2e-label-hint-instead-of-dispatch branch April 27, 2026 18:11
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.

2 participants