-
Notifications
You must be signed in to change notification settings - Fork 43
implement pluggable rule filtering system with pipeline intentions #2639
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
Conversation
dfc4eea to
7734a9e
Compare
|
I have a fix coming for the acceptance test errors. |
1186cc8 to
79084bf
Compare
| } else if len(c.namespace) == 0 { | ||
| // When no namespaces are specified and filtering results in empty list, | ||
| // use an empty namespace list to prevent any evaluation | ||
| namespaceToUse = []string{} |
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.
Is it likely to happen for real? How will the user deal with it? Would it be better to throw an error? Or do we have some handling for this later that presents the situation to the user?
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'm just wondering, not a blocker to merge.
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.
Yeah, we set it to nil during evaluation now. It still could use improvement. Here is an update 37a790f
|
High level suggestions/comments/thoughts:
|
We can look at including it as a collection, but it takes on multiple values (release, production, staging). I noticed it's being used in ITS's with |
Yeah good point. It think let's go ahead with this design and maybe consider other options long term. |
|
I had one or two minor suggestions, but overall lgtm. |
3c071b5 to
903c2e3
Compare
- Add extensible filtering framework with RuleFilter interface - Implement PipelineIntentionFilter for filtering rules by pipeline intentions - Implement IncludeListFilter for filtering by collections, packages, and rules - Add pipeline_intention metadata field to rule annotations - Fix filtering leak by ensuring AllNamespaces=false prevents bypassing filters - Add comprehensive test coverage for all filtering components - Maintain backward compatibility with existing filtering logic The new system allows for flexible rule filtering based on pipeline intentions and include lists, while preventing any evaluation of excluded namespaces regardless of filtering results. Assisted by: Cursor (powered by Claude 4 Sonnet) https://issues.redhat.com/browse/EC-1401
feat: implement pluggable rule filtering system with pipeline intentions
The new system allows for flexible rule filtering based on pipeline intentions
and include lists, while preventing any evaluation of excluded namespaces
regardless of filtering results.
Assisted by: Cursor (powered by Claude 4 Sonnet)