Skip to content
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

raise warning if ns is missing #10135

Closed
wants to merge 1 commit into from
Closed

raise warning if ns is missing #10135

wants to merge 1 commit into from

Conversation

ksdpmx
Copy link

@ksdpmx ksdpmx commented Apr 25, 2024

Currently there's no difference in output whether ns is existed or not.
This minor pr helps improve UX.

@k8s-ci-robot
Copy link

Hi @ksdpmx. Thanks for your PR.

I'm waiting for a containerd member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

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.

Signed-off-by: jasonz <ksdpmx@gmail.com>
@@ -173,8 +173,10 @@ var removeCommand = &cli.Command{
}
log.G(ctx).WithError(err).Errorf("unable to delete %v", target)
continue
} else {
log.G(ctx).WithError(err).Warnf("namespace %v not found", target)
continue
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a potential change in behavior; previously we would consider the command to be idempotent; it would ignore the error if it's not found, and print the target (line 180/182 below).

With this change, it's no longer considered idempotent, and printing a warning; printing a warning may be ok, but the continue here also means that it's no longer printing the target.

I realise ctr is a debugging tool, so not considered "stable", but wondering if there's a potential for scripts to be depending on this (i.e. target to be printed).

Copy link
Author

@ksdpmx ksdpmx Apr 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for explaining. yes there's a potential breaking change for idempotency in outputs with this pr.

@ksdpmx ksdpmx closed this Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants