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
Update Cobra from 1.2.1 to 1.3.0 #107628
Update Cobra from 1.2.1 to 1.3.0 #107628
Conversation
/cc @eddiezane |
@brianpursley: GitHub didn't allow me to request PR reviews from the following users: marckhouzam. Note that only kubernetes members and repo collaborators can review this PR, and authors cannot review their own PRs. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
3cb5b64
to
24bb12b
Compare
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: brianpursley The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Hmm, unit tests are passing locally. Maybe a flake. /retest |
/triage accepted |
yeah... that might be something to keep on the back burner to investigate a way to isolate / drop ... |
/test pull-kubernetes-dependencies |
@@ -332,22 +332,21 @@ replace ( | |||
github.com/liggitt/tabwriter => github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de | |||
github.com/lithammer/dedent => github.com/lithammer/dedent v1.1.0 | |||
github.com/lpabon/godbc => github.com/lpabon/godbc v0.1.1 | |||
github.com/lyft/protoc-gen-star => github.com/lyft/protoc-gen-star v0.5.3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is pulling this in? another proto generation tool increases likelihood of selecting incompatible transitive protobuf libraries
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This appears to make it's way in from google.golang.org/grpc via github.com/envoyproxy/go-control-plane via github.com/envoyproxy/protoc-gen-validate.
github.com/cespare/xxhash/v2 => github.com/cespare/xxhash/v2 v2.1.2 | ||
github.com/chai2010/gettext-go => github.com/chai2010/gettext-go v0.0.0-20160711120539-c6fed771bfd5 | ||
github.com/checkpoint-restore/go-criu/v5 => github.com/checkpoint-restore/go-criu/v5 v5.0.0 | ||
github.com/chzyer/logex => github.com/chzyer/logex v1.1.10 | ||
github.com/chzyer/readline => github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e | ||
github.com/chzyer/test => github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1 | ||
github.com/cilium/ebpf => github.com/cilium/ebpf v0.6.2 | ||
github.com/circonus-labs/circonus-gometrics => github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is pulling this in?
new transitive deps from this once we get to v3:
- https://github.com/circonus-labs/go-apiclient/blob/master/go.mod
- https://github.com/circonus-labs/circonus-gometrics/blob/master/go.mod
- https://github.com/circonus-labs/circonusllhist/blob/master/go.mod
- https://github.com/hashicorp/go-retryablehttp/blob/master/go.mod
- https://github.com/tv42/httpunix/blob/master/go.mod
- https://github.com/hashicorp/go-hclog/blob/master/go.mod
github.com/hashicorp/go-cleanhttp => github.com/hashicorp/go-cleanhttp v0.5.1 | ||
github.com/hashicorp/go-immutable-radix => github.com/hashicorp/go-immutable-radix v1.0.0 | ||
github.com/hashicorp/go-cleanhttp => github.com/hashicorp/go-cleanhttp v0.5.2 | ||
github.com/hashicorp/go-hclog => github.com/hashicorp/go-hclog v1.0.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
new
github.com/hashicorp/go-multierror => github.com/hashicorp/go-multierror v1.0.0 | ||
github.com/hashicorp/go-rootcerts => github.com/hashicorp/go-rootcerts v1.0.0 | ||
github.com/hashicorp/go-multierror => github.com/hashicorp/go-multierror v1.1.0 | ||
github.com/hashicorp/go-retryablehttp => github.com/hashicorp/go-retryablehttp v0.5.3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
new
google.golang.org/grpc => google.golang.org/grpc v1.40.0 | ||
google.golang.org/genproto => google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa | ||
google.golang.org/grpc => google.golang.org/grpc v1.42.0 | ||
google.golang.org/grpc/cmd/protoc-gen-go-grpc => google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same question about what is pulling this in?
So kubernetes doesn't use Viper directly correct? And removing the dependency to Viper would have benefits for kubernetes? If so, I will discuss this with the Cobra maintainers and see if there's anything that can be done. |
If that could happen it would cut down on a ton of transitive deps for us. ref: #102598 |
Yeah, we dropped direct dependence on Viper in that PR, but we still have a transitive dependency on it, which adds a lot to our dependency graph. https://github.com/muesli/coral is an interesting proof-of-concept that tracks head of cobra and drops the viper dep. Since some of our deps use cobra though, I think the viper dependency would have to be made optional in cobra itself for it to benefit us:
|
Hi all - I was pointed to this PR from some people in the cobra community. From what I gather, we need to remove the transient dependencies on Viper so that the dependencies resolve correctly? |
The dependencies are resolving correctly, but are steadily increasing beyond acceptable levels because of the viper transitive dependency. |
I'll be filing an issue in the cobra repo with a request to isolate the viper dependencies used only by the cobra command, with some suggestions/considerations based on our experience isolating dependencies for the cadvisor command (google/cadvisor#2437) |
opened spf13/cobra#1597 |
Do you guys still plan to go ahead with upgrading to Cobra 1.3 or do you want to wait for the next release of Cobra which will remove the dependency on Viper? |
@brianpursley: PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@marckhouzam i'd rather wait until viper is out. |
FYI, the viper dependency has been dropped from cobra HEAD in spf13/cobra#1604, and cobra v1.4.0 will be tagged shortly. Once it is, this can be updated to cobra v1.4.0 🎉 I imagine it will be easier to reset against |
Thanks @liggitt for working with Cobra to make this happen. It will benefit a whole bunch of projects 🎉 |
Hi all - Just cut https://github.com/spf13/cobra/releases/tag/v1.4.0 Feel free to tag me if there's any needed cobra support 🐍 🚀 🌔 And thank you all for the support in making this happen! Big shoutout to @liggitt for the in depth proposal and help on this! |
Closing this PR. It sounds like @liggitt may open a PR to upgrade to Cobra 1.4.0. |
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
This PR upgrades cobra from version 1.2.1 to 1.3.0.
This will be helpful for kubectl for a few reasons:
Which issue(s) this PR fixes:
Fixes kubernetes/kubectl#1166
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: