github-actions[bot] opened a new pull request, #65828:
URL: https://github.com/apache/airflow/pull/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 
apache/airflow#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 ddf3c7a63e60e773e0f10c20612e53aa12011eac)
   
   Co-authored-by: Jarek Potiuk <[email protected]>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to