-
Notifications
You must be signed in to change notification settings - Fork 151
always use unique name for volume and snapshot #476
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
Conversation
|
Welcome @huww98! |
|
Hi @huww98. Thanks for your PR. I'm waiting for a kubernetes-csi 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. |
6959b55 to
d24c5c5
Compare
|
/ok-to-test |
|
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 |
|
The Kubernetes project currently lacks enough active 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 rotten |
|
I think this PR is still relevant. @msau42 @gnufied @RaunakShah PTAL~. |
pkg/sanity/sanity.go
Outdated
| func UniqueStringWithLength(prefix string, length int) string { | ||
| str := UniqueString(prefix) | ||
| if len(str) > length { | ||
| Panic() |
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.
Do we have to introduce Panic() here? Can we trim it if it is longer than "length" and make it a best effort to have a unique name?
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 think we'd better panic here, and make it guaranteed unique. All callers are just using a hard-coded prefix, So if someone do reach here, it should be easy for him to just fix the panic by using a shorter prefix, rather than debugging weird issue caused by non-unique ID.
I mean panic() rather than Panic() here, I'll fix that.
|
/remove-lifecycle stale |
|
/remove-lifecycle rotten |
Always add random chars to name. This would avoid any name conflicts. And matches k8s behaviour better. Some system does not work if the same name is reused even after the previous resource is deleted. The idempotent state may not be cleared when resource deleted.
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: huww98, xing-yang 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 cleanup
What this PR does / why we need it:
Always add random chars to name.
This would avoid any name conflicts. And matches k8s behaviour better.
Some system does not work if the same name is reused even after the previous resource is deleted. The idempotent state may not be cleared when resource deleted.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?: