rego: Upgrade to OPA v1 - #2815
Merged
Maksim An (anmaxvl) merged 7 commits intoAug 11, 2026
Merged
Conversation
Contributor
|
Tingmao Wang (@micromaomao) - I didn't realize you were working on this. Could we first merge my change and then we can take your updates to move to v1? |
Tingmao Wang (micromaomao)
force-pushed
the
tingmao_github/opa
branch
2 times, most recently
from
July 10, 2026 20:52
d772c5c to
9d58ac7
Compare
Tingmao Wang (micromaomao)
force-pushed
the
tingmao_github/opa
branch
2 times, most recently
from
July 19, 2026 21:14
f11a598 to
632d2d6
Compare
Tingmao Wang (micromaomao)
force-pushed
the
tingmao_github/opa
branch
from
August 2, 2026 20:25
632d2d6 to
da3f411
Compare
Contributor
|
i think you also need to update |
Contributor
|
note that this PR seems to also have commits from #2763, which presumably should be merged first, and this PR needs rebasing afterwards. |
Member
Author
yes, that's deliberate, since I can't make stacked PRs. The lack of Sign-oif-by should prevent this from being accidentally merged |
Maksim An (anmaxvl)
force-pushed
the
tingmao_github/opa
branch
2 times, most recently
from
August 11, 2026 12:12
7f55a7a to
b80cdb6
Compare
Revert some "rego.SetRegoVersion(ast.RegoV0)" Signed-off-by: Maksim An <maksiman@microsoft.com>
Replacing
(^\w+(\(.+\)|\[(\w+|".+")\])?( := (\w+?|\{(.|\n)+?\}|\w+\[\w+\]))?) \{
with
$1 if {
Signed-off-by: Maksim An <maksiman@microsoft.com>
Signed-off-by: Maksim An <maksiman@microsoft.com>
Signed-off-by: Tingmao Wang <tingmaowang@microsoft.com>
…working in Rego v1, don't do it Signed-off-by: Tingmao Wang <tingmaowang@microsoft.com>
…ntains "..."'
perl -pi -e 's/^errors\[(.+)\] if \{$/errors contains $1 if {/' pkg/securitypolicy/framework.rego
See: https://www.openpolicyagent.org/docs/v0-upgrade#enforce-use-of-if-and-contains-keywords-in-rule-head-declarations
Assisted-by: GitHub-Copilot copilot-review
Signed-off-by: Tingmao Wang <tingmaowang@microsoft.com>
Signed-off-by: Maksim An <maksiman@microsoft.com>
Maksim An (anmaxvl)
force-pushed
the
tingmao_github/opa
branch
from
August 11, 2026 12:20
b80cdb6 to
236a5f9
Compare
Hamza El-Saawy (helsaawy)
approved these changes
Aug 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Depends-on: Takuro's PR