[
https://issues.apache.org/jira/browse/HADOOP-20090?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
ASF GitHub Bot updated HADOOP-20090:
------------------------------------
Labels: pull-request-available (was: )
> Pin Visual Studio, Git, vcpkg and Python in the Windows build image by
> version and hash
> ---------------------------------------------------------------------------------------
>
> Key: HADOOP-20090
> URL: https://issues.apache.org/jira/browse/HADOOP-20090
> Project: Hadoop Common
> Issue Type: Task
> Components: hadoop-common
> Affects Versions: 3.5.0
> Reporter: Gautham Banasandra
> Assignee: Gautham Banasandra
> Priority: Major
> Labels: pull-request-available
> Fix For: 3.5.0
>
>
> {{dev-support/docker/Dockerfile_windows_10}} pins the JDK, Maven, CMake, zstd
> and MSYS2 downloads by SHA-512, but the rest of the image is not pinned:
> * Visual Studio Build Tools come from the {{aka.ms/vs/16/release}}
> bootstrapper, which installs whatever 16.11 release is newest when the image
> is built.
> * Git comes from Chocolatey: the image runs {{chocolatey.org/install.ps1}}
> unpinned, then {{choco install git.install}}, which takes whichever Git for
> Windows release the package currently names.
> * vcpkg is checked out by tag, and {{bootstrap-vcpkg.bat}} downloads
> {{vcpkg.exe}} through a helper that checks only that the file carries a
> trusted signature, not whose.
> * {{install-python.ps1}} does not check the installer's hash, and {{pip
> install python-dateutil}} takes the newest release: 4.0.0 since 1 November
> (plus its new dependency tzdata), not the 2.8.1 that the Linux images use.
> Some install steps also pass when they fail: {{install-python.ps1}} and
> {{install-pip.ps1}} exit 0 when a download fails, and the exit code of the
> Visual C++ 2010 redistributable's installer is not checked. And {{rsync.exe}}
> imports {{msys-popt-0.dll}}, which neither Git for Windows nor the image
> provides.
> This change:
> * Visual Studio Build Tools: the fixed-version bootstrapper for 16.11.62,
> which installs that release, with a SHA-512 check.
> * Git: PortableGit 2.56.0.4, with a SHA-512 check, extracted to {{C:\Git}},
> the path the Jenkins Windows job and BUILDING.txt already use. This replaces
> Chocolatey and git.install. The step checks that PortableGit's post-install
> script ran, and sets {{http.sslBackend}} and {{credential.helper}} as
> git.install did.
> * vcpkg: checked out by commit (the one the 2026.07.29 tag names, which is
> also the manifest's builtin-baseline), with {{vcpkg.exe}} downloaded directly
> and checked by SHA-512.
> * Python: a SHA-512 check for the installer. {{install-python.ps1}} and
> {{install-pip.ps1}} stop on any failure and check the installed versions, and
> get-pip no longer adds the unpinned {{wheel}} package. pip installs
> python-dateutil 2.8.1 and six 1.17.0 from a requirements file with hashes
> ({{\--require-hashes}}, {{\--no-deps}}), then runs {{pip check}}.
> * rsync: add MSYS2's popt, which provides {{msys-popt-0.dll}}, and check that
> {{rsync.exe}} starts. Stop copying MSYS2's libopenssl 3.5.2 and libzstd DLLs
> over the ones Git for Windows ships (OpenSSL 3.5.9, and an identical zstd).
> * Download, check, install, verify and clean up each tool in one RUN, so no
> installer or archive stays in a lower layer, and check the exit codes of the
> Visual Studio, JDK and Visual C++ 2010 installers.
> * Set PATH once, for all users, instead of seven per-user {{setx}} calls.
> * Copy only the Python scripts and the requirements file from
> {{pkg-resolver}}, so changes to the Linux scripts there no longer invalidate
> the Windows image's later layers.
> * BUILDING.txt: the image is now about 14 GB.
> Every version chosen is at least 7 days old, as SECURITY.md's cooldown
> requires ({{.github/dependabot.yml}} uses 7 days). Git for Windows 2.56.1, a
> security release, qualifies on 17 November; the pull request will move to it
> then.
> *Testing*
> [Fork run
> 43631843328|https://github.com/GauthamBanasandra/hadoop/actions/runs/43631843328]
> tested this change on top of HADOOP-20087, with the trial GitHub Actions
> workflow in my fork that is not part of this change. The pull request links a
> run of its final version. Sizes are in decimal GB; the run summaries print
> GiB.
> * The default (ltsc2022) image built on windows-2022 in 39 minutes: 14.4 GB,
> 5.8 GB compressed, down from 16.9 GB and 6.6 GB with HADOOP-20087 alone. As
> the build user, the image has Visual Studio 16.11.62, git 2.56.0.windows.4
> and rsync 3.5.1 (which starts), and pip lists only pip 24.0, setuptools
> 65.5.1, python-dateutil 2.8.1 and six 1.17.0, with {{pip check}} passing.
> Nothing is left in {{C:\}} or {{C:\ProgramData}} apart from the installed
> tools.
> * The ltsc2019 image, the Jenkins path, built under Hyper-V on windows-2022
> (10.0.17763.9488): 14.2 GB, down from 16.0 GB. Its entry point, rsync and
> {{pip check}} ran.
> * Full {{\-Pnative-win}} builds and the native smoke test passed on
> windows-2022 and windows-2025 under process isolation and on windows-2022
> under Hyper-V isolation. The Windows-specific unit tests passed on
> windows-2022: 12 classes, 275 tests, no failures, 33 skipped, with the same
> six methods excluded as for HADOOP-20087.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]