Open Hook25 opened 1 week ago
Attention: Patch coverage is 96.29630%
with 10 lines
in your changes missing coverage. Please review.
Project coverage is 48.35%. Comparing base (
27405cf
) to head (abfaa21
). Report is 3 commits behind head on main.
Files with missing lines | Patch % | Lines |
---|---|---|
checkbox-ng/plainbox/impl/new_resource.py | 96.29% | 7 Missing and 3 partials :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Description
Currently we have a mechanism to gate jobs and generate job from templates that is called resource jobs + resource expressions. The evaluation of these resource expressions is currently semantically broken. It was intentionally broken because the current implementation is too expensive as it tries to computes an explicit product of all resources involved in an expression to then filter them. Additionally the current implementation doesn't allow to fetch "why" a resource expression matches a resource set or not. This doesn't allow Checkbox to produce an explanation to why a job was skipped, but also importantly, greately slows down template expansions, because to do it the current implementation is called N times (one per resource object) to see if it matches the expression.
This is the implementation of a new system that matches the original grammar (with 1 major breaking change) but should:
not
, before we suggested to not use it, now it works as any other operatorResolved issues
Fixes: CHECKBOX-1384
Documentation
The module should be self documenting, all relevant classes and method and the module itself have ample documentation inside
Tests
This adds tests for various scenarios