Skip to content
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

go get -u fails, apparently due to coreos/etcd move #817

Closed
newrelic-eheinlein opened this issue Oct 3, 2019 · 17 comments
Closed

go get -u fails, apparently due to coreos/etcd move #817

newrelic-eheinlein opened this issue Oct 3, 2019 · 17 comments
Labels
go.mod Issues related to go modules

Comments

@newrelic-eheinlein
Copy link

Go version: go1.13
Problem: when I run go get -u github.com/micro/go-micro I get the following error:

# github.com/coreos/etcd/clientv3
src/github.com/coreos/etcd/clientv3/auth.go:121:72: cannot use auth.callOpts (type []"github.com/coreos/etcd/vendor/google.golang.org/grpc".CallOption) as type []"go.etcd.io/etcd/vendor/google.golang.org/grpc".CallOption in argument to auth.remote.AuthEnable
src/github.com/coreos/etcd/clientv3/auth.go:126:74: cannot use auth.callOpts (type []"github.com/coreos/etcd/vendor/google.golang.org/grpc".CallOption) as type []"go.etcd.io/etcd/vendor/google.golang.org/grpc".CallOption in argument to auth.remote.AuthDisable
src/github.com/coreos/etcd/clientv3/auth.go:131:152: cannot use auth.callOpts (type []"github.com/coreos/etcd/vendor/google.golang.org/grpc".CallOption) as type []"go.etcd.io/etcd/vendor/google.golang.org/grpc".CallOption in argument to auth.remote.UserAdd
src/github.com/coreos/etcd/clientv3/auth.go:136:144: cannot use auth.callOpts (type []"github.com/coreos/etcd/vendor/google.golang.org/grpc".CallOption) as type []"go.etcd.io/etcd/vendor/google.golang.org/grpc".CallOption in argument to auth.remote.UserAdd
src/github.com/coreos/etcd/clientv3/auth.go:141:86: cannot use auth.callOpts (type []"github.com/coreos/etcd/vendor/google.golang.org/grpc".CallOption) as type []"go.etcd.io/etcd/vendor/google.golang.org/grpc".CallOption in argument to auth.remote.UserDelete
src/github.com/coreos/etcd/clientv3/auth.go:146:122: cannot use auth.callOpts (type []"github.com/coreos/etcd/vendor/google.golang.org/grpc".CallOption) as type []"go.etcd.io/etcd/vendor/google.golang.org/grpc".CallOption in argument to auth.remote.UserChangePassword
src/github.com/coreos/etcd/clientv3/auth.go:151:104: cannot use auth.callOpts (type []"github.com/coreos/etcd/vendor/google.golang.org/grpc".CallOption) as type []"go.etcd.io/etcd/vendor/google.golang.org/grpc".CallOption in argument to auth.remote.UserGrantRole
src/github.com/coreos/etcd/clientv3/auth.go:156:80: cannot use auth.callOpts (type []"github.com/coreos/etcd/vendor/google.golang.org/grpc".CallOption) as type []"go.etcd.io/etcd/vendor/google.golang.org/grpc".CallOption in argument to auth.remote.UserGet
src/github.com/coreos/etcd/clientv3/auth.go:161:72: cannot use auth.callOpts (type []"github.com/coreos/etcd/vendor/google.golang.org/grpc".CallOption) as type []"go.etcd.io/etcd/vendor/google.golang.org/grpc".CallOption in argument to auth.remote.UserList
src/github.com/coreos/etcd/clientv3/auth.go:166:106: cannot use auth.callOpts (type []"github.com/coreos/etcd/vendor/google.golang.org/grpc".CallOption) as type []"go.etcd.io/etcd/vendor/google.golang.org/grpc".CallOption in argument to auth.remote.UserRevokeRole
src/github.com/coreos/etcd/clientv3/auth.go:166:106: too many errors

We first saw this error when our CI build began to fail, and at first couldn't reproduce it locally, but then were able to by adding the -u to the command. Alternately, here's a simple Dockerfile that demonstrates the issue when building it.

This seems to be caused by the moving of github.com/coreos/etcd to github.com/etcd-io/etcd, as described here: etcd-io/etcd#10044 (comment)

That change and the issue are from last year, so I'm not sure why this is just showing up now, but my colleagues and I (and our CI) can all reproduce the problem now.

I will look into creating a PR that changes the imports from coreos/etcd to etcd-io/etcd.

@asim
Copy link
Member

asim commented Oct 3, 2019

We would appreciate a PR to fix the imports. This does however work with go mod if you are using it. Which we'd otherwise also recommend.

@milosgajdos milosgajdos added the go.mod Issues related to go modules label Oct 4, 2019
@DuckulaGL
Copy link

export GO111MODULE=on
use command : go get -u github.com/micro/go-micro/
report the error:

github.com/lucas-clemente/quic-go/internal/handshake

