Skip to content

Commit dd0fbed

Browse files
Hmbowncursoragent
andauthored
fix(ci): do not cancel-in-progress on main pushes (#5395)
Main and schedule/dispatch runs share one concurrency group via github.ref when there is no pull_request.number. cancel-in-progress: true then killed prior main CI before it could fail, which is how v0.9.8 assertion regressions shipped (#5383). Keep cancel-in-progress only for pull_request events so superseded PR heads still cancel; apply the same fix to ohos.yml which used the identical group pattern. Agent-assisted change. Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Hunter Bown <Hmbown@users.noreply.github.com>
1 parent ee1f9cb commit dd0fbed

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ permissions:
1919

2020
concurrency:
2121
group: ci-${{ github.event.pull_request.number || github.ref }}
22-
cancel-in-progress: true
22+
# PRs: cancel superseded head runs. Push/schedule/dispatch on main must not
23+
# cancel each other — they share github.ref with no pull_request.number, and
24+
# canceling mid-run hid assertion failures that shipped in v0.9.8 (#5383).
25+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
2326

2427
env:
2528
CARGO_TERM_COLOR: always

.github/workflows/ohos.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ permissions:
3030

3131
concurrency:
3232
group: ohos-${{ github.event.pull_request.number || github.ref }}
33-
cancel-in-progress: true
33+
# Same as ci.yml: cancel superseded PR heads only; never cancel main pushes.
34+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
3435

3536
env:
3637
CARGO_TERM_COLOR: always

0 commit comments

Comments
 (0)