-
Notifications
You must be signed in to change notification settings - Fork 1
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
docs: add v0 compatibility section to OPA 1.0 doc #5
docs: add v0 compatibility section to OPA 1.0 doc #5
Conversation
docs/content/opa-1.md
Outdated
releases: | ||
|
||
{{< info >}} | ||
TODO: unsure if support for v0-compatible is to be as broad as v1-compatible? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there is similar coverage for both. If not we should make that change.
a8830e2
to
73c0bb2
Compare
5399072
to
008ad32
Compare
73c0bb2
to
7215e50
Compare
fa57755
to
539a310
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@charlieegan3 this looks great! Few comments 👇
docs/content/v0-compatibility.md
Outdated
releases: | ||
|
||
{{< info >}} | ||
TODO: unsure if support for v0-compatible is to be as broad as v1-compatible? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we remove this? Or do you have any questions here?
docs/content/v0-compatibility.md
Outdated
TODO: unsure if support for v0-compatible is to be as broad as v1-compatible? | ||
{{< /info >}} | ||
|
||
- `bench`: supports `rego.v0` syntax modules, use of `import rego.v1` is optional. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think this will give users an impression that there is rego.v0
ref and they can do import rego.v0
?
support a gradual upgrade path. | ||
|
||
The `SetRegoVersion` method on [Module](https://github.com/open-policy-agent/opa/blob/f6103df603789b6123ab98118e6ee01677c4930a/ast/policy.go#L469) | ||
can be used like this: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use this link https://pkg.go.dev/github.com/open-policy-agent/opa/ast#Module.SetRegoVersion?
``` | ||
|
||
Similarly, the [Bundle Manifest](https://github.com/open-policy-agent/opa/blob/f6103df603789b6123ab98118e6ee01677c4930a/bundle/bundle.go#L174) Rego version | ||
can be set like this: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
docs/content/v0-upgrade.md
Outdated
is also an option depending on your context. | ||
|
||
The rest of this documentation is designed to meet users where they find | ||
themselves and direct them down the lowest risk path to upgrade to OPA v1.0. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about instead of lowest risk path
we use something like direct them down the smoothest transition path ...
docs/content/v0-upgrade.md
Outdated
### Next | ||
|
||
Downgrade consumers to v0.x ([Scenario 1](#scenario-1)) until all consumers are | ||
v0, then start the upgrade process again. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or they could also go to Scenario 6 🤔 .
docs/content/v0-upgrade.md
Outdated
|
||
#### Pre-requisites | ||
|
||
If v1 consumers cannot be run with `--v0-compatible`. When using a v0 consumer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Is this sentence complete If v1 consumers cannot be run with `--v0-compatible`.
?
docs/content/v0-upgrade.md
Outdated
rejected by v0.x bundle producers. | ||
|
||
Similarly, on the consumer side. If `--v0-compatible` cannot be set on the | ||
consumers, the bundles from v1 producers will not be accepted. `rego.v0` imports |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we plan to add a rego.v0
import.
docs/content/v0-upgrade.md
Outdated
|
||
### Scenario 9 | ||
|
||
TODO: explain this scenario represents the user being done! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we please add the text and remove the TODO?
docs/content/v0-upgrade.md
Outdated
|
||
TODO: explain this scenario represents the user being done! | ||
|
||
### Scenario 10 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this needed?
The guide adds new pages for backwards compatibility and migration to v1. The v1 docs have been moved into the migration guide instead. Signed-off-by: Charlie Egan <[email protected]>
1b5bc88
to
47f5d13
Compare
This covers the v0-compatible mode for the different use cases, leaving the SDK as todo.
Migration paths to come in another PR.