Skip to content

ci(experimental): cancel superseded runs on main (#1903) - #1905

Merged
JarryShaw merged 1 commit into
mainfrom
ci/1903-cancel-superseded-experimental
Oct 19, 2026
Merged

JarryShaw merged 1 commit into
mainfrom
ci/1903-cancel-superseded-experimental

Conversation

@JarryShaw

Copy link
Copy Markdown
Owner

Please follow the guide below

What is the purpose of your pull request?

Tick the commit type your subject line carries.

  • fix — corrects a defect
  • feat — adds a feature
  • perf — changes performance, not behaviour
  • refactor — changes neither behaviour nor performance
  • test — tests only
  • docs — documentation only
  • ci — workflows or build tooling
  • release — bumps the version or rolls up a distribution
  • chore — anything else

This is option 1 from #1903: Experimental Tests now cancels superseded runs on a push to main, as it already does on a pull request.

  • experimental.yml: pull requests and pushes to main share a cancelling group per ref. Any other event, should one ever be added, keeps a group of its own by run id and is never cancelled.
  • unit-tests.yml: unchanged, so it still runs once per push, because its unittest-ordering leg runs only on main.
  • Docs: docs/source/contributing/workflows.rst states the new rule.
  • New test: tests/project/test_experimental_concurrency_1903.py evaluates the concurrency expressions with the repo's existing evaluator, for pull request, push to main, push to another branch, schedule, workflow_dispatch and workflow_run, and pins unit-tests.yml's block unchanged. It fails on main.
  • Updated test: test_sweeps_on_latest_only_1732.py dropped its pin on the old expression text.
  • What else reads these runs: no workflow_run consumer, required check, board sync or util/ci_timing.py path treats a cancelled Experimental run as red.

tests/project and the tier guard pass.

Closes #1903

- experimental.yml: a push to main now joins one group per ref with
  cancel-in-progress, as a pull request's run already did, so a merge wave
  no longer queues a two-hour GraalPy leg per commit; every other event keeps
  its own run-id group and is never cancelled
- unit-tests.yml is untouched: its main-only unittest-ordering leg still needs
  a run per commit
- workflows.rst states the new rule and why Unit Tests differs
- New test evaluates both workflows' concurrency blocks per event; the #1732
  test no longer pins the old expression text

tests/project and tests/test_tier_guard.py pass.

Closes #1903
@JarryShaw JarryShaw added ci Pull requests that change CI or workflow configuration (ci: subject prefix) review: running A cross-review is in flight against the current head - no verdict yet labels Oct 19, 2026
@JarryShaw JarryShaw moved this to In review in PyPCAPKit Oct 19, 2026
@JarryShaw

Copy link
Copy Markdown
Owner Author

Verdict: GOOD TO GO at 1877248ff. A Sonnet cross-review confirmed the following:

  • The concurrency expression: it gives pull requests experimental-tests-refs/pull/N/merge and pushes to main experimental-tests-refs/heads/main, both with cancel on. Every other event gets experimental-tests-<run_id> with cancel off. github.ref is never empty on the cancelling branches, so the && github.ref || github.run_id idiom cannot fall through to the run id.
  • Unit Tests unchanged: unit-tests.yml is byte-identical to main.
  • No other consumers: no workflow_run consumer, required check (Required checks passed and the Compat legs), util/ci_timing.py path or board sync treats a cancelled Experimental run as red.
  • Tests: the new test evaluates the expressions with the repo's &&/|| evaluator and fails on main. The ci(python): the GraalPy experimental leg reaches 26% of the suite before its 25-minute cap #1732 test edit drops only the old-text pin. tests/project and the tier guard pass.

GitHub's concurrency docs confirm that cancel-in-progress: true also cancels a run already in progress in the group, and that it accepts an expression.

@JarryShaw JarryShaw added review: good-to-go Cross-review at the current head says ready; CI state is separate and removed review: running A cross-review is in flight against the current head - no verdict yet labels Oct 19, 2026
@JarryShaw
JarryShaw merged commit 95caa8b into main Oct 19, 2026
57 of 58 checks passed
@github-project-automation github-project-automation Bot moved this from In review to Done in PyPCAPKit Oct 19, 2026
@JarryShaw
JarryShaw deleted the ci/1903-cancel-superseded-experimental branch October 19, 2026 03:53
@JarryShaw JarryShaw removed the review: good-to-go Cross-review at the current head says ready; CI state is separate label Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Pull requests that change CI or workflow configuration (ci: subject prefix)

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

ci(experimental): a merge wave queues one 2-hour GraalPy run per main push

1 participant