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

ACM-16425-add-negative-label-filtering-to-Discovered-policies-table #4199

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

jeswanke
Copy link
Contributor

@jeswanke jeswanke commented Jan 16, 2025

CleanShot 2025-01-16 at 15 48 58@2x

Signed-off-by: John Swanke [email protected]

…-16425-add-negative-label-filtering-to-Discovered-policies-table

Signed-off-by: John Swanke <[email protected]>
Signed-off-by: John Swanke <[email protected]>
@jeswanke
Copy link
Contributor Author

/test unit-tests-sonarcloud

Signed-off-by: John Swanke <[email protected]>
Signed-off-by: John Swanke <[email protected]>
Signed-off-by: John Swanke <[email protected]>
Signed-off-by: John Swanke <[email protected]>
@jeswanke
Copy link
Contributor Author

/test unit-tests-sonarcloud

Copy link
Contributor

@KevinFCormier KevinFCormier left a comment

Choose a reason for hiding this comment

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

Hey John,

Overall, the code looks good and it works well. I just found a couple issues:

  1. If I add a new policy with the discovered policies page open, when the search query next executes, the page crashes.
  2. Terminology question - can isNegatable only be used for a label? Are all labels negatable? The equalsLabel function seems to deem the two concepts equivalent, so I think either that function or the flag should be renamed.

Signed-off-by: John Swanke <[email protected]>
@jeswanke
Copy link
Contributor Author

ok, this version:

  1. fixes that crash bug
  2. fixes a filtering bug handling all permutations of != and = with same filters
    if any filters are !=, will only show those items (new)
    if any filters are =, will only show items that match (as before)
    if an item has both, != overrules =
  3. changes equalsLabel to matchesFilterValue
    4 changes isNegatable to supportsInequality -- which is the kube term
    we could actually use this with other filters such as !=System in application list to show all apps that aren't system

@KevinFCormier
Copy link
Contributor

/hold

@KevinFCormier
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm label Jan 21, 2025
Copy link

openshift-ci bot commented Jan 21, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jeswanke, KevinFCormier

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:
  • OWNERS [KevinFCormier,jeswanke]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@KevinFCormier
Copy link
Contributor

/override "Red Hat Konflux / acm-213-enterprise-contract-registry-standard / console-acm-213"

Copy link

openshift-ci bot commented Jan 21, 2025

@KevinFCormier: Overrode contexts on behalf of KevinFCormier: Red Hat Konflux / acm-213-enterprise-contract-registry-standard / console-acm-213

In response to this:

/override "Red Hat Konflux / acm-213-enterprise-contract-registry-standard / console-acm-213"

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 kubernetes-sigs/prow repository.

@KevinFCormier
Copy link
Contributor

/override "Red Hat Konflux / mce-28-enterprise-contract-registry-standard / console-mce-mce-28"

Copy link

openshift-ci bot commented Jan 21, 2025

@KevinFCormier: Overrode contexts on behalf of KevinFCormier: Red Hat Konflux / mce-28-enterprise-contract-registry-standard / console-mce-mce-28

In response to this:

/override "Red Hat Konflux / mce-28-enterprise-contract-registry-standard / console-mce-mce-28"

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 kubernetes-sigs/prow repository.

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.

3 participants