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

Change dependency management from godep to dep #3037

Closed
praveenkumar opened this issue Aug 2, 2018 · 9 comments
Closed

Change dependency management from godep to dep #3037

praveenkumar opened this issue Aug 2, 2018 · 9 comments
Assignees
Labels
area/build-release area/code-deps Code dependencies (guest-vm deps belong in guest-vm) kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lifecycle/active Indicates that an issue or PR is actively being worked on by a contributor.

Comments

@praveenkumar
Copy link
Contributor

Looks like we are still using godep which is way older and not in active maintenance. I think we should switch to dep which right now in active development and maintenance.

@praveenkumar
Copy link
Contributor Author

Looks like some issue when doing dep init for the project, need to look bit more.

$ dep init
Importing configuration from glide. These are only initial constraints, and are further refined during the solve process.
init failed: unable to solve the dependency graph: Solving failure: No versions of github.com/google/go-containerregistry met constraints:
	master: Could not introduce github.com/google/go-containerregistry@master due to multiple problematic subpackages:
	Subpackage github.com/google/go-containerregistry/authn is missing. (Package is required by (root).)	Subpackage github.com/google/go-containerregistry/name is missing. (Package is required by (root).)	Subpackage github.com/google/go-containerregistry/v1/remote is missing. (Package is required by (root).)	Subpackage github.com/google/go-containerregistry/v1/tarball is missing. (Package is required by (root).)
	add-the-tip: Could not introduce github.com/google/go-containerregistry@add-the-tip due to multiple problematic subpackages:
	Subpackage github.com/google/go-containerregistry/name is missing. (Package is required by (root).)	Subpackage github.com/google/go-containerregistry/v1/remote is missing. (Package is required by (root).)	Subpackage github.com/google/go-containerregistry/v1/tarball is missing. (Package is required by (root).)	Subpackage github.com/google/go-containerregistry/authn is missing. (Package is required by (root).)

@praveenkumar
Copy link
Contributor Author

