-
Notifications
You must be signed in to change notification settings - Fork 886
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
fix: no skip result when no image match the rule #6733
Conversation
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
The unit tests failed @eddycharly :( |
Yeah, will fix it asap. |
@realshuting does the changes make sense ? |
I'll probably have to defer it to @JimBugwadia , it was added via #6011. Not sure if we do this on purpose? |
@JimBugwadia WDYT ? |
My use case is to validate all |
Makes sense to me.
How does this impact users? Does Kyverno return skipped images in the message when an image is blocked? |
At least this creates a report with a |
I agree, there seems no need to have these skipped results in the report. I thought |
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Codecov Report
@@ Coverage Diff @@
## main #6733 +/- ##
==========================================
- Coverage 34.36% 34.33% -0.03%
==========================================
Files 215 215
Lines 21034 21025 -9
==========================================
- Hits 7228 7219 -9
Misses 13109 13109
Partials 697 697
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
The intent of Skip was to indicate that a rule matches but was not applied due to some other filter, like preconditions or image patterns. What is the proposed behavior for Skip? Seems like the same argument for removing it for image matches can be applied to preconditions. |
But in this case we have no way to target specific image patterns ? It's going to generate a lot of skip events. |
Yes, that's true. We can remove this, as I don't see much value in reporting Skip other than perhaps troubleshooting policies, which is not the intent of the report. |
FWIW I agree here with the decision to not score non-matching images as a |
Explanation
This PR removes
skip
results when no image match the rule.