Repository navigation
CI: cancel superseded runs, keep one pending run on main, never touch releases - #278
Merged
Merged
Conversation
…, 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes the
concurrencyblocks oftest-jvm.yml,test-python-examples.ymlandtest-native.ymlso superseded runs stop piling up. On 2026-11-05, with eight merges tomainin 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.pull_requestmainscheduleworkflow_dispatchworkflow_callfrom a release (tag push)With
cancel-in-progress: falseonmain, 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 aworkflow_callthegithub.event_nameis the caller's (a tag push), so the push case also requiresgithub.ref == 'refs/heads/main': a release run keeps its own group and a push tomaincannot replace it. Intest-native.ymla manual dispatch no longer shares the group of a push tomain, 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.pyreads 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 tomainshare 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 ofmain. 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