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
In OPA 0.44.0, the new strings.any_prefix_match behaves differently from docs. Docs say:
strings.any_prefix_match
Returns true if any of the search strings begins with any of the base strings.
But in fact, strings.any_prefix_match({"x-0, z-0"}, "z-") evaluates to false contrary to the doc.
strings.any_prefix_match({"x-0, z-0"}, "z-")
https://play.openpolicyagent.org/p/G5VMwfeI6s See lines 11 and 14.
According to doc and the motivating example in issue, both lines should evaluate to true.
true
Strange that this bug exists and does not fail this test case:
opa/test/cases/testdata/strings/test-anyprefixmatch.yaml
Line 3 in e7130a8
The text was updated successfully, but these errors were encountered:
{"x-0, z-0"}
☝️ This is a set containing of one string: "x-0, z-0". Did you mean to use
"x-0, z-0"
{"x-0", "z-0"}
a set of two strings, by any chance? 🤔
Sorry, something went wrong.
BTW we really need more examples in the docs, #4623
Oh lol that's a hilarious mistake on my part!
No branches or pull requests
Short description
In OPA 0.44.0, the new
strings.any_prefix_match
behaves differently from docs.Docs say:
But in fact,
strings.any_prefix_match({"x-0, z-0"}, "z-")
evaluates to false contrary to the doc.Steps To Reproduce
https://play.openpolicyagent.org/p/G5VMwfeI6s
See lines 11 and 14.
Expected behavior
According to doc and the motivating example in issue, both lines should evaluate to
true
.Additional context
Strange that this bug exists and does not fail this test case:
opa/test/cases/testdata/strings/test-anyprefixmatch.yaml
Line 3 in e7130a8
Hmmm.
The text was updated successfully, but these errors were encountered: