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

Remove random suffixes on creds-init volumes #3907

Merged
merged 1 commit into from Apr 30, 2021
Merged

Remove random suffixes on creds-init volumes #3907

merged 1 commit into from Apr 30, 2021

Conversation

ghost
Copy link

@ghost ghost commented Apr 29, 2021

Changes

Removed the random suffixes that used to appear on creds-init volumes. These
didn't serve any purpose that couldn't be equally well-served with an
incrementing integer.

The benefit of doing it this way is that our unit tests become less brittle -
those random suffixes were a source of considerable churn whenever other
volumes were added or removed to test data because the random pool of suffixes
was shared with those other volumes.

Submitter Checklist

As the author of this PR, please check off the items in this checklist:

Release Notes

NONE

Removed the random suffixes that used to appear on creds-init volumes. These
didn't serve any purpose that couldn't be equally well-served with an
incrementing integer.

The benefit of doing it this way is that our unit tests become less brittle -
those random suffixes were a source of considerable churn whenever other
volumes were added or removed to test data because the random pool of suffixes
was shared with those other volumes.
@tekton-robot tekton-robot added the release-note-none Denotes a PR that doesnt merit a release note. label Apr 29, 2021
@tekton-robot tekton-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Apr 29, 2021
@ghost ghost requested a review from imjasonh April 29, 2021 16:15
@ghost ghost mentioned this pull request Apr 29, 2021
5 tasks
Copy link
Member

@imjasonh imjasonh left a comment

Choose a reason for hiding this comment

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

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Apr 29, 2021
@ghost ghost added the kind/misc Categorizes issue or PR as a miscellaneuous one. label Apr 29, 2021
cfg := config.FromContextOrDefaults(ctx)
if cfg != nil && cfg.FeatureFlags != nil && cfg.FeatureFlags.DisableCredsInit {
return nil, nil
}
name := names.SimpleNameGenerator.RestrictLengthWithRandomSuffix(credsInitHomeMountPrefix)
name := fmt.Sprintf("%s-%d", credsInitHomeMountPrefix, idx)
Copy link
Member

Choose a reason for hiding this comment

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

Given that credsInitHomeMountPrefix is a fixed, non configurable string, this looks good.

Copy link
Member

@afrittoli afrittoli left a comment

Choose a reason for hiding this comment

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

Nice! Thank you :)
/approve

@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: afrittoli

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 30, 2021
@tekton-robot tekton-robot merged commit d735a4b into tektoncd:main Apr 30, 2021
@ghost ghost deleted the creds-init-test-churn branch April 30, 2021 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/misc Categorizes issue or PR as a miscellaneuous one. lgtm Indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesnt merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants