ci(code-coverage): move push:main trigger to merge_group#810
Merged
Conversation
Running the coverage suite on push:main is observational — by the time it fires, the merge has already happened and a failure can't block anything. Moving the same trigger to merge_group runs the suite against the queue's transient branch (current main + the queued PR diff, freshly merged), which is the same state push:main would have tested, but where a failure can actually eject the PR from the queue before it damages main. pull_request stays as-is so the PR author still gets fast feedback while iterating; the queue run is the gate. Not making this a required status check in the same PR — the suite takes ~17 min and would add that to every queue merge, even for PRs that don't touch driver code. Promote to required later if main breakages slip past the merge_group run without it being mandatory. The coverage override (SKIP_COVERAGE_CHECK in PR body) intentionally doesn't apply to merge_group runs — the override is an author-time escape hatch, not a queue-time bypass. github.event.pull_request.body resolves to empty under merge_group, which naturally degrades to "no override" without code changes. Co-authored-by: Isaac Signed-off-by: Vikrant Puppala <vikrant.puppala@databricks.com>
madhav-db
approved these changes
May 27, 2026
msrathore-db
approved these changes
May 27, 2026
This was referenced May 27, 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.
Summary
Replaces the
push: maintrigger oncode-coverage.ymlwithmerge_group.pull_requestandworkflow_dispatchstay as-is.Why
Today the suite runs twice per PR-to-main lifecycle:
pull_request(fast feedback for the author while iterating).push: mainafter the merge has already happened.Run #2 is observational — by the time it fires, the merge is done. A failure can't block anything; it can only tell you "main is broken, go fix it." That's not protection; that's an alert.
merge_groupfires while the queue is processing the PR (against a transient branch = current main + the queued PR diff, freshly merged). Same SHA-equivalent state thatpush:mainwould have tested, but a failure here actually ejects the PR from the queue before it damages main.The principle (from this morning's audit):
pull_request= fast iteration for the author.merge_group= the gate that protects main.push:main= observational only, useful for post-deploy smoke tests or release artifact triggers — not for protective checks.This PR moves the workflow from the third category back into the second.
Why this PR doesn't also make it required
The suite takes ~17 min and would be added to every queue merge, including PRs that don't touch driver code. Queue throughput would drop materially. The right move is:
merge_grouprun posts a clean check.E2E Tests and Code Coverageto a required status check on the ruleset.The current setup is: queue runs the suite, you see the result, but it's not gating. Strictly better than today (where the result lands after the merge), without adding queue-time cost.
Subtlety: coverage override
The
SKIP_COVERAGE_CHECKPR-body override only applies underpull_requestevents (wheregithub.event.pull_request.bodyis populated). Undermerge_group, the variable resolves to empty, the grep returns no match, and the threshold is enforced. That's intentional — overrides are an author-time escape hatch, not a queue-time bypass. Documented inline.Test plan
pull_requestevent end-to-end, including coverage check).push:mainrun ofE2E Tests and Code Coveragefires.merge_grouprun oftest-with-coveragefires against the transient queue branch.This pull request and its description were written by Isaac.