Keep no-op comment runs out of the PR coverage cancellation group - #300
Keep no-op comment runs out of the PR coverage cancellation group#300Saurabh Singh (saurabh500) with Copilot wants to merge 2 commits into
Conversation
Co-authored-by: saurabh500 <1623701+saurabh500@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Prevents no-op comment-triggered coverage runs from cancelling active PR coverage runs.
Changes:
- Gives skipped runs unique concurrency groups.
- Preserves per-PR cancellation for real coverage runs.
- Mirrors the job execution predicate in concurrency handling.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Heads-up: I have opened #478 as a draft alternative to this PR. They are alternatives — only one should land. This PR''s no-op shunt is correct and #478 keeps its predicate verbatim, including the point that the predicate should mirror the whole job The case that motivates it —
If you would rather keep this PR''s history, adding Context: #266 and #465 were duplicate reports of #279 and are now closed as duplicates. |
PR Code Coveragetriggers on everyissue_comment, and GitHub resolvesconcurrencyat run creation — before the jobif:runs. So an ordinary review comment created a run that joinedpr-coverage-<n>, cancelled the in-flightpull_requestrun mid-wait (the artifact wait is up to 1h15m), and then concludedskippeditself. Any PR under review effectively lost its coverage run and showed a red check.Changes
coverage-reportjob will skip get a unique-noop-<run_id>suffix, so they share a group with nothing and cancel nothing.cancel-in-progress.if:, not just the/coverageprefix, so forkpull_requestevents and non-maintainer comments are also treated as no-ops. A comment marks the two as needing to stay in sync.Skipped runs still appear as
skippedexactly as before; only their group membership changes. The folded scalar collapses to a single-line expression, so no newlines leak into the group value.