THRIFT-6237: Shrink the MSVC Docker image - #3844
Conversation
|
@Jens-G there where some changes to what .net versions we support (i don't have any expierience in this area) |
Not sure what the quesiton is, but try to answer the best I can:
In the past we had two different packages, the original NET Framework one, from which the new dotnet one emerged as a separte library package. These finally got consolidated into what we have today, essentially dropping native NET Framework in favour of netstandard2.x. So it might be well that the NET Framework you are about to remove is some relict from that time. Does that answer the question? |
e6ec7a2 to
698b56b
Compare
|
Yes, that answers it, thanks. The Framework base was exactly that relic: the C++ build uses the separately installed Build Tools, and the only thing still needed from a Framework SDK is the 4.7.2 targeting pack for the C++/CLI test project, which is now a Build Tools component. One coupling to note for November: every lib/netstd project tops out at net10.0, and the SDK 10 image cannot build a net11 target. When you add net11, the FROM line in build/docker/msvc/Dockerfile must move to mcr.microsoft.com/dotnet/sdk:11.0 in the same change. Branch rewritten: the two commits are squashed into one, rebased on current master (which picks up the TNonblockingServerTest fix from THRIFT-6244 that caused the AppVeyor failure here), and a comment next to This comment was created with AI assistance. |
Client: build Base the image on the .NET 10 SDK image instead of the .NET Framework SDK image: the C++ build uses the separately installed VS 2022 Build Tools, and lib/netstd only needs the dotnet CLI (all test projects target net10.0). Drop jdk8, which CMake never used (Java library OFF, Gradle missing), the Boost debug and static-runtime variants, the OpenSSL debug libraries and the redundant curl package, and pin the Chocolatey packages. Node.js moves to the LTS line. Swapping the base image drops the .NET Framework reference assemblies that lib/cpp/test/testgencppCLI.vcxproj (C++/CLI) needs, so cmake --build failed with MSB3644. The 4.7.2 targeting pack is added as a Build Tools component instead of relying on the base image for it. PATH is extended in the machine-scope registry key instead of through user-scope SETX, which re-embeds the expanded PATH on every call and truncates at 1024 characters. Cleanup FOR and IF commands are wrapped in parentheses: cmd treats everything after them, including "&& next", as their body, so the SETX calls that followed them ran inside the loop, or only when the directory existed. OpenSSL moves to 3.6.4 because slproweb no longer serves the 3.6.2 installer, which made the previous Dockerfile fail to build. The workflow hashes the two copied appveyor scripts together with the Dockerfile so that editing them produces a new image tag. The "Pull cached image" step no longer ends in "Process completed with exit code 1" on the build-from-scratch path: the runner exits a pwsh step with the last native command's exit code, which after a "manifest unknown" pull is 1, and continue-on-error hid it. The step now exits 0 there and continue-on-error is dropped, so a real pull failure fails the job at the pull instead of at the container build with no image. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
698b56b to
5da8aa7
Compare
|
Rewritten again (5da8aa7): the This comment was created with AI assistance. |
|
Let's see the net11 RTM first. I'm not going to invest time before that. |
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. 🤖 Generated with Claude Code |
Follow-up to THRIFT-5952. The MSVC CI image is 6.3 GiB compressed and every run pulls all of it, because the
windows-2025runners pre-cache no container images. The last full rebuild took 53 minutes against the 60 minute step timeout. Measurements and the full list of findings are in THRIFT-6237.What the diff does not show:
MSVC 19.44in the CMake log), and alllib/netstdtest projects targetnet10.0. The .NET 10 SDK image is 2.7 GiB.lib/cpp/test/testgencppCLI.vcxproj(C++/CLI). Without themcmake --buildfails with MSB3644 andbuild.batskips ctest, so CI reported a missingLastTest.lograther than a test result. The targeting pack is now a Build Tools component.lib/netstd: an SDK 10 image cannot build anet11.0target. A comment next toFROMsays so.&& nextafterIF ...orFOR ... DOas part of that command's body. TheSETXcalls that followed the cleanup loops therefore ran once per loop iteration, or only when the directory existed. The loops are now parenthesised and placed after the environment writes, and PATH is written to the machine-scope registry key, which has no 1024 character SETX limit.COPY'd appveyor scripts never produced a new image.Pull cached imagestep ended inError: Process completed with exit code 1on every build-from-scratch run: the runner exits a pwsh step with the last native command's exit code, which after amanifest unknownpull is 1, andcontinue-on-errorhid it. The step now exits 0 on that path andcontinue-on-erroris dropped, so a real pull failure fails the job at the pull rather than at the container build with no image.nodejspackage resolved to when the current image was built.Verified: upstream run 34623301653 and fork run 34623297376 → image builds from scratch and all tests pass. The pull_request run skips the GHCR push, so the first master run after merge rebuilds and pushes the image.
[skip ci]anywhere in the commit message to free up build resources.This change was created with AI assistance.