-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
馃尡 Small improvements to ClusterClass validation messages #5744
馃尡 Small improvements to ClusterClass validation messages #5744
Conversation
internal/topology/variables/clusterclass_variable_validation.go
Outdated
Show resolved
Hide resolved
internal/topology/variables/clusterclass_variable_validation.go
Outdated
Show resolved
Hide resolved
internal/topology/variables/clusterclass_variable_validation.go
Outdated
Show resolved
Hide resolved
internal/topology/variables/clusterclass_variable_validation.go
Outdated
Show resolved
Hide resolved
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.
Thx for improving this, even when it's not fun dealing with the nitpickery on the PR! :)
I think good errors are important for the UX and this PR is a great step forward!
@@ -178,9 +175,10 @@ func (webhook *ClusterClass) validateRemovedMachineDeploymentClassesAreNotUsed(c | |||
for _, machineDeploymentTopology := range c.Spec.Topology.Workers.MachineDeployments { | |||
if removedClasses.Has(machineDeploymentTopology.Class) { | |||
// TODO(killianmuldoon): Improve error printing here so large scale changes don't flood the error log e.g. deduplication, only example usages given. | |||
// TODO: consider if we get the index of the MachineDeploymentClass being deleted |
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 that depends on if the path should apply to the old or new resource (or depending on the case one or the other)
@killianmuldoon @sbueringer thanks for all the valuable comments. Now the PR should be ready for another round 馃槈 |
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.
Looks great, last round of nits from my side :)
dc7524d
to
22d503e
Compare
Thx! /lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: vincepri 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 this PR does / why we need it:
This PR contains a set of small improvements to ClusterClass validation messages.
While working on this, I also made consistent how we are calling validation func in unit tests.