[release/1.7 backport] Windows: Supply windows shim version via file#10403
Merged
samuelkarp merged 2 commits intocontainerd:release/1.7from Jul 1, 2024
Merged
Conversation
Somewhat similar to how we supply the version of runc to grab for testing via a file in script/, this change supplies the Windows shim version to build off of via a file in the same directory. This seems like a decent home given it now lives next to the script that pulls and builds the shim to include in our build artifacts/locally. The motivation behind this change is: Cut down on unneccessary hcsshim vendorings if no library code for containerd changed. It was some what clunky how the Windows builds work today. The Windows shim is developed out of tree at github.com/microsoft/hcsshim. To let containerd know what tag to build the shim off of we'd vendor hcsshim into containerd, and then parse the version string from go.mod, fetch this tag, and then build the shim and include it in our artifacts. As mentioned, often times the vendoring would bring in no actual changes that would affect containerd's usage of hcsshim as a library, and would just serve as a means to bump the version of the containerd shim we should build. Now this process can be a one line change and we can avoid the possible headaches that come with bumping go.mod (bumping other unrelated deps etc.) Signed-off-by: Danny Canter <[email protected]> (cherry picked from commit 15b13fb) Signed-off-by: Sebastiaan van Stijn <[email protected]>
update the version to match what was previously obtained from the module version. Signed-off-by: Sebastiaan van Stijn <[email protected]>
dmcgowan
approved these changes
Jul 1, 2024
samuelkarp
approved these changes
Jul 1, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Somewhat similar to how we supply the version of runc to grab for testing via
a file in script/, this change supplies the Windows shim version to build off
of via a file in the same directory. This seems like a decent home given it now
lives next to the script that pulls and builds the shim to include in our build
artifacts/locally.
The motivation behind this change is:
Cut down on unneccessary hcsshim vendorings if no library code for containerd
changed. It was some what clunky how the Windows builds work today. The Windows
shim is developed out of tree at github.com/microsoft/hcsshim. To let containerd know
what tag to build the shim off of we'd vendor hcsshim into containerd, and then
parse the version string from go.mod, fetch this tag, and then build the shim and
include it in our artifacts. As mentioned, often times the vendoring would bring in
no actual changes that would affect containerd's usage of hcsshim as a library, and
would just serve as a means to bump the version of the containerd shim we should build.
Now this process can be a one line change and we can avoid the possible headaches that come
with bumping go.mod (bumping other unrelated deps etc.)