We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
policy1.rego
# METADATA # scope: package # description: this is the policy.foo package! package policy.foo
policy2.rego
package policy.foo baz := rego.metadata.chain()
❯ opa eval -f pretty -d . data.policy.foo { "baz": [ { "path": [ "policy", "foo", "baz" ] } ] }
The package level annotation provided in policy1.rego should be picked up by rego.metadata.chain() in policy2.rego
rego.metadata.chain()
It doesn't.
The subpackages scope does work as expected here.
subpackages
The text was updated successfully, but these errors were encountered:
Annotations scoped to package carries across modules
package
e832722
Fixes: open-policy-agent#5251 Signed-off-by: Johan Fylling <[email protected]>
ast: Annotations scoped to package carries across modules (#5627)
c0360f1
Fixes: #5251 Signed-off-by: Johan Fylling <[email protected]>
johanfylling
Successfully merging a pull request may close this issue.
policy1.rego
policy2.rego
Expected Behavior
The package level annotation provided in policy1.rego should be picked up by
rego.metadata.chain()
in policy2.regoActual Behavior
It doesn't.
Other Notes
The
subpackages
scope does work as expected here.The text was updated successfully, but these errors were encountered: