-
Notifications
You must be signed in to change notification settings - Fork 259
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
Minimum Go version is now at least 1.13 #950
Comments
I note that #956 has gone the other way, and enforced use of the vendor/ directory in CI over modules. >_< I guess at least this way, CI will ensure people haven't forgotten to |
I'm looking into this :) Will get back to you |
Okay, talking to the team a bit, it sounds like we don't want to switch to modules since having a dedicated vendor/ directory gives us extra protection (such as if a dependency disappears off the internet or somehow is compromised). Besides that, I see no issue with bumping the min go version to 1.15 |
How would you feel about dropping |
I was looking at our go.mod right now and then remembered this issue vaguely 😆 Are we all good to close this one out now that we're on 1.17? (although maybe we could get a new issue to look into "solving" the /tests vendor directory mess..) |
Re the An alternative is to move the test suite out of hcsshim and into a dedicated repository, but I'm not sure we want to do that. Particularly considering that would make the dev experience more difficult -- to run the tests, you'd have to push the code to a remote so that you could then pull those changes via a re-vendor into the test suite's repository, then rebuild. Could also lead to more test breaks since we likely wouldn't update that repository every time we made a change to the hcsshim repository. I'm open to suggestions, but otherwise I don't see much we can do to improve here right now. |
'Mess' is me exaggerating but it's a pain right now to |
For the tests, I'd take the "a dep might disappear off the face of the earth" risk in order to not have to I agree that separating the tests into a different repo seems like a worse outcome overall. I haven't looked at it too closely, but perhaps the new Go Workspaces support in 1.18 would reduce the pain of the separate test/ directory by making the |
These tests are used to validate code when we make new releases and new features. In a worst-case scenario, a dependency could be compromised suddenly, and we then silently have tests that we don't trust. So I think we're stuck with the test modules to protect against that and the dependencies disappearing. The go workspaces sound promising from a quick look! We should look into it more. |
2 cents: keeping all deps inside hcsshim repo is a poor solution for "all deps are suddenly gone" scenario.
|
On reflection, my main annoyance with test/vendor is that it vendors And if you forget to Looking at the list of test dependencies, I don't really expect any of them to fall off the Internet, as they're pretty essential to the containers ecosystem. In fact, a brief survey suggests that only one that isn't also required by hcsshim itself (and hence in its vendor directory) is So perhaps another idea: Have just the CRI tests (test/cri-containerd) in a separate module, and lift the rest of the tests up into the parent module. Given the purpose of CRI, I suspect that the direct dependency list of test/cri-containerd would come down to This might also be valuable as an insight for CRI users to see what sort of behaviours, e.g. annotations, os versions, one can expect for a CRI runtime backed by hcsshim, and what packages they need to pull in to access them. And maybe as a service to users, That might let you get in a situation where you only need to |
I've put up a PR to lock-in Go 1.17. A separate issue for discussion of the test/vendor directory (or test module structure as I flagged in my last comment) is probably a good idea, give how far this ticket has strayed from my original "Can I use 1.13-specific features now please?". Although while I think about it, does the Go Proxy system guarantee that existing versions of modules won't fall off the face of the earth, even if their backing repo disappears? See the FAQ:
but
|
The README still lists "Go 1.9 or newer to build", but it's really Go 1.13, due to use in
containerd
modules oferrors.As
anderrors.Is
, introduced in Go 1.13.Containerd claims 1.15 minimum, as seen above, but the same command with go1.13.15.exe doesn't fail to build.
Note that before #946 pulled in the newer containerd, the minimum was 1.12, due to hcsshim's use of exec.ExitError.ExitCode introduced in Go 1.12.
I'd propose to bump the minimum to Go 1.13 or higher, and also as part of that, drop the vendor directories, as keeping those (particularly tests/vendor) up to date is the slowest part of rebasing and cleaning PRs for review; since Go 1.13 has modules on-by-default, there should be no ecosystem pieces that hcsshim depends on which depend on the vendor/ tree once Go 1.13 is the minimum.
gometalinter
is the only cause for concern in the AppVeyor script, I haven't checked how it works with withoutvendor/
, but it's only doinggofmt
anyway, so I don't expect issues there.go.mod already claims Go 1.13 minimum, but Go 1.12 without modules enabled would have ignored that anyway.
AppVeyor CI currently uses Go 1.15, to support
-gcflags=all=-d=checkptr
, since #926, and Go 1.13.4 before that, so any claims for support of Go 1.12 or earlier were untested by the public CI.containerd is 1.15 minimum since 1.4.0, and Docker Engine 19.03, 20.10 and master are all using Go 1.13 in their Dockerfile. I am unaware of what else might be vendoring hcsshim.
Microsoft go-winio may do so in future (microsoft/go-winio#187), but only for a test, not primary functionality, so this should not have a knock-on effect there. They list Go 1.12 minimum in their go.mod.
If we need to regain Go 1.12 support, we have to back out #946, and #947 which depended on it, and reconsider how to implement #901, possibly reinstating the first version of the hard-link support that didn't require #947. This would also block updating to containerd 1.4, which also includes the use of
errors.Is
.The text was updated successfully, but these errors were encountered: