ci: add concurrency cancellation to PR-triggered test workflows#2392
Open
bigbitbus wants to merge 2 commits into
Open
ci: add concurrency cancellation to PR-triggered test workflows#2392bigbitbus wants to merge 2 commits into
bigbitbus wants to merge 2 commits into
Conversation
Cancels superseded in-flight runs on a PR when a new commit is pushed, so CI is billed for ~1 matrix pass per settled state instead of one per intermediate commit. Cancellation is scoped to pull_request events only (cancel-in-progress resolves to false on push:[main]) so merged commits keep their per-commit CI / required checks and nothing is orphaned. Group key is workflow+ref, so distinct PRs never cancel each other and different workflows on the same branch stay independent. Verified no duplicate workflow name: values that would collide group keys. Applied to the 10 PR-triggered test workflows; codeflash already had a concurrency block and is left as-is. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
yeldarby
approved these changes
Jun 1, 2026
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.
Why
CI minutes (Depot-hosted GitHub Actions runners,
depot-ubuntu-*) have grown ~3–4× since Nov 2025. A primary structural cause: of all workflows, onlycodeflash.ymlhad aconcurrencyblock. Every test workflow lacked cancel-in-progress, so pushing several commits to an open PR left all prior in-flight runs running and billed — we paid for one full matrix pass per intermediate commit instead of one per settled state.What
Adds an identical workflow-level block to the 10 PR-triggered test workflows:
push: [main]— the expression resolves tofalse, so runs queue instead of cancelling. Every merged commit keeps its own CI / required checks; nothing is orphaned.workflow + ref, so distinct PRs never cancel each other and different workflows on the same branch stay independent.Files
unit_tests_inference_x86,unit_tests_workflows_x86,unit_tests_inference_sdk_x86,unit_tests_inference_cli_x86,unit_tests_inference_experimental,integration_tests_workflows_x86,integration_tests_inference_experimental_cpu,integration_e2e_tests_inference_sdk_x86,check_model_licenses,static_code_analysis.codeflashalready had a concurrency block and is unchanged.Verification
name:values exist, so no two workflows collide into one cancel-group.cancelled(not failed), so branch protection is unaffected.Follow-ups (not in this PR)
paths:filters so Python tests skip docs-only / unrelated-package changes.integration_tests_workflows_x86on-16,docson-32).docker.inference-expfull 6-image CUDA matrix builds on every push tomain.🤖 Generated with Claude Code