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

[0.6] Make sure to update the name in the mutator #535

Merged
merged 2 commits into from
Oct 31, 2024

Conversation

JonCrowther
Copy link
Contributor

Fixes an issue with #532 where the name wasn't being updated

@JonCrowther JonCrowther self-assigned this Oct 31, 2024
@JonCrowther JonCrowther requested a review from a team as a code owner October 31, 2024 14:53
Copy link
Contributor

@MbolotSuse MbolotSuse left a comment

Choose a reason for hiding this comment

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

Idea looks ok to me (assuming that if you set both name and generate name k8s won't just re-make the name based on generate name, though I would test that). I would definitely add a test for this overall logic if we can.

nflynt
nflynt previously approved these changes Oct 31, 2024
pmatseykanets
pmatseykanets previously approved these changes Oct 31, 2024
pkg/resources/management.cattle.io/v3/project/mutator.go Outdated Show resolved Hide resolved
@JonCrowther
Copy link
Contributor Author

Idea looks ok to me (assuming that if you set both name and generate name k8s won't just re-make the name based on generate name, though I would test that). I would definitely add a test for this overall logic if we can.

I have tested the generateName vs name, and as long as name is populated, k8s won't use generate name to overwrite it

Copy link
Contributor

@nflynt nflynt left a comment

Choose a reason for hiding this comment

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

👍 Tests look like they'd cover the documented business requirements for the generative name prefix.

@JonCrowther JonCrowther merged commit 7e0627b into rancher:main Oct 31, 2024
2 checks passed
@JonCrowther JonCrowther deleted the backing-namespace-hotfix branch October 31, 2024 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants