Skip to content

client-go dependency recorded by go get is v0.0.0-... #631

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

Closed
danderson opened this issue Jul 8, 2019 · 3 comments
Closed

client-go dependency recorded by go get is v0.0.0-... #631

danderson opened this issue Jul 8, 2019 · 3 comments

Comments

@danderson
Copy link

I'm very happy about Go module support in v12! However, when I go get k8s.io/[email protected]. The dependency gets recorded in go.mod as:

k8s.io/client-go v0.0.0-20190620085101-78d2af792bab

I'm assuming this is because the client-go repository doesn't have the major version in the import path, so it reverts to legacy support behavior.

This is a maintenance headache, because it means that I can't easily go get -u my own package, because all the k8s packages will just sync up to master and (potentially) break everything.

Is there something the client-go repo can do here to make things behave more gracefully, so that downstream dependencies can track client-go by major version?

This is on Go 1.12 and client-go v12.0.0.

@liggitt
Copy link
Member

liggitt commented Jul 8, 2019

I'm assuming this is because the client-go repository doesn't have the major version in the import path, so it reverts to legacy support behavior.

That's correct

Is there something the client-go repo can do here to make things behave more gracefully, so that downstream dependencies can track client-go by major version?

We're experimenting with adding major versions to import paths in kubernetes/publishing-bot#196, but it's not clear whether the impact (making all consumers modify all of their import paths) will be too disruptive yet.

@danderson
Copy link
Author

Wonderful to hear!

While I know it's not a vote-based decision, I would greatly encourage moving in that direction. The upgrade between major versions of client-go is already a heavyweight operation, since it might contain breaking changes that require refactoring the consuming code. Running a a sed script to change import paths is a small additional tax on top of that other work (and the one-liner can be included in the release notes), but in return updating to keep up with e.g. security issues in all dependencies becomes a trivial go get -u ., rather than "surgically upgrade around client-go".

Thanks for the insight!

@liggitt
Copy link
Member

liggitt commented Aug 16, 2019

closing in favor of kubernetes/kubernetes#72638 / kubernetes/publishing-bot#196

@liggitt liggitt closed this as completed Aug 16, 2019
opencord-gerrit pushed a commit to opencord/voltha-api-server that referenced this issue Oct 17, 2019
…v1.15.4 of k8s api/apimachinery in sync with other voltha components

Had to use pseudo-version corresponding to v12.0.0 of k8s client-go
because golang proxy is no longer serving the modules not complying
to Semantic Import Versioning rules including client-go v12.0.0.
Refer to kubernetes/client-go#631 and
golang/go#33558

Change-Id: I2e558bab7f0702f230761319eb5392a7d0532ea3
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

2 participants