Skip to content
Discussion options

You must be logged in to vote

It looks like a 5.x regression, not something on your side. In 5.2.1 the "Limit to project versions marked as latest" checkbox is saved on the policy, but the policy engine never reads it, so violations get created for every version, latest or not.

In 4.x the evaluator skipped the policy for non-latest versions (PolicyEngine.java#L85-L87 at 4.14.6):

if (policy.isOnlyLatestProjectVersion() && Boolean.FALSE.equals(component.getProject().isLatest())) continue;

In 5.2.1 evaluation goes through the CEL engine, which loads policies with CelPolicyDao.getApplicablePolicies (called from CelPolicyEngine.java#L129). That query filters by global, assigned project/parents and tags, and has no conditio…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@mrmagoo99-cpu
Comment options

Answer selected by mrmagoo99-cpu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants