Skip to content

Conversation

Vincent056
Copy link

Implement duplicate detection for setValues in TailoredProfile and add warning event OCPBUGS-11228

@openshift-ci-robot
Copy link
Collaborator

@Vincent056: This pull request references Jira Issue OCPBUGS-11228, which is invalid:

  • expected the bug to target the "4.19.0" version, but no target version was set

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

Implement duplicate detection for setValues in TailoredProfile and add warning event OCPBUGS-11228

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.

Copy link

openshift-ci bot commented Feb 28, 2025

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

Copy link

🤖 To deploy this PR, run the following command:

make catalog-deploy CATALOG_IMG=ghcr.io/complianceascode/compliance-operator-catalog:695-8cc5f7b90bed67def015c9c5b88a60cb43249ab7

@Anna-Koudelkova
Copy link

Anna-Koudelkova commented Mar 4, 2025

/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,
Copy link

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?

@xiaojiey
Copy link
Collaborator

/retest

Copy link

🤖 To deploy this PR, run the following command:

make catalog-deploy CATALOG_IMG=ghcr.io/complianceascode/compliance-operator-catalog:695-1bae2fc5ff101f5a9e8d1e82892acde62c63bcb9

Copy link

🤖 To deploy this PR, run the following command:

make catalog-deploy CATALOG_IMG=ghcr.io/complianceascode/compliance-operator-catalog:695-197c413b83bb2b13edb29833b8b24d4a315e773a

Implement duplicate detection for setValues in TailoredProfile and add warning event
[OCPBUGS-11228](https://issues.redhat.com/browse/OCPBUGS-11228)
Copy link

🤖 To deploy this PR, run the following command:

make catalog-deploy CATALOG_IMG=ghcr.io/complianceascode/compliance-operator-catalog:695-6c473aa16e365851ae7bc47957225f481686a2b2

@Vincent056
Copy link
Author

/retest

Copy link

@rhmdnd rhmdnd left a 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.

@rhmdnd rhmdnd added this to the 1.8.0 milestone Jul 21, 2025
We now onlu maintains a single map, ensuring the last occurrence is kept.
Copy link

🤖 To deploy this PR, run the following command:

make catalog-deploy CATALOG_IMG=ghcr.io/complianceascode/compliance-operator-catalog:695-ee373a63be86806cfe29fe47cfc5380cfcc8a24a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants