-
Notifications
You must be signed in to change notification settings - Fork 40.3k
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
Fix kubectl version should print version info without config file #89913
Fix kubectl version should print version info without config file #89913
Conversation
/retest |
1 similar comment
/retest |
/retest |
3 similar comments
/retest |
/retest |
/retest |
/test pull-kubernetes-node-e2e-containerd |
/retest |
Seems |
Yeah, something is wrong with it. Maybe try rebasing your branch with the latest from upstream. |
13f0549
to
de8621a
Compare
/retest |
1 similar comment
/retest |
de8621a
to
a801c1f
Compare
075c146
to
9172b21
Compare
30d2990
to
5d0eb18
Compare
/retest |
@zhouya0: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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. I understand the commands that are listed here. |
/retest |
/priority important-soon |
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.
One nit and this is ok to land.
} | ||
|
||
type emptyConfigError struct { | ||
error |
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 seems a bit over complicated, why not just:
type emptyConfigError struct {
message string
}
If we need to embed error in error we'll just use go's %w
when printing.
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.
Just make it similar to errContextNotFound
below.
5d0eb18
to
948f4de
Compare
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.
Yeah, definitely better, thx.
/lgtm
/approve
/assign @liggitt
to get client-go approval
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: liggitt, soltysh, zhouya0 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind bug
What this PR does / why we need it:
Now in k8s 1.18,
kubectl version
will not print version if no config file is provided. See kubernetes/kubectl#853.This problem actually has been fixed by #70713.
But after this PR #86173 is merged, it breaks the original condition.
Which issue(s) this PR fixes:
Fixes #kubernetes/kubectl#853
Special notes for your reviewer:
/cc @soltysh
/cc @brianpursley
Does this PR introduce a user-facing change?:
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: