trunk/fd1a08154c6b5be10a791bfff9316e8647cdc8df: [CI] Check installed git version during Docker build (#182228)
PyTorch now enforces Git 2.36+ in Docker builds to prevent CI failures
PyTorch has tightened its continuous integration (CI) pipeline by mandating Git 2.36 or higher in Docker builds. The update, implemented in pull request #182228, checks the Git version during the build process and errors out if an older version is detected. This addresses a critical dependency issue: older Git versions (pre-2.36) lack support for tree-less checkouts, a feature essential for modern CI workflows. When Ubuntu’s PPA mirror (`ppa.launchpad.net`) is unavailable, Docker builds historically installed outdated Git versions, causing pipeline failures.
The enforcement mechanism is straightforward but impactful. The CI pipeline now compares the installed Git version against 2.36, the minimum required for tree-less checkouts. If the check fails, the build halts immediately, preventing silent errors or inconsistent behavior downstream. The change was authored with Claude Code and reviewed by wdvr, reflecting PyTorch’s broader trend of integrating AI-assisted tooling into its development workflows.
- PyTorch’s CI now enforces Git 2.36+ in Docker builds to prevent failures during tree-less checkouts
- Older Git versions (pre-2.36) lack support for tree-less checkouts, causing CI pipeline breakdowns when PPA mirrors are down
- The change was implemented in PR #182228, authored with Claude Code and reviewed by wdvr
Why It Matters
Prevents CI pipeline failures by ensuring Git 2.36+ compatibility, reducing downtime for PyTorch’s 99.6k GitHub stars