Commit 793b4d6
authored
Fix concurrency key so ciflow tag re-pushes cancel prior runs (#21622)
Tag-triggered workflows key concurrency on `${{
github.event.pull_request.number || github.sha }}`. On a `ciflow/*` tag
push there is no PR number, so the group falls back to `github.sha` —
each re-push points at a new sha, gets its own group, and never cancels
the prior run. `cancel-in-progress` is dead for tag pushes.
On Aug 5 a burst of ciflow re-pushes fanned out to 46 shas / 117 runs,
buried the shared `macos-m1-stable` fleet, and drove `main` macOS
coverage to 0
([gha-infra#1391](meta-pytorch/pytorch-gha-infra#1391)).
## Fix
Fall back to `github.ref_name` (stable across re-pushes of the same tag)
and gate the sha term on `github.ref_type == 'branch'`, matching
`periodic.yml` in this repo and `pytorch/pytorch`'s `trunk.yml`:
```yaml
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref_name }}-${{ github.ref_type == 'branch' && github.sha }}-...
```
Applied to all 29 workflows carrying the old key (22 are tag-exposed;
the other 7 are fixed for uniformity). Also drops a stray `--` in the
nightly/test-backend group strings. `doc-build.yml` was already correct
(keys on `github.ref`) and is untouched.
## Also: apple.yml test-infra-ref
`apple.yml` passed `test-infra-ref: ''` to the `mobile_job` call,
forcing `actions/checkout` to resolve the default branch via a REST call
— a contributor to GitHub App installation rate-limit exhaustion
([gha-infra#1375](meta-pytorch/pytorch-gha-infra#1375)).
Set it to `main` (the branch the empty ref already resolved to). This is
the one executorch call site that overrode the new `main` default from
[pytorch/test-infra#8472](pytorch/test-infra#8472);
every other call site inherits that default.
## Review
`periodic.yml` (unchanged) is the template — verify `trunk.yml` matches
it; the other 28 are the identical one-line change. The `apple.yml` line
is independent.
---
Authored with assistance from Claude Code.1 parent ed07a9d commit 793b4d6
29 files changed
Lines changed: 30 additions & 30 deletions
File tree
- .github/workflows
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
164 | | - | |
| 164 | + | |
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
0 commit comments