Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use fixed version build tools link #430

Merged

Conversation

plemarquand
Copy link
Contributor

@plemarquand plemarquand commented Nov 12, 2024

The current link to the VS build tools points to an evergreen bootstrapper. This means that when a new v17 buildtools.exe is available the link is updated with the new version.

Since we're verifying that the downloaded buildtools.exe file hash matches a known value the windows Docker setup breaks each time a new buildtools is released.

Instead, use a fixed version permalink that will not change. The specific version used is version 17.12.0, build 17.12.35506.116.

See: https://learn.microsoft.com/en-gb/visualstudio/releases/2022/release-history#fixed-version-bootstrappers

@shahmishal
Copy link
Member

cc: @compnerd

@compnerd
Copy link
Member

I do like the idea that we are pinned for the docker image creation. However, this also means that we need someone to continually update the compiler. Right now, the docker image creation process would inform us that the toolchain has been updated, after this change, we would need to have some sort of process to ensure that we do get periodic updates for the toolchain.

@plemarquand
Copy link
Contributor Author

Is it important that we stay on the latest build tools? I had assumed we'd only really need to update once we need a new version of a build dependency.

One big issue with the way things stand right now is that no one can build on top of these images to make their own. At any given time someone doing a docker build with a FROM swift-docker:whatever-windows-image may or may not have a working base image to use, and its out of their control until we fix the SHA.

@compnerd
Copy link
Member

For the CI images, I think that it is quite important that we stay on the latest build tools. The build tools includes the C/C++ runtime headers and we need/want those to be up-to-date.

For user images, I think that updating at the time of release is not too terrible (I wouldn't call it ideal, but that is something that we could be a bit flexible on).

@compnerd
Copy link
Member

Also, perhaps this is a good time to update the images to 17.12.0 😆.

The current link to the VS build tools points to an evergreen
bootstrapper. This means that when a new v17 buildtools.exe is
available the link is updated with the new version.

Since we're verifying that the downloaded buildtools.exe file hash
matches a known value the windows Docker setup breaks each time a new
buildtools is released.

Instead, use a fixed version permalink that will not change. The
specific version used is version `17.12.0`, build `17.12.35506.116`.

See: https://learn.microsoft.com/en-gb/visualstudio/releases/2022/release-history#fixed-version-bootstrappers
@plemarquand plemarquand force-pushed the fixed-version-windows-build-tools branch from 5891df5 to 6fc137f Compare November 12, 2024 21:26
@plemarquand
Copy link
Contributor Author

You're certainly right, I've updated to the latest version 17.12.0.

@compnerd
Copy link
Member

For the fixed version docker images, I think that the pinned version makes sense. For the nightly and swift-ci images, I'm less convinced.

@plemarquand
Copy link
Contributor Author

Is the guidance to just update the SHA for the nightly and swift-ci images? How will we know the SHA needs to be updated when the build tools change?

@compnerd
Copy link
Member

Well, the nightly image creation should hopefully be running nightly and tell us that the build has failed. Likewise, for the swift-ci images, we should be updating that semi-regularly and should be able to tell when the deployment fails.

@plemarquand
Copy link
Contributor Author

@compnerd I've reverted the nightly and ci images to use the evergreen link, updating the SHA to match the latest version of the file.

I'm still a little confused as to how/why this SHA is out of date if things are supposed to be failing in nightly builds whenever they update the build tools.

@plemarquand
Copy link
Contributor Author

@shahmishal Is this ready to merge?

@compnerd
Copy link
Member

Yeap, this is ready to go!

@compnerd compnerd merged commit 214c288 into swiftlang:main Nov 19, 2024
1 check passed
@plemarquand plemarquand deleted the fixed-version-windows-build-tools branch November 20, 2024 00:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants