Commit 52e5a6c
committed
Don't let irrelevant label-adds cancel the in-progress PR build
GitHub evaluates a workflow's `concurrency:` group BEFORE its job-level `if:` filter. When a non-build-affecting label is added to a PR (e.g. `automated code review` from code-review-sweep, any auto-label from .github/labeler.yml, or any human/bot label-add), the resulting `pull_request labeled` run enters the shared per-PR group with cancel-in-progress, cancels the real in-progress build, and only then evaluates the `if:` and skips — leaving the PR with no build and a failing required-status-check (see PR #18441).
Route those irrelevant-label runs to a unique, per-run-id throwaway concurrency group so they neither cancel nor are cancelled by anything; the job's `if:` then skips them in ~1s. Build-affecting labels (`test native`, `test openj9`, `test windows`) and all other event types keep the shared per-PR group, preserving the existing cancel-and-rerun semantics. The fix is at the build workflow level, so it applies uniformly to every label-add source (humans, the labeler workflow, otelbot, dependabot, etc.).1 parent f0833f0 commit 52e5a6c
1 file changed
Lines changed: 22 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
11 | 24 | | |
12 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
13 | 34 | | |
14 | 35 | | |
15 | 36 | | |
| |||
0 commit comments