Fix ambiguous git refspec when pushing release-candidate constraints - #71181
Merged
Conversation
For a release candidate the constraints branch and tag are both named constraints-<VERSION>, so pushing them by bare name fails with "src refspec ... matches more than one" whenever both a local branch and tag of that name exist (e.g. on a re-run after the tag was already created). Qualify the refspecs so the branch and tag pushes are unambiguous.
vatsrahul1001
requested review from
amoghrajesh,
ashb,
bugraoz93,
gopidesupavan,
jason810496,
jscheffl and
potiuk
as code owners
August 5, 2026 13:52
amoghrajesh
approved these changes
Aug 5, 2026
potiuk
approved these changes
Aug 5, 2026
Contributor
Backport successfully created: v3-3-testNote: As of Merging PRs targeted for Airflow 3.X In matter of doubt please ask in #release-management Slack channel.
|
vatsrahul1001
added a commit
that referenced
this pull request
Aug 5, 2026
…constraints (#71181) (#71184) For a release candidate the constraints branch and tag are both named constraints-<VERSION>, so pushing them by bare name fails with "src refspec ... matches more than one" whenever both a local branch and tag of that name exist (e.g. on a re-run after the tag was already created). Qualify the refspecs so the branch and tag pushes are unambiguous. (cherry picked from commit 20f6aa0) Co-authored-by: Rahul Vats <43964496+vatsrahul1001@users.noreply.github.com>
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.
The
Publish and tag constraintsjob inrelease-constraints.ymlfails at the push step for a release candidate with:For a candidate the constraints branch and tag are both named
constraints-<VERSION>(e.g.constraints-3.1.3rc1), and both pushes use the bare name:When a local ref matches both
refs/heads/constraints-<VERSION>andrefs/tags/constraints-<VERSION>, git can't disambiguate. This happens on a re-run (a prior run created the remote tag, the checkout fetched it, so the branch push at the top is ambiguous), and on a first run the tag push later is ambiguous once the branch also exists locally. Either way the RC constraints cut is blocked.Fix: qualify both refspecs so the branch and tag pushes are unambiguous —
refs/heads/${TARGET_BRANCH}andrefs/tags/constraints-${VERSION}. The final-release path is unaffected (its branchconstraints-X-Ydiffers from the tagconstraints-X.Y.Z); this change is harmless there.Verified locally:
yamllintandzizmorpass on the workflow.Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Opus 4.8) following the guidelines