[v3-2-test] Breeze: fail fast when building provider sdists from a git worktree (#65771)#65828
Merged
Merged
Conversation
4 tasks
…t worktree (#65771) * Breeze: fail fast when building provider sdists from a git worktree flit's --use-vcs silently produces incomplete sdists when run from a `git worktree add ...` directory, because flit.vcs.identify_vcs() checks `(p / ".git").is_dir()` and in a worktree `.git` is a file (gitdir: pointer). flit then falls back to a minimal sdist that omits docs/, tests/, provider.yaml and other tracked files, and the resulting packages fail reproducibility checks against released sdists on dist.apache.org — with no warning. `breeze release-management prepare-provider-distributions` now exits 1 with a clear explanation and a workaround (use a plain checkout, or pass `--distribution-format wheel` — wheels are unaffected) when it detects it is running from a worktree and would build sdists. Wheels and providers using hatchling with explicit sdist includes are not affected, so only `sdist` and `both` formats trigger the check. * Breeze: detect Docker-mounted worktrees in provider-sdist check When Breeze runs prepare-provider-distributions from a git worktree, the worktree's .git file carries an absolute gitdir: pointer to the main repo's .git/worktrees/<name> directory. Only the worktree folder is bind-mounted into Breeze's Docker container, so that pointer target is unreachable from inside the build. flit's VCS detection then either fails or silently produces an incomplete sdist. Expand check_flit_worktree_compatibility to parse .git and branch on the failure mode: read error, unexpected format, missing gitdir target (Docker mount case), or healthy host-side worktree. Tests cover all paths. * Link upstream flit issue/PR + tracking issue at the workaround site Add references to pypa/flit#798 and pypa/flit#799 in the docstring of check_flit_worktree_compatibility, and the Airflow tracking issue #65772 at both the helper and its call site. CLAUDE.md requires the tracking-issue URL to appear at the workaround site in the code so the follow-up work is discoverable from any grep or code review. (cherry picked from commit ddf3c7a) Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
16b8c62 to
6770469
Compare
vatsrahul1001
pushed a commit
that referenced
this pull request
Apr 27, 2026
…t worktree (#65771) (#65828) * Breeze: fail fast when building provider sdists from a git worktree flit's --use-vcs silently produces incomplete sdists when run from a `git worktree add ...` directory, because flit.vcs.identify_vcs() checks `(p / ".git").is_dir()` and in a worktree `.git` is a file (gitdir: pointer). flit then falls back to a minimal sdist that omits docs/, tests/, provider.yaml and other tracked files, and the resulting packages fail reproducibility checks against released sdists on dist.apache.org — with no warning. `breeze release-management prepare-provider-distributions` now exits 1 with a clear explanation and a workaround (use a plain checkout, or pass `--distribution-format wheel` — wheels are unaffected) when it detects it is running from a worktree and would build sdists. Wheels and providers using hatchling with explicit sdist includes are not affected, so only `sdist` and `both` formats trigger the check. * Breeze: detect Docker-mounted worktrees in provider-sdist check When Breeze runs prepare-provider-distributions from a git worktree, the worktree's .git file carries an absolute gitdir: pointer to the main repo's .git/worktrees/<name> directory. Only the worktree folder is bind-mounted into Breeze's Docker container, so that pointer target is unreachable from inside the build. flit's VCS detection then either fails or silently produces an incomplete sdist. Expand check_flit_worktree_compatibility to parse .git and branch on the failure mode: read error, unexpected format, missing gitdir target (Docker mount case), or healthy host-side worktree. Tests cover all paths. * Link upstream flit issue/PR + tracking issue at the workaround site Add references to pypa/flit#798 and pypa/flit#799 in the docstring of check_flit_worktree_compatibility, and the Airflow tracking issue #65772 at both the helper and its call site. CLAUDE.md requires the tracking-issue URL to appear at the workaround site in the code so the follow-up work is discoverable from any grep or code review. (cherry picked from commit ddf3c7a) Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
vatsrahul1001
pushed a commit
that referenced
this pull request
May 20, 2026
…t worktree (#65771) (#65828) * Breeze: fail fast when building provider sdists from a git worktree flit's --use-vcs silently produces incomplete sdists when run from a `git worktree add ...` directory, because flit.vcs.identify_vcs() checks `(p / ".git").is_dir()` and in a worktree `.git` is a file (gitdir: pointer). flit then falls back to a minimal sdist that omits docs/, tests/, provider.yaml and other tracked files, and the resulting packages fail reproducibility checks against released sdists on dist.apache.org — with no warning. `breeze release-management prepare-provider-distributions` now exits 1 with a clear explanation and a workaround (use a plain checkout, or pass `--distribution-format wheel` — wheels are unaffected) when it detects it is running from a worktree and would build sdists. Wheels and providers using hatchling with explicit sdist includes are not affected, so only `sdist` and `both` formats trigger the check. * Breeze: detect Docker-mounted worktrees in provider-sdist check When Breeze runs prepare-provider-distributions from a git worktree, the worktree's .git file carries an absolute gitdir: pointer to the main repo's .git/worktrees/<name> directory. Only the worktree folder is bind-mounted into Breeze's Docker container, so that pointer target is unreachable from inside the build. flit's VCS detection then either fails or silently produces an incomplete sdist. Expand check_flit_worktree_compatibility to parse .git and branch on the failure mode: read error, unexpected format, missing gitdir target (Docker mount case), or healthy host-side worktree. Tests cover all paths. * Link upstream flit issue/PR + tracking issue at the workaround site Add references to pypa/flit#798 and pypa/flit#799 in the docstring of check_flit_worktree_compatibility, and the Airflow tracking issue #65772 at both the helper and its call site. CLAUDE.md requires the tracking-issue URL to appear at the workaround site in the code so the follow-up work is discoverable from any grep or code review. (cherry picked from commit ddf3c7a) Co-authored-by: Jarek Potiuk <jarek@potiuk.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.
flit's --use-vcs silently produces incomplete sdists when run from a
git worktree add ...directory, because flit.vcs.identify_vcs() checks(p / ".git").is_dir()and in a worktree.gitis a file (gitdir:pointer). flit then falls back to a minimal sdist that omits docs/,
tests/, provider.yaml and other tracked files, and the resulting
packages fail reproducibility checks against released sdists on
dist.apache.org — with no warning.
breeze release-management prepare-provider-distributionsnow exits 1with a clear explanation and a workaround (use a plain checkout, or
pass
--distribution-format wheel— wheels are unaffected) when itdetects it is running from a worktree and would build sdists.
Wheels and providers using hatchling with explicit sdist includes are
not affected, so only
sdistandbothformats trigger the check.When Breeze runs prepare-provider-distributions from a git worktree, the worktree's .git file carries an absolute gitdir: pointer to the main repo's .git/worktrees/ directory. Only the worktree folder is bind-mounted into Breeze's Docker container, so that pointer target is unreachable from inside the build. flit's VCS detection then either fails or silently produces an incomplete sdist.
Expand check_flit_worktree_compatibility to parse .git and branch on the failure mode: read error, unexpected format, missing gitdir target (Docker mount case), or healthy host-side worktree. Tests cover all paths.
Add references to pypa/flit#798 and pypa/flit#799 in the docstring of check_flit_worktree_compatibility, and the Airflow tracking issue #65772 at both the helper and its call site. CLAUDE.md requires the tracking-issue URL to appear at the workaround site in the code so the follow-up work is discoverable from any grep or code review.
(cherry picked from commit ddf3c7a)
Co-authored-by: Jarek Potiuk jarek@potiuk.com