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
Add namespace to NotFound error for kubectl logs command #120111
Add namespace to NotFound error for kubectl logs command #120111
Conversation
Welcome @newtondev! |
Hi @newtondev. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
/ok-to-test |
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.
Thanks for adding this!
I'm not a reviewer of this area but I think it would be nice to see some tests with this change.
Thanks @kannon92 . I added a test for this change. |
/retest |
/label tide/merge-method-squash |
/triage accepted |
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.
/lgtm
/approve
/hold
to get the linter fixes
LGTM label has been added. Git tree hash: 016c959a9dc56248b31afc60a27e6285955c135f
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: newtondev, 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 |
@newtondev, thank you for this PR. Can you please add the one-character fix for the linter so that it's finally merged? I'd do that myself, but I can't add commits to your PR |
Signed-off-by: Craig Newton <newtondev@gmail.com>
c73aa4a
to
0079274
Compare
/retest-required |
@soltysh @brianpursley, sorry for nagging, but can we do this already? I'm glad to help, but I don't have permissions to do reviews for you |
@@ -276,6 +277,9 @@ func (o *LogsOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []str | |||
} | |||
infos, err := builder.Do().Infos() | |||
if err != nil { | |||
if apierrors.IsNotFound(err) { | |||
err = fmt.Errorf("error from server (NotFound): %w in namespace %q", err, o.Namespace) |
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.
err = fmt.Errorf("error from server (NotFound): %w in namespace %q", err, o.Namespace) | |
err = fmt.Errorf("error from server (NotFound): %v in namespace %s", err, o.Namespace) |
seems better but output is equivalent anyway.
/lgtm |
LGTM label has been added. Git tree hash: fb001907d247999a9ad553488a9a3b5d0cb101c1
|
The Kubernetes project currently lacks enough contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/test pull-kubernetes-verify-lint |
/unhold |
…120111) Signed-off-by: Craig Newton <newtondev@gmail.com>
…120111) Signed-off-by: Craig Newton <newtondev@gmail.com>
…120111) Signed-off-by: Craig Newton <newtondev@gmail.com>
What type of PR is this?
/kind bug
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #1459
Special notes for your reviewer:
Does this PR introduce a user-facing change?