GoWork/pkg/mod/github.com/lucas-clemente/quic-go@v0.12.0/internal/handshake/crypto_setup.go:501:72: undefined: qtls.CipherSuite
GoWork/pkg/mod/github.com/lucas-clemente/quic-go@v0.12.0/internal/handshake/crypto_setup.go:523:73: undefined: qtls.CipherSuite

@DuckulaGL
Copy link

In the go.mod file, there is a line which is "github.com/coreos/etcd v3.3.15+incompatible".
No "go.etcd.io/etcd" in this file.

@asim
Copy link
Member

asim commented Oct 7, 2019

Please do not run go get -u as this updates the dependencies

@psucodervn
Copy link

I install micro toolkit by the command go get github.com/micro/micro and get the same error:

# github.com/coreos/etcd/clientv3
coreos/etcd/clientv3/auth.go:121:72: cannot use auth.callOpts (type []"github.com/coreos/etcd/vendor/google.golang.org/grpc".CallOption) as type []"go.etcd.io/etcd/vendor/google.golang.org/grpc".CallOption in argument to auth.remote.AuthEnable
coreos/etcd/clientv3/auth.go:126:74: cannot use auth.callOpts (type []"github.com/coreos/etcd/vendor/google.golang.org/grpc".CallOption) as type []"go.etcd.io/etcd/vendor/google.golang.org/grpc".CallOption in argument to auth.remote.AuthDisable
coreos/etcd/clientv3/auth.go:131:152: cannot use auth.callOpts (type []"github.com/coreos/etcd/vendor/google.golang.org/grpc".CallOption) as type []"go.etcd.io/etcd/vendor/google.golang.org/grpc".CallOption in argument to auth.remote.UserAdd
coreos/etcd/clientv3/auth.go:136:144: cannot use auth.callOpts (type []"github.com/coreos/etcd/vendor/google.golang.org/grpc".CallOption) as type []"go.etcd.io/etcd/vendor/google.golang.org/grpc".CallOption in argument to auth.remote.UserAdd
...

What can I do now?

@newrelic-eheinlein
Copy link
Author

FYI I tried putting together a quick PR that just swaps out the old imports for the new ones, however I was getting build problems; for some reason at least when I was running it locally it was pulling some old dependencies. I'll try to dig into it some more at some point, but I have to work on other things for now.

Here are the changes I tried, in case anyone else wants to look at it.

@spitfire88
Copy link

spitfire88 commented Oct 8, 2019

There should not be "github.com" in that import if you check your GOPATH.
Replace "github.com/etcd-io/" with "etcd-io/" and give it a go? It worked for me.

@DuckulaGL
Copy link

If we fix source codes, it will bring discord. Just suggest host fixes this to modify go file or go.mod simply, and moreover, it`s convenient to jump to declarations.

@asim
Copy link
Member

asim commented Oct 9, 2019

So changing the imports will not help due to the way etcd does vendoring. They say they'll be fixing some of this post 3.4 release. For the time being the best approach is go modules. @newrelic-eheinlein does your build system use go modules? If not you should enable these.

@timhavens
Copy link

Can anyone provide enough information to move forward with this? Like exact detail on how to get past this?

@asim
Copy link
Member

asim commented Oct 9, 2019

Please use Go 1.13 and Go modules. If you're in your go path use export GO111MODULE=on to enable go modules. Then run go get without the -u flag.

@imetlenko
Copy link

It all worked! Thanks for solving the problem.

@rtrive
Copy link

rtrive commented Nov 2, 2019

i've got the same problem and i'm not able to solve it

@naxmefy
Copy link

naxmefy commented Nov 11, 2019

Please use Go 1.13 and Go modules. If you're in your go path use export GO111MODULE=on to enable go modules. Then run go get without the -u flag.

worked - could you add this information to the docs?

@ryan5217
Copy link

i meet a problem
export GO111MODULE=on then go get github.com/micro/micro

[~/work/golang]$ go get github.com/micro/micro
go: finding github.com/micro/micro v1.18.0
go: downloading github.com/micro/micro v1.18.0
go: extracting github.com/micro/micro v1.18.0
verifying gopkg.in/src-d/go-git.v4@v4.13.1/go.mod: checksum mismatch
downloaded: h1:G7mAYYxgmS0lVkHyy2hEOLQCFB0DlQFTMLWggykrydY=
sum.golang.org: h1:nx5NYcxdKxq5fpltdHnPa2Exj4Sx0EclMWZQbYDu2z8=

SECURITY ERROR
This download does NOT match the one reported by the checksum server.
The bits may have been replaced on the origin server, or an attacker may
have intercepted the download attempt.

For more information, see 'go help module-auth'.

@kwzcoder
Copy link

kwzcoder commented Dec 12, 2019

Please use Go 1.13 and Go modules. If you're in your go path use export GO111MODULE=on to enable go modules. Then run go get without the -u flag

I run go get without the -u flag and it succeed, but I get the error again where I run my code

@asim
Copy link
Member

asim commented Dec 12, 2019

Please always use go modules and go get for our project.

@asim asim closed this as completed Dec 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
go.mod Issues related to go modules
Projects
None yet
Development

No branches or pull requests