After creating the vendor directory from the dep side looks like now have different problem :(

$ make
GOPATH=/home/prkumar/work/github/practice/go ./makedepend.sh out/docker-machine-driver-kvm2 k8s.io ./cmd/drivers/kvm/  > out/docker-machine-driver-kvm2.d
GOPATH=/home/prkumar/work/github/practice/go ./makedepend.sh out/storage-provisioner k8s.io ./cmd/storage-provisioner  > out/storage-provisioner.d
GOPATH=/home/prkumar/work/github/practice/go ./makedepend.sh out/docker-machine-driver-hyperkit k8s.io ./cmd/drivers/hyperkit  > out/docker-machine-driver-hyperkit.d
which go-bindata || GOBIN=/home/prkumar/work/github/practice/go/bin go get github.com/jteeuwen/go-bindata/...
/home/prkumar/work/github/practice/go/bin/go-bindata
PATH="/home/prkumar/work/github/practice/go/bin:/usr/libexec/python3-sphinx:/usr/lib64/qt-3.3/bin:/usr/share/Modules/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/home/prkumar/.local/bin:/home/prkumar/bin:/home/prkumar/work/github/practice/go/bin" go-bindata -nomemcopy -o pkg/minikube/assets/assets.go -pkg assets deploy/addons/...
GOPATH=/home/prkumar/work/github/practice/go ./makedepend.sh -t test k8s.io ./... pkg/minikube/assets/assets.go > out/test.d
GOPATH=/home/prkumar/work/github/practice/go ./makedepend.sh out/minikube-linux-amd64 k8s.io ./cmd/minikube/ pkg/minikube/assets/assets.go > out/minikube.d
GOOS=linux GOARCH=amd64 go build -tags "container_image_ostree_stub containers_image_openpgp" -ldflags="-X k8s.io/minikube/pkg/version.version=v0.28.2 -X k8s.io/minikube/pkg/version.isoVersion=v0.28.1 -X k8s.io/minikube/pkg/version.isoPath=minikube/iso" -a -o out/minikube-linux-amd64 k8s.io/minikube/cmd/minikube
# k8s.io/minikube/vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1
vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1/zz_generated.conversion.go:39:15: scheme.AddGeneratedConversionFuncs undefined (type *runtime.Scheme has no field or method AddGeneratedConversionFuncs)
# k8s.io/minikube/vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1beta1
vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1beta1/zz_generated.conversion.go:39:15: scheme.AddGeneratedConversionFuncs undefined (type *runtime.Scheme has no field or method AddGeneratedConversionFuncs)
make: *** [Makefile:106: out/minikube-linux-amd64] Error 2

@gbraad
Copy link
Contributor

gbraad commented Aug 21, 2018 via email

@jlnaps
Copy link

jlnaps commented Aug 30, 2018

It is because dep isn't able to pick up the internal dependencies of k8s.io/client-go. You need to explicitly pin the correct versions of k8s.io/api and k8s.io/apimachinery in Gopkg.toml. For example,

[[constraint]]
  name = "k8s.io/api"
  version = "kubernetes-1.11.x"

[[constraint]]
  name = "k8s.io/apimachinery"
  version = "kubernetes-1.11.x"

[[constraint]]
  name = "k8s.io/client-go"
  version = "8.0.0"

Depending on your version of k8s.io/client-go, the version of the other two will change.

@praveenkumar
Copy link
Contributor Author

@jlnaps I will try that also and let you know. By any chance if you are able to do it successfully can you send PR?

@jlnaps
Copy link

jlnaps commented Sep 4, 2018

@praveenkumar I don't think it is something I can generate a PR for, as everyone's Gopkg.toml will be different, but if you paste the following:

[[constraint]]
  name = "k8s.io/api"
  version = "kubernetes-1.11.2"

[[constraint]]
  name = "k8s.io/apimachinery"
  version = "kubernetes-1.11.2"

[[constraint]]
  name = "k8s.io/client-go"
  version = "8.0.0"

and do a dep ensure, things should build as normal. Those are the current 1.11.x versions at this time, so if anyone plugging the error into Google finds this(this thread is the top hit as of last week), they may be different.

@tstromberg tstromberg self-assigned this Sep 11, 2018
@ironmike-au
Copy link

@jlnaps just wanted to say thanks for your reply. I came here from the top result of Google and was able to get working on 1.10 cluster with the following:

[[override]]
  name = "k8s.io/api"
  version = "kubernetes-1.10.7"

[[override]]
  name = "k8s.io/apimachinery"
  version = "kubernetes-1.10.7"

[[constraint]]
  name = "k8s.io/client-go"
  version = "7.0.0"

@dlorenc
Copy link
Contributor

dlorenc commented Sep 13, 2018

I think we should change to dep. I tried once and got stuck, but I'll happily take a PR that gets us there :)

@gbraad
Copy link
Contributor

gbraad commented Sep 13, 2018 via email

praveenkumar added a commit to praveenkumar/minikube that referenced this issue Sep 18, 2018
@tstromberg tstromberg added area/build-release area/code-deps Code dependencies (guest-vm deps belong in guest-vm) lifecycle/active Indicates that an issue or PR is actively being worked on by a contributor. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. labels Sep 18, 2018
@tstromberg tstromberg changed the title Can we change dependency management from godep to dep? Change dependency management from godep to dep Sep 19, 2018
praveenkumar added a commit to praveenkumar/minikube that referenced this issue Sep 24, 2018
afbjorklund added a commit to afbjorklund/minikube that referenced this issue Sep 29, 2018
0.29.0 Release

* tag 'v0.29.0': (77 commits)
  Cut release 0.29.0 (kubernetes#3175)
  turning error into a warning log message
  Bump everything to 1.11.
  Update docs.
  Update go-ansiterm.
  Issue kubernetes#3037 change dependency management to dep
  inlining deleteNetwork into if statement
  update dashboard version
  Fix typo: suppports -> supports
  adding tstromberg
  kvm2 driver: fixed documentation link in error text
  kvm2 driver: be more robust with creating of the network, don't delete the network if it is in use
  kvm2 driver: generate separate random MACs for default and private network NICs
  kvm2 driver: separated activating and creating of networks
  kvm2 driver: fixed private network creation and setup
  fix: --format outputs any string, --https only subsitute http URL scheme
  Stay in same line
  Change default docker storage driver to overlay2
  Simplifies Linux installation instructions by using install(1)
  update
  ...
timfallmk pushed a commit to ksync/ksync that referenced this issue Jan 31, 2019
timfallmk added a commit to ksync/ksync that referenced this issue Feb 1, 2019
* Update client-go

* Bump all k8s libs in tandem

For some stupid reason, they have to be pinned together. See kubernetes/minikube#3037 and https://github.com/kubernetes/client-go#compatibility-matrix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/build-release area/code-deps Code dependencies (guest-vm deps belong in guest-vm) kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lifecycle/active Indicates that an issue or PR is actively being worked on by a contributor.
Projects
None yet
Development

No branches or pull requests

6 participants