Skip to content

CI: cancel superseded runs, keep one pending run on main, never touch releases - #278

Merged
tae898 merged 1 commit into
mainfrom
fix/271-cancel-superseded-runs
Nov 6, 2026
Merged

tae898 merged 1 commit into
mainfrom
fix/271-cancel-superseded-runs

Conversation

@tae898

@tae898 tae898 commented Nov 6, 2026

Copy link
Copy Markdown
Collaborator

Changes the concurrency blocks of test-jvm.yml, test-python-examples.yml and test-native.yml so superseded runs stop piling up. On 2026-11-05, with eight merges to main in one day, push runs of the JVM and examples workflows each got a group of their own (run_id), so 21 stale runs and about 70 macOS jobs queued behind each other on a runner cap shared with ArcadeData/arcadedb.

Event Group Cancel in progress
pull_request one per PR yes (unchanged)
push to main one per workflow JVM and examples: no, native: yes (unchanged)
schedule one per workflow yes
workflow_dispatch one per run no
workflow_call from a release (tag push) one per run (native: per tag ref) no

With cancel-in-progress: false on main, GitHub keeps one running and one pending run per group, and a newer pending run replaces the older pending one, so the queue stays at two and the pending run is always the newest commit. Each merge was already gated green on its pull request. In a workflow_call the github.event_name is the caller's (a tag push), so the push case also requires github.ref == 'refs/heads/main': a release run keeps its own group and a push to main cannot replace it. In test-native.yml a manual dispatch no longer shares the group of a push to main, and the nightly run has its own group. The release workflows (release-jvm.yml, release-native.yml, release-notes.yml) are unchanged and still never cancel.

tests/test_workflow_concurrency.py reads the three blocks, evaluates the group and cancel expressions for each event and checks that a new push to a PR cancels the old run, pushes to main share a group, a dispatch and a release run have groups of their own and are never cancelled, and a release run cannot share the group of main. The old blocks fail it. actionlint, shfmt and the YAML hook pass.

This workflow change starts runs when it is merged, and the issue asked for the change after the 26.11.1 tag, while the macOS queue is full. Out of scope, as in the issue: whether the examples workflow should run all 16 legs on every push to main.

Closes #271

🤖 Generated with Claude Code

…, never touch releases

On 2026-11-05 eight merges to main queued 21 stale runs and about 70 macOS jobs, because a push to main got a group of its own (run_id) in test-jvm.yml and test-python-examples.yml, and a workflow_dispatch shared the ref group of a push in test-native.yml.

Per event: pull requests keep one group per PR and cancel the older run. A push to main shares one group per workflow with cancel-in-progress false, so GitHub keeps one running and one pending run and the pending one is always the newest commit. The nightly schedule gets its own group and cancels a stuck older nightly. workflow_dispatch gets a group per run and is never cancelled. In a workflow_call github.event_name is the caller's (a tag push), so the push case also requires the ref to be main: a release run keeps its own group and cannot be replaced by a push. test-native.yml keeps its rule that a newer push to main cancels the older one, but dispatch and schedule leave the group of main. release-jvm.yml, release-native.yml and release-notes.yml are unchanged (cancel-in-progress false).

tests/test_workflow_concurrency.py evaluates the three blocks per event and checks these properties.

Closes #271

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@tae898
tae898 merged commit 25b9ae4 into main Nov 6, 2026
41 checks passed
@tae898
tae898 deleted the fix/271-cancel-superseded-runs branch November 6, 2026 00:52
@github-actions github-actions Bot added this to the 26.12.1 milestone Nov 6, 2026
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.

CI traffic: superseded push runs are never cancelled (21 stale runs, 70 queued macOS jobs on 2026-11-05)

1 participant