Skip to content
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

Use consistent rego syntax in prep for opa 1.0 #2281

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

simonbaird
Copy link
Member

@simonbaird simonbaird commented Jan 21, 2025

The idea here is that once we update to opa 1.0 we'll need to always use the new deny contains foo if syntax. This change is supposed to make it easier by using that syntax consistently now.

It requires importing rego.v1 everywhere, but we do that consistently for all the rego in ec-policies, so let's also do it here also.

See also #2274 which I'd like to rebase on this once it's merged.

Ref: https://issues.redhat.com/browse/EC-1130

Copy link

codecov bot commented Jan 21, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 72.79%. Comparing base (6642931) to head (139791d).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #2281   +/-   ##
=======================================
  Coverage   72.79%   72.79%           
=======================================
  Files          89       89           
  Lines        7687     7687           
=======================================
  Hits         5596     5596           
  Misses       2091     2091           
Flag Coverage Δ
generative 72.79% <ø> (ø)
integration 72.79% <ø> (ø)
unit 72.79% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

The idea here is that once we update to opa 1.0 we'll need to always
use the new `deny contains foo if` syntax. This change is supposed
to make it easier by using that syntax consistently now.

It requires importing `rego.v1` everywhere, but we do that
consistently for all the rego in ec-policies, so let's also do it
here also.

See also enterprise-contract#2274 which I'd like to rebase on this once it's merged.
@simonbaird simonbaird force-pushed the prep-test-rego-for-opa-1.0 branch from 473f065 to 8de0bb9 Compare February 6, 2025 21:31
@simonbaird
Copy link
Member Author

For some reason I can't run acceptance tests locally, so it's slow going to get all the small snapshot changes done.

@simonbaird
Copy link
Member Author

Note the acceptance tests are not actually passing, despite what it looks like.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant