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 of deprecated libcontainer/configs.Device preventing upgrade of runc in 20.10.11 #43067
Comments
Having a quick look, but image-spec v1.0.2 does not yet use go modules, https://github.com/opencontainers/image-spec/tree/v1.0.2, and the main branch does not appear to have runc as a dependency; https://github.com/opencontainers/image-spec/blob/eacdcc10569b68a90558220b29d115363a26790c/go.mod That said, you may be able to find which dependency enforces the update, using, e.g. go mod graph | grep ' github.com/opencontainers/runc' These things are tricky though, because, although I'm not sure if we'd be able to update the dependency in the 20.10 branch; it's a large diff (given, not all of that may affect the code we use), which brings a large risk for a patch release; opencontainers/runc@v1.0.0-rc92...v1.0.3 If the code you're using in your project does not strictly require the updated runc version, you may be able to work around this by using a |
@thaJeztah Thanks for taking a look! I kind of buried the lede a bit with the issue, sorry about that. Interestingly, this happens even without any other dependencies. Hopefully this helps. You can reproduce this with the following steps:
|
Ah, gotcha; so what happens in your case is that you try to initialise your module, and have The issue with that is that (for various reasons) this repository does not yet provide a Go modules depends on SemVer to determine what version to use. In an "ideal world", SemVer would indeed work to determine if a dependency is compatible (minor and patch versions should be compatible), but this often isn't the case. For that reason, we pin dependencies to specific versions that are known to be compatible (we have historically run into dependencies that "appeared" compatible, but caused obscure problems that only revealed themselves in some scenarios). For some dependencies that even means pinning to a specific commit which may be "behind" or "ahead" of a tagged release. To make this work with Go modules;
The |
Thanks for the explanation! Since this question was answered, I think this can be closed out. |
add a "replace github.com/opencontainers/runc v1.1.0 => github.com/opencontainers/runc v1.0.0-rc90" into go.mod |
Description
We are using github.com/google/go-containerregistry v0.5.1 and trying to upgrade to v0.7.0. This version forces an upgrade of some other dependencies as well. I believe that the upgrade of github.com/opencontainers/image-spec v1.0.1 to v1.0.2-0.20210730191737-8e42a01fb1b7 might be causing this error.
The problem appears to have been resolved in master, in this commit: d414c0c - however that commit does not exist in the 20.10.11 tree: https://github.com/moby/moby/blob/v20.10.11/oci/devices_linux.go
Steps to reproduce the issue:
I'm not entirely sure how to reproduce this, somehow upgrading go-containerregistry also resulted in several other upgrades, one of which results in the following error:
Describe the results you received:
Full list of changes to go.mod and go.sum:
The minimal test case to reproduce is to create a Go program with the following contents:
Now, run
go mod tidy
(I've omitted my output for brevity) and try to compile it:Describe the results you expected:
Additional information you deem important (e.g. issue happens only occasionally):
Output of
docker version
:Output of
docker info
:Additional environment details (AWS, VirtualBox, physical, etc.):
The text was updated successfully, but these errors were encountered: