Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,21 @@ on:
merge_group:
workflow_dispatch:

# Non-ok-to-test labeled events still start a workflow run (GitHub cannot filter
# by label name at on:), but must not cancel an in-progress opened/synchronize
# run — same actionable filter as the gate job if: below.
concurrency:
group: >-
${{ github.event_name == 'pull_request_target'
&& format('e2e-{0}', github.event.pull_request.number)
|| format('{0}-{1}', github.workflow, github.ref) }}
# Explicit outer parens: (A && B) || (C && D). Relies on && binding tighter
# than ||; keep the grouping obvious so a future || clause cannot silently
# disable cancel for non-pull_request_target triggers.
cancel-in-progress: >-
${{ github.event_name == 'pull_request_target'
|| github.ref != 'refs/heads/main' }}
${{ (github.event_name == 'pull_request_target'
&& (github.event.action != 'labeled' || github.event.label.name == 'ok-to-test'))
|| (github.event_name != 'pull_request_target' && github.ref != 'refs/heads/main') }}
Comment thread
ifireball marked this conversation as resolved.
Resolved

jobs:
gate:
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/functional-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,21 @@ on:
merge_group:
workflow_dispatch:

# Non-ok-to-test labeled events still start a workflow run (GitHub cannot filter
# by label name at on:), but must not cancel an in-progress opened/synchronize
# run — same actionable filter as the gate job if: below.
concurrency:
group: >-
${{ github.event_name == 'pull_request_target'
&& format('functional-{0}', github.event.pull_request.number)
|| format('{0}-{1}', github.workflow, github.ref) }}
# Explicit outer parens: (A && B) || (C && D). Relies on && binding tighter
# than ||; keep the grouping obvious so a future || clause cannot silently
# disable cancel for non-pull_request_target triggers. Keep in sync with e2e.yml.
cancel-in-progress: >-
${{ github.event_name == 'pull_request_target'
|| github.ref != 'refs/heads/main' }}
${{ (github.event_name == 'pull_request_target'
&& (github.event.action != 'labeled' || github.event.label.name == 'ok-to-test'))
|| (github.event_name != 'pull_request_target' && github.ref != 'refs/heads/main') }}
Comment thread
ifireball marked this conversation as resolved.
Resolved

jobs:
gate:
Expand Down
16 changes: 13 additions & 3 deletions docs/guides/dev/e2e-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,11 +157,21 @@ the frozen PR `updated_at` from the workflow event (`PR_UPDATED_AT`); the live
API fallback may over-reject when non-push activity bumped `updated_at`.
Applying the label triggers immediate authorization on `labeled` events.

Other labels (for example `ready-for-review`, `requires-manual-review`, or
`component/*`) do **not** authorize e2e and do **not** cancel an in-progress
e2e or functional-test run for that PR. Only `opened` / `synchronize` /
`reopened`, and `labeled` when the label is `ok-to-test`, cancel in-progress
work in the per-PR concurrency group. GitHub still starts a workflow run for
every `labeled` event (labels cannot be filtered at `on:`); for non-actionable
labels the gate job is skipped entirely, so the run finishes quickly as skipped
and no sticky `<!-- e2e-gate -->` comment is posted.
Comment thread
ifireball marked this conversation as resolved.
Resolved

### Blocked runs

When e2e does not run, a sticky PR comment (marker `<!-- e2e-gate -->`) explains
why and what to do. Re-run the workflow or add/re-apply `ok-to-test` as
appropriate.
When the gate **runs** and denies authorization, a sticky PR comment (marker
`<!-- e2e-gate -->`) explains why and what to do. That is distinct from a
non-actionable label event, where the gate never runs and no comment appears.
Re-run the workflow or add/re-apply `ok-to-test` as appropriate.

## CI architecture

Expand Down
Loading