enterprise-contract / ec-cli

Enterprise Contract command line interface
https://enterprisecontract.dev/docs/ec-cli/main/index.html
Apache License 2.0
26 stars 23 forks source link

Allow for filtering policies by image ref #1723

Closed joejstuart closed 1 day ago

joejstuart commented 1 week ago

Allow for filtering policies by image ref. The imageRef can be used under VolatileConfig and can be used to include or exclude policies.

https://issues.redhat.com/browse/EC-631

codecov[bot] commented 4 days ago

Codecov Report

Attention: Patch coverage is 94.87179% with 4 lines in your changes missing coverage. Please review.

Project coverage is 80.36%. Comparing base (016598f) to head (f2f4517). Report is 17 commits behind head on main.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/enterprise-contract/ec-cli/pull/1723/graphs/tree.svg?width=650&height=150&src=pr&token=CY5ORXJB33&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=enterprise-contract)](https://app.codecov.io/gh/enterprise-contract/ec-cli/pull/1723?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=enterprise-contract) ```diff @@ Coverage Diff @@ ## main #1723 +/- ## ========================================== + Coverage 80.27% 80.36% +0.09% ========================================== Files 67 68 +1 Lines 4861 4904 +43 ========================================== + Hits 3902 3941 +39 - Misses 959 963 +4 ``` | [Flag](https://app.codecov.io/gh/enterprise-contract/ec-cli/pull/1723/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=enterprise-contract) | Coverage Δ | | |---|---|---| | [generative](https://app.codecov.io/gh/enterprise-contract/ec-cli/pull/1723/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=enterprise-contract) | `80.36% <94.87%> (+0.09%)` | :arrow_up: | | [integration](https://app.codecov.io/gh/enterprise-contract/ec-cli/pull/1723/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=enterprise-contract) | `80.36% <94.87%> (+0.09%)` | :arrow_up: | | [unit](https://app.codecov.io/gh/enterprise-contract/ec-cli/pull/1723/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=enterprise-contract) | `80.36% <94.87%> (+0.09%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=enterprise-contract#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files](https://app.codecov.io/gh/enterprise-contract/ec-cli/pull/1723?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=enterprise-contract) | Coverage Δ | | |---|---|---| | [internal/definition/validate.go](https://app.codecov.io/gh/enterprise-contract/ec-cli/pull/1723?src=pr&el=tree&filepath=internal%2Fdefinition%2Fvalidate.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=enterprise-contract#diff-aW50ZXJuYWwvZGVmaW5pdGlvbi92YWxpZGF0ZS5nbw==) | `83.92% <100.00%> (ø)` | | | [internal/evaluator/conftest\_evaluator.go](https://app.codecov.io/gh/enterprise-contract/ec-cli/pull/1723?src=pr&el=tree&filepath=internal%2Fevaluator%2Fconftest_evaluator.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=enterprise-contract#diff-aW50ZXJuYWwvZXZhbHVhdG9yL2NvbmZ0ZXN0X2V2YWx1YXRvci5nbw==) | `83.69% <100.00%> (-0.72%)` | :arrow_down: | | [internal/input/validate.go](https://app.codecov.io/gh/enterprise-contract/ec-cli/pull/1723?src=pr&el=tree&filepath=internal%2Finput%2Fvalidate.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=enterprise-contract#diff-aW50ZXJuYWwvaW5wdXQvdmFsaWRhdGUuZ28=) | `84.21% <100.00%> (ø)` | | | [internal/image/validate.go](https://app.codecov.io/gh/enterprise-contract/ec-cli/pull/1723?src=pr&el=tree&filepath=internal%2Fimage%2Fvalidate.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=enterprise-contract#diff-aW50ZXJuYWwvaW1hZ2UvdmFsaWRhdGUuZ28=) | `72.97% <83.33%> (+0.33%)` | :arrow_up: | | [internal/evaluator/criteria.go](https://app.codecov.io/gh/enterprise-contract/ec-cli/pull/1723?src=pr&el=tree&filepath=internal%2Fevaluator%2Fcriteria.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=enterprise-contract#diff-aW50ZXJuYWwvZXZhbHVhdG9yL2NyaXRlcmlhLmdv) | `94.91% <94.91%> (ø)` | | ... and [2 files with indirect coverage changes](https://app.codecov.io/gh/enterprise-contract/ec-cli/pull/1723/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=enterprise-contract)
zregvart commented 1 day ago

@joejstuart I took your code and tweaked the acceptance tests in #1745, I didn't want to push to your fork/branch as I squashed the commit so you don't have issues rebasing on your machine.

joejstuart commented 1 day ago

merged https://github.com/enterprise-contract/ec-cli/pull/1745 and closing this.