fix(ci): pass merge queue base ref to paths-filter#26273
Open
yuhao-su wants to merge 1 commit into
Open
Conversation
On `merge_group` events, `dorny/paths-filter` gets no `base` input and falls back to the repository default branch `main`. For merge queues on release branches the merge base with `main` is hundreds of commits back, so the shallow clone from `actions/checkout` is deepened repeatedly until git aborts with `fatal: shallow file has changed since we read it` (exit 128). Pass `github.event.merge_group.base_ref` so the diff is taken against the real base branch of the merge group. The input is empty for `pull_request` (which resolves changed files through the GitHub API) and for `push`, leaving both unchanged.
yuhao-su
marked this pull request as ready for review
July 14, 2026 17:28
yuhao-su
enabled auto-merge
July 15, 2026 04:11
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.

I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
Connector Node Integration Testsfails on nearly every merge-queue run for a release branch. Example: run 29352468722 ongh-readonly-queue/release-2.8/pr-26262-....Root cause
The
dorny/paths-filterstep passes nobaseinput.On
pull_requestthe action resolves changed files through the GitHub API, sobaseis never consulted. Onmerge_groupit takes the git path instead, and with nobaseit falls back to the repository's default branch —main— even when the merge queue is on a release branch. That is the first line of the log above.For a merge queue on
mainthe fallback is accidentally correct: the merge base sits right there in thedepth=100shallow clone. For a merge queue on a release branch it is not.mainandrelease-2.8diverged 541 commits ago (release-3.0: 198).paths-filterthen repeatedly runsgit fetch --deepen=...looking for the merge base, and git eventually aborts withfatal: shallow file has changed since we read it.The failure rate tracks the divergence exactly. Over the last ~200 runs of this workflow, restricted to
merge_groupevents:maincouldn't find remote ref, the queue branch was deleted mid-run)release-3.0(198 commits diverged)release-2.8(541 commits diverged)The check is not required by the merge queue, so it does not block merges — it just leaves a red cross on the commit and mails the person who enqueued the PR.
There is a second, quieter bug. When the deepening happens to succeed, the diff is still computed against
main, so it reports every file that differs betweenmainand the release branch.java/+proto/differ by 15 files betweenmainandrelease-3.0, sojava == truealways holds and the full Maven build runs for every release-branch merge-queue entry regardless of what the PR touched. Confirmed on run 29337673137, whererun integration testsexecuted rather than being skipped.The fix
Pass the merge group's real base branch:
Behavior per event:
merge_group—basebecomesrefs/heads/release-2.8. The merge base is one or two commits away and already present in thedepth=100clone, so there is no deepening and no crash, and the diff covers only the PRs actually in the queue.pull_request—github.event.merge_groupis null, so the expression evaluates to empty. The action already resolves changed files via the GitHub API (Fetching list of changed files for PR#... from Github API) and ignoresbase. Unchanged.pushtomain— the expression is empty, sopaths-filterfalls back to the default branchmain, which equals the head branch, and it compares against the push'sbeforeSHA. Unchanged.github.base_refis not populated formerge_group(community discussion #40277), sogithub.event.merge_group.base_refis the only way to reach it.Verification
This is a workflow-config change, so the merge-queue path can only be exercised by an actual merge queue:
pull_requestrun exercises thebase-is-empty path and should behave exactly as before.main's merge queue exercises themerge_grouppath withbase=refs/heads/main.release-2.8andrelease-3.0are required for the failures to actually stop.Checklist
release-2.8andrelease-3.0— the fix has no effect on a release branch until it is present on that branch.Documentation
Release note