NO-ISSUE: run PR CI suites on merge_group - #418
Conversation
Merge queue waits for checks on the speculative SHA. Without a merge_group trigger those jobs never report, so GitHub kicks the PR (checks_timed_out).
|
@minmzzhang: This pull request explicitly references no jira issue. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: osac-project/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 12 included reviews per hour; 11 remain after this review. WalkthroughThe workflows now trigger on ChangesMerge queue CI support
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to This PR updates CI workflows to run required suites for merge-queue commits; no actionable merge-blocking risk remains beyond normal checks and review. Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 11✅ Passed checks (11 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Comment |
|
🤖 Finished Review · ✅ Success · Started 1:47 PM UTC · Completed 1:59 PM UTC Commit: |
ReviewFindingsHigh
Labels: PR modifies GitHub Actions workflow files under .github/workflows/ Next steps:
|
Auto-dismissed: only Prow labels gate merging
|
/retest |
|
Re-triggered failed runs:
|
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: eliorerz, minmzzhang The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
d913486
…ests/pre-commit PR osac-project#418 correctly runs the full Unit Tests and Integration Tests suites on merge_group -- that behavior is unchanged here and stays exactly as osac-project#418 intended. The actual problem is narrower: none of unit-tests.yml, integration-tests.yml, or pre-commit.yaml cancel a stale run when GitHub's merge queue rebases a PR onto a new ephemeral gh-readonly-queue ref, which happens routinely as normal merge-queue behavior. Every rebase spawns a brand-new full run of these 3 workflows for that PR; the previous run for the now-superseded ref keeps consuming a runner until it finishes naturally. Confirmed live: 13 concurrent Unit Tests runs and 10 concurrent Integration Tests runs against only 4 active merge-queue slots (max_entries_to_build: 4, via the rulesets API) -- consistent with a handful of PRs each stacking up multiple stale, uncancelled reruns from repeated rebases. Also confirmed this repo's actual hosted-runner concurrency (~30-40 in use) is nowhere near the plan's 180-job ceiling, so a hard concurrency limit is not the bottleneck -- the queue stalls because cheap, load-bearing jobs (label-gate, auto-queue, Slash Command) get starved behind piles of stale heavy runs, not because of a runner cap. integration-tests.yml already had a concurrency block, but it keyed non-PR events on github.sha (the merge-preview commit), which changes on every rebase -- so the group itself changed every rebase and could never collapse a prior run even with cancel-in-progress true. unit-tests.yml and pre-commit.yaml had no concurrency block at all. Fix: key the concurrency group on something that stays stable across rebases of the same PR. github.ref_name for a merge_group event is GitHub's ephemeral gh-readonly-queue/<base>/pr-<number>-<sha> ref -- the pr-<number> segment is constant across rebases; only the trailing sha changes. Verified this directly against this repo's own run history (gh api repos/osac-project/osac/actions/runs?event=merge_group): PR osac-project#503 was requeued at gh-readonly-queue/main/pr-503-b2986acb...61 and .../pr-503-f05965f9...53 sixteen minutes apart; PR osac-project#307 similarly at .../pr-307-18b1c7ed...58 and .../pr-307-0c86346b...c1 -- both pairs extract to the identical "pr-503"/"pr-307" via `grep -oE 'pr-[0-9]+'` despite the trailing sha differing every time. Workflow-level `concurrency:` blocks are evaluated before any job runs and can't reference a computed value, so this can't be done as a single top-of-file block. Instead, each file computes the key once (in the existing `changes` job for unit-tests.yml/integration-tests.yml; in a new tiny `concurrency-key` job for pre-commit.yaml, which has no `changes` job) and each actual test-execution job gets its own job-level `concurrency:` block referencing that computed output -- job-level blocks can reference `needs.*.outputs.*`. Nothing from the previously-closed osac-project#544 approach is reintroduced: no compile-check job, no gating the heavy test jobs off of merge_group. Test execution behavior (what runs, on what trigger, with what coverage) is completely unchanged on all 3 files -- this only cancels superseded/stale runs of the same PR's own prior queue entry.
Summary
pre-commit, unit tests, and integration tests onmerge_groupso merge queue gets real pass/fail on the speculative SHA (fixes thechecks_timed_outkick from github-config#191 / osac#375).dorny/paths-filterhas no PR Files API there).merge_group.base_sha/head_sha; keep the rotation comment PR-only (no issue number on merge_group).Test plan
mainSummary by CodeRabbit