OPA v0.47.0 #312
anderseknert
announced in
Announcements
OPA v0.47.0
#312
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This release contains a mix of bugfixes, optimizations, and new features.
New Built-in Function:
object.keys
It is now possible to conveniently retrieve an object's keys via a built-in function.
Before, you had to resort to constructs like
Now, you can simply do
See the documentation for all details.
Implemented by @kevinswiber.
New Built-in Function: AWS Signature v4 Request Signing
It is now possible to use a built-in function to prepare a request with a signature, so that it can be used with AWS endpoints that use request signing for authentication.
See this example:
See the documentation on the new built-in for all details.
Reported by @jicowan and implemented by @philipaconrad.
Performance improvements for
object.get
andin
operatorBefore, using
object.get
andin
had come with a performance penalty that wasn't to be expected just from the look of the calls: Since they have been implemented using built-in functions (obvious forobject.get
, not obvious for"admin" in input.user.roles
), all of their operands had to be read from the store (if applicable) and converted into AST types.Now, we use shallow references ("lazy objects") for store reads in the evaluator. In these two cases, this can bring huge performance improvements, when the object argument of these two calls is a ref into the base document (like
data.users
):Tooling, SDK, and Runtime
opa eval
: Added--strict
to enable strict code checking in evaluation (#5182) authored by @Parsifal-Mopa fmt
: Remove{ true }
block followingelse
headopa fmt
: Generate new wildcards for else and chained function heads in the parser (#5347). This fixes superfluousintroductions of
_1
instead of_
in when formatting functions that use wildcard arguments, likef(_) := true
.opa fmt
: Fix assignment rewrite in else formatting (#5348)Topdown and Rego
http.send
: Fix interquery cache size calculation with concurrent requests (#5359) reported and authored by @asleirehttp.send
: Remove socket query param for unix sockets (#5313) reported and authored by @michivisome
with unused vars (#4238)x in data.foo
andobject.get(data.bar, ...)
calls significantly.Documentation
json.patch
(#5328)time.parse_ns
Website + Ecosystem
Miscellaneous
👉 Release page
Beta Was this translation helpful? Give feedback.
All reactions