GauthamBanasandra opened a new pull request, #8994:
URL: https://github.com/apache/hadoop/pull/8994

   ### Description of PR
   
   [HADOOP-20087](https://issues.apache.org/jira/browse/HADOOP-20087). 
`dev-support/docker/Dockerfile_windows_10`
   builds from `servercore:ltsc2019` by tag, and the tag moves with every 
monthly update. GitHub's
   windows-2022 and windows-2025 runners can run ltsc2019 only under Hyper-V 
isolation. In fork runs,
   Hyper-V isolation made the Maven build 1.07x to 1.46x slower than process 
isolation, depending on
   the runner's VM type. This prepares the image for a GitHub Actions Windows 
build (HADOOP-19857):
   
   - **Base:** a build argument, defaulting to `servercore:ltsc2022` pinned by 
digest
     (10.0.20348.5761, the base the fork runs below tested), so the default 
base changes only when
     the Dockerfile does. The Dockerfile notes to bump the digest monthly, no 
sooner than 7 days after
     Microsoft publishes the image (SECURITY.md requires a cooldown; 
`.github/dependabot.yml` uses 7 days).
   - **Visual Studio Build Tools:** check that `vcvars64.bat` runs, `cl.exe` is 
found and Windows SDK
     10.0.19041 is present. Today the install step passes even when the 
installer fails: `start /w`
     reports success to `||` whatever the installer returns (it only sets 
`%ERRORLEVEL%`), so its
     `IF "%ERRORLEVEL%"=="3010"` test never runs.
   - **vcpkg:** delete the build trees, downloads and packages in the same 
layer as the install, and turn
     off the binary cache, which kept a second copy of every package. The image 
shrinks from about
     24.4 GB to 16.9 GB, and from about 8.8 GB to 6.6 GB compressed. Recent 
runs of the Jenkins Windows
     nightly (#1471, #1477 to #1479) failed in `docker build` with "There is 
not enough space on the disk".
   - **`C:\tmp`:** created, writable by the Users group. Tests that use 
`file:///tmp` resolve it to
     `C:\tmp`; on a host without it, 
`TestPathData#testWithStringAndConfForBuggyPath` fails.
   - **`dev-support/bin/hadoop.sh`:** passes `-Dwindows.cmake.prefix.path`, the 
property
     hadoop-hdfs-native-client reads, instead of `-Dcmake.prefix.path`. This 
affects only the Yetus
     build that the Jenkins Windows jobs run.
   - **`build_image_cache.yml`:** changes to the Windows Dockerfile and 
`dev-support/docker/vcpkg` no
     longer rebuild the Linux image caches. No Linux Dockerfile reads them.
   - **BUILDING.txt:** which hosts need the ltsc2019 build argument, Docker 
Engine on Windows Server,
     which isolation to use on client and server hosts, when `-m 8g` is needed, 
and the image size.
   
   #### Behaviour change, and a step before merging
   
   Building without the `WINDOWS_BASE_IMAGE` build argument now needs a Windows 
11 or Windows Server
   2022 (or newer) host. Windows 10 and Windows Server 2019 hosts pass
   `--build-arg 
WINDOWS_BASE_IMAGE=mcr.microsoft.com/windows/servercore:ltsc2019` and keep 
following
   that tag, as before; `dev-support/jenkinsfile-windows-10` now passes it.
   
   The Jenkins nightly `hadoop-qbt-trunk-java8-win10-x86_64` keeps its pipeline 
script in the job
   configuration rather than reading `jenkinsfile-windows-10`, so the same 
argument has to be added to
   its `docker build` **before this is merged**, or the nightly switches to the 
ltsc2022 base. Docker
   only warns about an unused build argument, so the job can be updated first. 
I have the updated
   job script ready; ci-hadoop.apache.org has been unreachable since 12 
November, so it is not
   applied yet.
   
   ### 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 here are in decimal GB; the run summaries print GiB.
   
   - [Fork run 
42493777552](https://github.com/GauthamBanasandra/hadoop/actions/runs/42493777552)
     tested this change; since then only comments and a Linux-cache path filter 
have changed. It shows
     as failed because of its ltsc2019 job, explained below.
     - The default (ltsc2022) image built on windows-2022: 16.9 GB, 6.6 GB 
compressed (15.75 and
       6.13 GiB in the run summary).
     - It then passed full `-Pnative-win` builds (120/120 modules, with 
`-DskipTests`) and a 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 only: 12 classes in 
hadoop-common,
       hadoop-hdfs and hadoop-yarn-common, 275 tests, no failures, 33 skipped. 
The run excluded six
       methods that fail both on windows-2022 and in Jenkins nightly #1470 
(this change does not exclude
       them): `TestFileUtil#testUnZip`, `#testFailFullyDeleteDirSymlinks`, 
`#testSymlinkSameFile` and
       `#testGetDU`, `TestNativeIO#testFstat`, and 
`TestFsShellCopy#testPutSrcFileNoPerm` (HADOOP-19599).
     - The ltsc2019 image built under Hyper-V on windows-2022 (10.0.17763.9378, 
16.0 GB) and its entry
       point ran. That job shows as failed only because the fork workflow did 
not clear the expected
       exit code 3 of its entry point check: `docker build` exited 0, and the 
log shows "The entry point
       returned 3 (expected 3)". This ltsc2019 image was not put through a full 
build.
   - On trunk, the Jenkins nightly is the only CI job that builds the ltsc2019 
path, and by 12 November
     none of its runs since HADOOP-20031 (#1470 to #1481) had completed a full 
build. #1470 built the
     image and 117 of the 120 modules, but failed to compile 
hadoop-yarn-applications-catalog-webapp
     (`-endorseddirs` cannot be used with `--release`).
   - [Fork run 
43083636020](https://github.com/GauthamBanasandra/hadoop/actions/runs/43083636020)
 started
     the 10 November ltsc2022 base (10.0.20348.5870) under process isolation on 
three windows-2022 hosts
     still at 10.0.20348.5773, and on a windows-2025 host. Earlier runs built 
Hadoop under process
     isolation from the older 5761 base on newer hosts. This agrees with 
Microsoft's documentation that
     from Windows Server 2019 on, the base need not match the host's revision.
   
   ### 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]

  • [PR] HADOOP-20087. Pin th... GauthamBanasandra (via GitHub) via common-issues

Reply via email to