Skip to content

Fix ambiguous git refspec when pushing release-candidate constraints - #71181

Merged
vatsrahul1001 merged 1 commit into
mainfrom
fix-constraints-push-ambiguous-refspec
Aug 5, 2026
Merged

Fix ambiguous git refspec when pushing release-candidate constraints#71181
vatsrahul1001 merged 1 commit into
mainfrom
fix-constraints-push-ambiguous-refspec

Conversation

@vatsrahul1001

Copy link
Copy Markdown
Contributor

The Publish and tag constraints job in release-constraints.yml fails at the push step for a release candidate with:

error: src refspec constraints-3.1.3rc1 matches more than one
error: failed to push some refs to 'https://github.com/apache/airflow'

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:

git push origin "${TARGET_BRANCH}"          # branch
git push origin "constraints-${VERSION}"    # tag

When a local ref matches both refs/heads/constraints-<VERSION> and refs/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} and refs/tags/constraints-${VERSION}. The final-release path is unaffected (its branch constraints-X-Y differs from the tag constraints-X.Y.Z); this change is harmless there.

Verified locally: yamllint and zizmor pass on the workflow.

Was generative AI tooling used to co-author this PR?
  • Yes — Claude Code (Opus 4.8)

Generated-by: Claude Code (Opus 4.8) following the guidelines

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 vatsrahul1001 added this to the Airflow 3.3.1 milestone Aug 5, 2026
@vatsrahul1001 vatsrahul1001 added the changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..) label Aug 5, 2026
@vatsrahul1001
vatsrahul1001 merged commit 20f6aa0 into main Aug 5, 2026
111 of 115 checks passed
@vatsrahul1001
vatsrahul1001 deleted the fix-constraints-push-ambiguous-refspec branch August 5, 2026 14:33
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Backport successfully created: v3-3-test

Note: As of Merging PRs targeted for Airflow 3.X
the committer who merges the PR is responsible for backporting the PRs that are bug fixes (generally speaking) to the maintenance branches.

In matter of doubt please ask in #release-management Slack channel.

Status Branch Result
v3-3-test PR Link

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:dev-tools backport-to-v3-3-test Backport to v3-3-test changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants