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

OPA 1.0 Preparatory Work #3681

Open
3 tasks
charlieegan3 opened this issue Nov 6, 2024 · 2 comments
Open
3 tasks

OPA 1.0 Preparatory Work #3681

charlieegan3 opened this issue Nov 6, 2024 · 2 comments
Milestone

Comments

@charlieegan3
Copy link

The open-policy-agent/opa project is the process of doing the final preparations for OPA 1.0 and wanted to give you a heads up on the recommended upgrade path for projects using Rego. The plan is for the next release of OPA to be 1.0, this will introduce breaking changes to Rego.

We have some tools and resources to make the upgrade process as smooth as possible.

  • The main reference for OPA 1.0 changes on the project website.
  • opa check --strict is a good place to start, this will flag issues with imports, use of deprecated builtins, and use of now reserved keywords. I think that @anderseknert has done some of the work here in for the gatekeeper library Ensure OPA strict mode compliance gatekeeper-library#429.
  • opa fmt --write --rego-v1 $DIR should be the next step, this will migrate files to the new v1 syntax where possible.
  • regal lint $DIR finally, it’s also recommend use the Regal linter on the policy files. In particular the Bug violations are important to check.
  • These steps are documented in this blog post in more detail.

Any feedback on the process and OPA 1.0's changes generally is appreciated as you go through the process.

Below is a WIP TODO list of things I'm aware of, please feel free to add new items too.

@ritazh ritazh added this to the v3.19.0 milestone Nov 6, 2024
@charlieegan3
Copy link
Author

I have shared some examples for v0/v1 duality in https://github.com/charlieegan3/v0-v1-rego-example. Posting here for future reference.

@ritazh
Copy link
Member

ritazh commented Nov 20, 2024

xpost: #3577

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

No branches or pull requests

2 participants