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

Installation fails on Go 1.12.5 #2

Open
garethr opened this issue May 26, 2019 · 7 comments
Open

Installation fails on Go 1.12.5 #2

garethr opened this issue May 26, 2019 · 7 comments

Comments

@garethr
Copy link

garethr commented May 26, 2019

$ go version
go version go1.12.5 darwin/amd64
$ go get -u github.com/sysdiglabs/kubectl-dig/cmd/kubectl-di
...
# k8s.io/client-go/rest
../../.asdf/installs/golang/1.12.5/packages/pkg/mod/k8s.io/[email protected]+incompatible/rest/request.go:598:31: not enough arguments in call to watch.NewStreamWatcher
        have (*versioned.Decoder)
        want (watch.Decoder, watch.Reporter)
@pete911
Copy link

pete911 commented May 26, 2019

@garethr make install works fine (I am using the same version as you). But you are right, updating dependencies causes the error. I am currently looking into it.

@pete911
Copy link

pete911 commented May 26, 2019

this method in go-client has changed - https://github.com/kubernetes/client-go/blob/master/rest/request.go#L598 (additional error arg)
I have updated dependencies and now it seems to be working PR - #3

Can you give it a try?

@garethr
Copy link
Author

garethr commented May 27, 2019

I can confirm that this worked for me, thanks. The following successfully compiles the binary:

env GO111MODULE="on" go get -u github.com/sysdiglabs/kubectl-dig/cmd/kubectl-dig@7a9e0fde35b808bd7c5ff982769b688aa52c34b0

@pete911
Copy link

pete911 commented May 27, 2019

@garethr would be good to update Makefile as well (to set GO111MODULE=on):

${kubectl_dig}:
	GO111MODULE=on $(GO) build ${LDFLAGS} -o $@ ./cmd/kubectl-dig

I'll do that when this is merged

@Icedroid
Copy link

also failed with go 1.13

go: github.com/sysdiglabs/kubectl-dig/cmd/kubectl-dig imports
        github.com/sysdiglabs/kubectl-dig/pkg/cmd imports
        github.com/sysdiglabs/kubectl-dig/pkg/attacher imports
        k8s.io/kubernetes/pkg/kubectl/util/term imports
        github.com/docker/docker/pkg/term imports
        github.com/docker/docker/pkg/term/windows imports
        github.com/Sirupsen/logrus: github.com/Sirupsen/[email protected]: parsing go.mod:
        module declares its path as: github.com/sirupsen/logrus
                but was required as: github.com/Sirupsen/logrus

@crazy-matt
Copy link

also failed with go 1.16.5 darwin/amd64

❯ GO111MODULE=on go get -u github.com/sysdiglabs/kubectl-dig/cmd/kubectl-dig 
go get: github.com/docker/[email protected] updating to
	github.com/docker/[email protected]: parsing go.mod:
	module declares its path as: github.com/moby/spdystream
	       but was required as: github.com/docker/spdystream

@kotarusv
Copy link

kotarusv commented Oct 3, 2021

go get -u github.com/sysdiglabs/kubectl-dig/cmd/kubectl-dig
go: downloading k8s.io/apimachinery v0.22.2
go: downloading k8s.io/cli-runtime v0.22.2
go: downloading k8s.io/api v0.22.2
go: downloading k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b
go: downloading k8s.io/kubernetes v1.22.2
go: downloading golang.org/x/net v0.0.0-20210929193557-e81a3d93ecf6
go: downloading cloud.google.com/go v0.97.0
go: downloading sigs.k8s.io/yaml v1.3.0
go: downloading golang.org/x/crypto v0.0.0-20210921155107-089bfa567519
go: downloading k8s.io/kube-openapi v0.0.0-20210929172449-94abcedd1aa4
go: downloading golang.org/x/sys v0.0.0-20211003122950-b1ebd4e1001c
go: downloading github.com/json-iterator/go v1.1.12
go: downloading github.com/modern-go/reflect2 v1.0.2
go get: github.com/docker/[email protected] updating to
github.com/docker/[email protected]: parsing go.mod:
module declares its path as: github.com/moby/spdystream
but was required as: github.com/docker/spdystream

go version
go version go1.16.6 linux/amd64

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants