-
Notifications
You must be signed in to change notification settings - Fork 40.1k
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
Consistent Names for ControllerRevisions, ReplicaSets, and objects using GenerateName #51538
Conversation
/retest |
dc5efbe
to
359b39f
Compare
359b39f
to
2308448
Compare
2308448
to
fdcda20
Compare
/retest |
generate names for ReplicaSets and ControllerRevisions.
fdcda20
to
313a8b3
Compare
|
||
// SafeEncodeString encodes s using the same characters as rand.String. This reduces the chances of bad words and | ||
// ensures that strings generated from hash functions appear consistent throughout the API. | ||
func SafeEncodeString(s string) string { |
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.
Suggest putting this function elsewhere since the returned value isn't random
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.
It depends on the slice used random names generated by String() string
in the same package. Its use is also closely tied to this function. It may warrant refactoring this code, but I'd rather focus on ensuring that the Names contain no bad words in this PR and a refactor in a followup.
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.
ok!
/retest |
3 similar comments
/retest |
/retest |
/retest |
/lgtm |
/approve no-issue |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: deads2k, kargakis, kow3ns Associated issue requirement bypassed by: deads2k The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
/test all [submit-queue is verifying that this PR is safe to merge] |
Automatic merge from submit-queue (batch tested with PRs 51553, 51538, 51663, 51069, 51737) |
@kow3ns: 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. |
Could you please assign a SIG to this PR please? @kow3ns |
What this PR does / why we need it:
Adds the rand.SafeEncodeString function and uses this function to generate names for ReplicaSets and ControllerRevisions.