OPA Release v0.42.0 #229
srenatus
announced in
Announcements
Replies: 1 comment
-
ℹ️ there's been a patch release, v0.42.1 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
This release contains a number of fixes and enhancements.
New built-in function:
object.subset
This function checks if a collection is a subset of another collection. It works on objects, sets, and arrays.
If both arguments are objects, then the operation is recursive, e.g.
{"c": {"x": {10, 15, 20}}
is considered a subset of
{"a": "b", "c": {"x": {10, 15, 20, 25}, "y": "z"}
.See the built-in functions docs for all details
This implementation fixes #4358 and was authored by @charlesdaniels.
New keywords: "contains" and "if"
These new keywords let you increase the expressiveness of your policy code:
Before
After
Note that rule bodies containing only one expression can be abbreviated when using
if
.To use the new keywords, use
import future.keywords.contains
andimport future.keywords.if
; or import all of them at once viaimport future.keywords
. When these future imports are present, the pretty printer (opa fmt
) will introducecontains
andif
where applicable.if
is allowed in all places to separate the rule head from the body, likebut not for partial set rules, unless also using
contains
:Tooling, SDK, and Runtime
bundle_failed_load_counter
metric for bundles without revisions (#4822) reported and authored by @jkbschmidsystem.authz
policy now properly supports the interquery caching ofhttp.send
calls (#4829), reported by @HarshPathakhpopa bench
: Passing--e2e
makes the benchmark measure the performance of a query including the server's HTTP handlers and their processing.opa fmt
: Output list and diff changes with--fail
flag (#4710) (authored by @davidkuridza)repl
: Add aWithCapabilities
function (authored by @jaspervdj)the performance of any CLI calls (even
opa version
) on Windows. Fixes #4646.Rego and Topdown
count
,object.filter
, andobject.remove
built-in functions (#4767)Documentation
startswith
andendswith
(authored by @whme)Website + Ecosystem
Note that website changes like these become effective immediately and are not tied to a release.
We still use our release notes to record the nice fixed contributed by our community.
Miscellaneous
👉 Release Page 👈
Beta Was this translation helpful? Give feedback.
All reactions