-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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 debug #20215
Update debug #20215
Conversation
Fixed unit failures. |
4ca9173
to
67fd0ff
Compare
Adding approved label manually, since this is bringing in some upstream patches that the bot does not pick me as approver. |
[APPROVALNOTIFIER] This PR is APPROVED Approval requirements bypassed by manually added approval. This pull-request has been approved by: soltysh 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 |
/test gcp |
pkg/oc/cli/cmd/debug.go
Outdated
fmt.Fprintf(o.Attach.ErrOut, "Defaulting container name to %s.\n", pod.Spec.Containers[0].Name) | ||
fmt.Fprintf(o.Attach.ErrOut, "Use '%s describe pod/%s -n %s' to see all of the containers in this pod.\n", fullCmdName, pod.Name, pod.Namespace) | ||
fmt.Fprintf(o.Attach.ErrOut, "\n") | ||
if o.PrintFlags.OutputFormat != nil && len(*o.PrintFlags.OutputFormat) > 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.
What if we are printing --template w/o specifying --output ?
return err | ||
} | ||
if !one { | ||
return fmt.Errorf("you must identify a resource with a pod template to debug") |
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.
s/identify/specify/
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 can be fixed in followup, I didn't change the original strings.
names := containerNames(o.Attach.Pod) | ||
if len(names) == 0 { | ||
return fmt.Errorf("the provided pod must have at least one container") | ||
} | ||
if (o.AsRoot || o.AsNonRoot) && o.AsUser > 0 { | ||
return fmt.Errorf("you may not specify --as-root and --as-user=%d at the same time", o.AsUser) | ||
} | ||
if len(o.Attach.ContainerName) == 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.
could these be moved to Validate as well?
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.
I didn't want to deal with the original flow so I left is as is, for now.
@soltysh One comment in debug regarding --template printing. Rest are nits and can be addressed in a followup. Otherwise lgtm |
Comment addressed applying the label. |
/test gcp |
/retest Please review the full test history for this PR and help us cut down flakes. |
2 similar comments
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
18 similar comments
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest |
@soltysh: 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. |
@juanvallejo this no longer builds. Please pick it up and rebase it. |
On it |
/lgtm cancel |
replaced by #20257 |
/assign @juanvallejo