Slackbot
11/21/2022, 2:29 PMFilip
11/21/2022, 2:31 PMAdrian Patterson
11/21/2022, 2:43 PM'errors': [{'code': 'rego_parse_error', 'message': 'var cannot be used for rule name',
I don't really understand how this is possible since I can run a local OPA server perfectly fine and all tests pass. Either way, sorry for the spam it turned out to be a rego error just as others on here have seen. Maybe a suggestion would be to have some more verbose error handling for the set_policy function and print a message telling the user their rego code/json data is invalid π
Thanks and sorry for the spam again!Or Weis
11/21/2022, 2:49 PMAdrian Patterson
11/21/2022, 2:52 PMimport future.keywords
allow if {
# rules here
}
After changing to
allow {
# rules
}
It works! Must be a version issue. I'll take a look at which OPA version I have locally vs. what OPAL uses. Thanks for the tip!
I'll see what I can do for a PR π Would love to contribute. Thanks to the team for being super responsive & helpful.