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 fmt: will format ref head rules when they're not needed, causing back compat issues #5449
Labels
Projects
Comments
srenatus
added a commit
to srenatus/opa
that referenced
this issue
Dec 7, 2022
Before, we'd end up formatting ps["foo"] = "bar" { true } as ps.foo = "bar" { true } and older OPA version know how to parse the former, but not the latter. Fixes open-policy-agent#5449. Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
srenatus
added a commit
to srenatus/opa
that referenced
this issue
Dec 7, 2022
…cy-agent#5450) Before, we'd end up formatting ps["foo"] = "bar" { true } as ps.foo = "bar" { true } and older OPA version know how to parse the former, but not the latter. Fixes open-policy-agent#5449. Also includes: * format: pass internal options via struct; because adding a third (in some cases fifth) boolean argument just didn't seem right. Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
srenatus
added a commit
that referenced
this issue
Dec 7, 2022
Before, we'd end up formatting ps["foo"] = "bar" { true } as ps.foo = "bar" { true } and older OPA version know how to parse the former, but not the latter. Fixes #5449. Also includes: * format: pass internal options via struct; because adding a third (in some cases fifth) boolean argument just didn't seem right. Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
srenatus
added a commit
to srenatus/opa
that referenced
this issue
Dec 7, 2022
…cy-agent#5450) Before, we'd end up formatting ps["foo"] = "bar" { true } as ps.foo = "bar" { true } and older OPA version know how to parse the former, but not the latter. Fixes open-policy-agent#5449. Also includes: * format: pass internal options via struct; because adding a third (in some cases fifth) boolean argument just didn't seem right. Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
Merged
srenatus
added a commit
that referenced
this issue
Dec 7, 2022
Before, we'd end up formatting ps["foo"] = "bar" { true } as ps.foo = "bar" { true } and older OPA version know how to parse the former, but not the latter. Fixes #5449. Also includes: * format: pass internal options via struct; because adding a third (in some cases fifth) boolean argument just didn't seem right. Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
⬇️
opa fmt
In this case, the output will not work on OPA version that don't know ref heads. But if the input policy is OK with a version of OPA, then the formatted policy must be, too.
The text was updated successfully, but these errors were encountered: