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

schemas annotation issue in v0.69.0 #7116

Closed
anderseknert opened this issue Oct 11, 2024 · 3 comments · Fixed by #7124
Closed

schemas annotation issue in v0.69.0 #7116

anderseknert opened this issue Oct 11, 2024 · 3 comments · Fixed by #7124
Labels

Comments

@anderseknert
Copy link
Member

Originally reported by @garethahealy here. Thanks Gareth! It seems like there's a regression in how OPA handles schemas annotations in v0.69.0.

Minimal code to reproduce:

p.rego

package p

# METADATA
# schemas:
# - data.p.x: schema["nope"]
bug := data.p.x

There is of course no "nope" schema, but that shouldn't matter when we run opa check without providing any schemas. However:

OPA v0.68.0

$ opa check p.rego
(no output)

OPA v0.69.0

$ opa check p.rego
1 error occurred: p.rego:6: rego_type_error: undefined ref: data.p.x
	data.p.x
	       ^
	       have: "x"
	       want (one of): ["x"]
@tjons
Copy link
Contributor

tjons commented Oct 15, 2024

a rudimentary bisect with some testing reveals that 76f7038 is the source of the bug. I'll dig into it further and should have a fix this week

@anderseknert
Copy link
Member Author

Excellent! Thanks @tjons 👍

@tjons
Copy link
Contributor

tjons commented Oct 16, 2024

Opened #7124 to fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants