-
Notifications
You must be signed in to change notification settings - Fork 31
OCPBUGS-11228: Check for duplicate variables in TailoredProfile #695
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
base: master
Are you sure you want to change the base?
Conversation
@Vincent056: This pull request references Jira Issue OCPBUGS-11228, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. In response to this:
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 openshift-eng/jira-lifecycle-plugin repository. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Vincent056 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 |
🤖 To deploy this PR, run the following command:
|
/label qe-approved Pre-merge verification steps are listed in Jira: https://issues.redhat.com//browse/OCPBUGS-11228 |
for i, setValue := range tp.Spec.SetValues { | ||
if oldVal, seen := duplicates[setValue.Name]; seen { | ||
// We found a duplicate. Warn that we will ignore the previous usage. | ||
r.Eventf(tp, corev1.EventTypeWarning, |
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.
Are we able to detect these events fired in the test, too?
/retest |
🤖 To deploy this PR, run the following command:
|
🤖 To deploy this PR, run the following command:
|
Implement duplicate detection for setValues in TailoredProfile and add warning event [OCPBUGS-11228](https://issues.redhat.com/browse/OCPBUGS-11228)
🤖 To deploy this PR, run the following command:
|
/retest |
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.
Only minor comments inline on how we might simplify some of the logic.
Otherwise, this looks great and the tests are really clear. Great work.
We now onlu maintains a single map, ensuring the last occurrence is kept.
🤖 To deploy this PR, run the following command:
|
Implement duplicate detection for setValues in TailoredProfile and add warning event OCPBUGS-11228