GauthamBanasandra opened a new pull request, #9006: URL: https://github.com/apache/hadoop/pull/9006
### Description of PR [HADOOP-20090](https://issues.apache.org/jira/browse/HADOOP-20090). After HADOOP-20087, `dev-support/docker/Dockerfile_windows_10` checks the JDK, Maven, CMake, zstd and MSYS2 downloads against SHA-512 digests, but takes Visual Studio Build Tools, Git and pip from whatever is current when the image is built, and installs Git through Chocolatey's unpinned install script. This pins each of them by version and hash, for the GitHub Actions Windows build (HADOOP-19857) and the Jenkins Windows nightly alike: - **Visual Studio Build Tools:** the fixed-version bootstrapper for 16.11.63 from Microsoft's [release history page](https://learn.microsoft.com/en-us/visualstudio/releases/2019/history), checked by SHA-512, instead of `aka.ms/vs/16/release/vs_buildtools.exe`, which installs the newest release. Microsoft publishes no digest for it, but the SHA-256 in its download URL matches the file. The installer's exit code is now checked (0, or 3010 for a pending reboot). - **Git:** PortableGit 2.56.0(4) in `C:\Git`, checked by SHA-512 and cross-checked with the SHA-256 that Git for Windows publishes, replaces Chocolatey (`iex` of `chocolatey.org/install.ps1`) and its `git.install` package. The self-extractor exits 0 even when Git's post-install step fails, so the RUN checks that the step finished. `http.sslBackend schannel` and `credential.helper manager` are set as `git.install` set them; PortableGit's own credential helper opens a dialog. `C:\Git\bin\bash.exe`, which the jenkinsfile and BUILDING.txt use, is where it was. - **vcpkg:** checked out at the commit that the `2026.07.29` tag names (the `builtin-baseline` in `vcpkg.json`) rather than at the tag. `vcpkg.exe` is downloaded and checked by SHA-512 instead of by `bootstrap-vcpkg.bat`, whose downloader accepts any file with a trusted Authenticode signature, whoever signed it. - **Python:** the installer is checked by SHA-512. `get-pip.py` installs pip 24.0 and setuptools 65.5.1 offline, from wheels checked by SHA-512, where it used to fetch them from PyPI by version alone. `install-python.ps1` and `install-pip.ps1` stop on the first failure, as they do in the upstream Dockerfile they come from. python-dateutil, which Yetus releasedocmaker imports, was installed unpinned; it is now 2.8.1, as in the Linux images, installed with six from `pkg-resolver/requirements-windows.txt` with `--require-hashes --no-deps` and then `pip check`. - **rsync:** MSYS2's popt is added. `rsync.exe` imports `msys-popt-0.dll`, which Git for Windows does not ship, so rsync could not start in the image, and the Yetus `--archive-list` step, which ignores rsync's exit status, archived nothing. The RUN now checks that rsync starts and copies files. The older OpenSSL and zstd DLLs are no longer copied over Git's own. - **Layers and checks:** each tool is downloaded, checked, installed, verified and cleaned up in one RUN, so no installer is left in a lower layer, and the exit codes of the JDK and Visual C++ 2010 installers are checked. - **PATH:** set once, in the machine PATH, instead of by seven `setx` calls for the build user. - **Size:** the image shrinks from about 16.9 GB to 14.4 GB (6.6 GB to 5.8 GB compressed), and the ltsc2019 image from 16.0 GB to 14.2 GB. BUILDING.txt now says about 14 GB. Each new pin was published at least 7 days ago, as SECURITY.md requires. #### Git for Windows 2.56.1 Git for Windows 2.56.1, a security release published on 10 November, cleared the 7-day cooldown on 17 November, after this commit was tested. I will add it here as a second commit once a fork run has tested it. ### How was this patch tested? In my fork, with a trial GitHub Actions workflow that is not part of this change. GitHub keeps the logs for 90 days. Sizes are in decimal GB; the run summaries print GiB. - [Fork run 44132140332](https://github.com/GauthamBanasandra/hadoop/actions/runs/44132140332) tested this commit. - The default (ltsc2022) image built on windows-2022: 14.4 GB, 5.8 GB compressed (13.45 and 5.41 GiB in the run summary), down from 16.9 and 6.6 GB. - It then passed full `-Pnative-win` builds (120/120 modules, with `-DskipTests`) and the native smoke test (`TestHdfsNativeCodeLoader` with `-Drequire.test.libhadoop`) on windows-2022 and windows-2025 under process isolation, and on windows-2022 under Hyper-V isolation. - The Windows-specific unit tests ran on windows-2022: 12 classes in hadoop-common, hadoop-hdfs and hadoop-yarn-common, 275 tests, no failures, 33 skipped, as with the HADOOP-20087 image. - The ltsc2019 image that Jenkins builds was built under Hyper-V on windows-2022 (10.0.17763.9488, 14.2 GB, down from 16.0 GB). It passed the same full build and smoke test under Hyper-V, which no earlier run had tried. That job shows as failed only because its last step, a log upload in the trial workflow, was given paths the upload action rejects; the step before it logged "ltsc2019: the build, the binaries and the smoke test passed". - [Fork run 43631843328](https://github.com/GauthamBanasandra/hadoop/actions/runs/43631843328) tested this change before review, with Visual Studio 16.11.62 and pip and setuptools fetched by version, with the same results apart from the ltsc2019 build, which it did not run. - Not tested: the Jenkins nightly's own path, `jenkins.sh` under Yetus. The fork runs build the ltsc2019 image that Jenkins builds, but run Maven directly. ### For code changes: - [x] Does the title of this PR start with the corresponding JIRA issue id (e.g. 'HADOOP-17799. Your PR title ...')? - [ ] Object storage: N/A - [ ] New dependencies: none - [ ] LICENSE/NOTICE: N/A ### AI Tooling - [x] The PR includes the phrase "Contains content generated by Claude Code" - [x] My use of AI contributions follows the ASF legal policy https://www.apache.org/legal/generative-tooling.html Contains content generated by Claude Code. 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
