Bump Go to 1.17.5 and start using modules#218
Bump Go to 1.17.5 and start using modules#218errordeveloper wants to merge 2 commits intodocker:masterfrom
Conversation
thaJeztah
left a comment
There was a problem hiding this comment.
Was this to fix the vendor failure on that PR? So;
go: finding module for package camlistore.org/pkg/throttle
github.com/docker/docker/libnetwork imports
github.com/docker/libkv/store/zookeeper imports
github.com/samuel/go-zookeeper/zk tested by
github.com/samuel/go-zookeeper/zk.test imports
camlistore.org/pkg/throttle: module camlistore.org@latest found (v0.0.0-20171230002226-a5a65f0d8b22), but does not contain package camlistore.org/pkg/throttle
github.com/docker/docker/daemon/logger/gcplogs imports
cloud.google.com/go/logging imports
cloud.google.com/go tested by
cloud.google.com/go.test imports
cloud.google.com/go/bigquery imports
cloud.google.com/go/internal/detect: module cloud.google.com/go@latest found (v0.99.0, replaced by cloud.google.com/go@v0.44.3), but does not contain package cloud.google.com/go/internal/detect
I'm not strictly against doing this, but overall, we should try to deprecate / replace this package;
the require lines in this repository likely shouldn't affect the Moby PR (as it would already default to picking "latest"), and (as mentioned) the replace directive is non-transitional, so would still be needed in the moby repository; wondering if we should start with adding (if needed) replace lines in the Moby PR 🤔
go.mod
Outdated
|
|
||
| require ( | ||
| github.com/coreos/etcd v3.3.25+incompatible | ||
| github.com/hashicorp/consul/api v1.1.0 |
There was a problem hiding this comment.
Comparing this with the current version used in moby; hashicorp/consul@v0.5.2...api/v1.1.0
There was a problem hiding this comment.
Here is another problem, go mod tidy trips over this library because v0.5.2 doesn't use models, but new version of it does. Without and there is no issue with this library at all until you run go mod tidy...
There was a problem hiding this comment.
github.com/docker/docker/libnetwork imports
github.com/docker/libkv/store/consul imports
github.com/hashicorp/consul/api loaded from github.com/hashicorp/consul@v0.5.2,
but go 1.16 would fail to locate it:
ambiguous import: found package github.com/hashicorp/consul/api in multiple modules:
github.com/hashicorp/consul v0.5.2 (/Users/ilya/Code/moby/.gopath/pkg/mod/github.com/hashicorp/consul@v0.5.2/api)
github.com/hashicorp/consul/api v1.1.0 (/Users/ilya/Code/moby/.gopath/pkg/mod/github.com/hashicorp/consul/api@v1.1.0)
@crazy-max and I tried a few different replace options, still the same issue...
go.mod
Outdated
| require ( | ||
| github.com/coreos/etcd v3.3.25+incompatible | ||
| github.com/hashicorp/consul/api v1.1.0 | ||
| github.com/samuel/go-zookeeper v0.0.0-20201211165307-7117e9ea2414 |
There was a problem hiding this comment.
Comparing this one as well samuel/go-zookeeper@d0e0d8e...7117e9e
| github.com/coreos/etcd v3.3.25+incompatible | ||
| github.com/hashicorp/consul/api v1.1.0 | ||
| github.com/samuel/go-zookeeper v0.0.0-20201211165307-7117e9ea2414 | ||
| github.com/stretchr/testify v1.7.0 | ||
| go.etcd.io/bbolt v1.3.6 |
| sigs.k8s.io/yaml v1.3.0 // indirect | ||
| ) | ||
|
|
||
| replace google.golang.org/grpc => google.golang.org/grpc v1.23.0 |
There was a problem hiding this comment.
note that replace rules are non-transitive, so this line would still be needed in moby/moby
Signed-off-by: Ilya Dmitrichenko <errordeveloper@gmail.com>
28d170e to
a06a008
Compare
|
|
||
| go: | ||
| - 1.8.7 | ||
| - 1.17.5 |
There was a problem hiding this comment.
CI seems broken, I will open a PR to fix it first if you want. SGTY @thaJeztah?
There was a problem hiding this comment.
Yeah, although don't spend too much time on it; we really need to reduce use of this dependency (it's good to know if things are not broken of course)
There was a problem hiding this comment.
Yeah that's a huge jump 1.8 > 1.17, better to do that in a follow-up 😅
There was a problem hiding this comment.
I guess I'm just being very opportunistic and putting all my trust in Go's backwards compatibility promise 😹
And, to be fair, this has already been built in Moby using all mort recent versions of Go...
Yes. Just trying to address the issue with zookeeper client and it's dead camlistore.org dependency... I'm still quite confused about these. Will report back once I have a slightly clearer idea. |
I tried, and it didn't work. I think I'll need to update this repo to use the new client, make it work and go back to Moby. It also looks like the issue in Moby PR comes to surface when |
Gotcha; so I didn't initially notice (thanks @crazy-max) that CI wasn't running on this PR, and thought no local changes were needed (besides the go module versions) |
I was hoping CI would run... I ran |
Yeah zookeeper, etcd and consul bins seems to be required. |
|
Can we re-enable Travis for this repo? |
| "github.com/docker/libkv" | ||
| "github.com/docker/libkv/store" | ||
| zk "github.com/samuel/go-zookeeper/zk" | ||
| zk "github.com/go-zookeeper/zk" |
There was a problem hiding this comment.
This seems to work without further changes!
|
Coming for now in favour of #219. Switching to modules wasn't as helpful as I originally thought it might be :) |
- use `vendor.mod` instead of `go.mod` to avoid issues to do with use of CalVer, not SemVer - ensure most of the dependency versions do not change - only zookeeper client has to change (via docker/libkv#218) as previously used version is no longer maintained and has missing dependencies
- use `vendor.mod` instead of `go.mod` to avoid issues to do with use of CalVer, not SemVer - ensure most of the dependency versions do not change - only zookeeper client has to change (via docker/libkv#218) as previously used version is no longer maintained and has missing dependencies Signed-off-by: Ilya Dmitrichenko <errordeveloper@gmail.com>
- use `vendor.mod` instead of `go.mod` to avoid issues to do with use of CalVer, not SemVer - ensure most of the dependency versions do not change - only zookeeper client has to change (via docker/libkv#218) as previously used version is no longer maintained and has missing dependencies Signed-off-by: Ilya Dmitrichenko <errordeveloper@gmail.com>
- use `vendor.mod` instead of `go.mod` to avoid issues to do with use of CalVer, not SemVer - ensure most of the dependency versions do not change - only zookeeper client has to change (via docker/libkv#218) as previously used version is no longer maintained and has missing dependencies Signed-off-by: Ilya Dmitrichenko <errordeveloper@gmail.com>
- use `vendor.mod` instead of `go.mod` to avoid issues to do with use of CalVer, not SemVer - ensure most of the dependency versions do not change - only zookeeper client has to change (via docker/libkv#218) as previously used version is no longer maintained and has missing dependencies Signed-off-by: Ilya Dmitrichenko <errordeveloper@gmail.com>
- use `vendor.mod` instead of `go.mod` to avoid issues to do with use of CalVer, not SemVer - ensure most of the dependency versions do not change - only zookeeper client has to change (via docker/libkv#218) as previously used version is no longer maintained and has missing dependencies Signed-off-by: Ilya Dmitrichenko <errordeveloper@gmail.com>
- use `vendor.mod` instead of `go.mod` to avoid issues to do with use of CalVer, not SemVer - ensure most of the dependency versions do not change - only zookeeper client has to change (via docker/libkv#218) as previously used version is no longer maintained and has missing dependencies Signed-off-by: Ilya Dmitrichenko <errordeveloper@gmail.com>
- use `vendor.mod` instead of `go.mod` to avoid issues to do with use of CalVer, not SemVer - ensure most of the dependency versions do not change - only zookeeper client has to change (via docker/libkv#218) as previously used version is no longer maintained and has missing dependencies Signed-off-by: Ilya Dmitrichenko <errordeveloper@gmail.com>
- use `vendor.mod` instead of `go.mod` to avoid issues to do with use of CalVer, not SemVer - ensure most of the dependency versions do not change - only zookeeper client has to change (via docker/libkv#218) as previously used version is no longer maintained and has missing dependencies Signed-off-by: Ilya Dmitrichenko <errordeveloper@gmail.com>
- use `vendor.mod` instead of `go.mod` to avoid issues to do with use of CalVer, not SemVer - ensure most of the dependency versions do not change - only zookeeper client has to change (via docker/libkv#218) as previously used version is no longer maintained and has missing dependencies Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
- use `vendor.mod` instead of `go.mod` to avoid issues to do with use of CalVer, not SemVer - ensure most of the dependency versions do not change - only zookeeper client has to change (via docker/libkv#218) as previously used version is no longer maintained and has missing dependencies Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
- use `vendor.mod` instead of `go.mod` to avoid issues to do with use of CalVer, not SemVer - ensure most of the dependency versions do not change - only zookeeper client has to change (via docker/libkv#218) as previously used version is no longer maintained and has missing dependencies Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This is needed for moby/moby#43075