synchronize replace rules in integration/client go.mod with main go.mod#5272
synchronize replace rules in integration/client go.mod with main go.mod#5272fuweid merged 2 commits intocontainerd:masterfrom
Conversation
There was a problem hiding this comment.
I updated the go.mod by removing all require rules, except for github.com/Microsoft/hcsshim/test, and let go mod tidy add back the versions (based on the go mod dependency tree)
There was a problem hiding this comment.
If we need to do this for integration/client, does that mean any other random client importing containerd/containerd needs to copy over these replace rules too?
There was a problem hiding this comment.
Yes; replace rules are only respected locally, and ignored everywhere else (they were designed for local debugging only), so every consumer must copy those rules; which is why we should try to get rid of them
There was a problem hiding this comment.
Buildkit at some point had (I think deliberately) versions that didn't compile unless overridden for that reason (which was needed because go mod wasn't able to resolve the correct version and it broke several times) moby/buildkit#1425 and issues linked from/to that
There was a problem hiding this comment.
Looks like we need more effort to sync the version between two go.mod. sad :(
There was a problem hiding this comment.
github.com/containerd/containerd v1.5.0-beta.3
could we possible to change it to github.com/containerd/containerd v0.0.0. In main branch, the tag doesn't make senses.
There was a problem hiding this comment.
and I think we need to change the package name from containerd to client.
There was a problem hiding this comment.
could we possible to change it to github.com/containerd/containerd v0.0.0. In main branch, the tag doesn't make senses.
I tried replacing, but it became a bit messy; I also tried changing it to version v1.0.0 (to better show "hey, this version is bogus"), but Microsoft/hcsshim/test depends on containerd/containerd v1.5.0-beta.4, so go mod changed it back to v1.5.0-beta.4.
and I think we need to change the package name from
containerdtoclient.
yes, makes sense; I pushed a commit to rename it
|
Why are there two go mods in the first place? |
To make it a separate module with its own dependency tree; this prevented dependencies that are only used in this test suite becoming a dependency of containerd itself. It's partially fixed now (since microsoft/hcsshim#984) but before that PR, importing microsoft/hcsshim als caused whole of kubernetes (and all of its dependencies) to become a dependency of containerd (and vendored) |
Signed-off-by: Sebastiaan van Stijn <[email protected]> asdlkjasdlkj Signed-off-by: Sebastiaan van Stijn <[email protected]>
Signed-off-by: Sebastiaan van Stijn <[email protected]>
fd8f9e7 to
1faca34
Compare
|
Build succeeded.
|
Add some comments explaining how the go.mod files relate to each other.