🚨 Update module github.com/open-policy-agent/opa to v1 (release-v0.5) #1561
+1
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
v0.63.0->v1.9.0Release Notes
open-policy-agent/opa (github.com/open-policy-agent/opa)
v1.9.0Compare Source
This release contains a mix of new features, performance improvements, and bugfixes. Notably:
Compile Rego Queries Into SQL Filters (#7887)
Compile API extensions with support for SQL filter generation previously exclusive to EOPA has been ported into OPA.
Example
With OPA running with this policy, we'll compile the query
data.filters.includeinto SQL filters:Example Request
{ "input": { "favorite": "pineapple" } }Example Response
{ "result": { "query": "WHERE fruits.name = E'pineapple'" } }See the documentation for more details.
Authored by @srenatus and @philipaconrad
Improved Rule Indexing For "Naked" Refs (#7897)
OPA's rule indexer is a means by which OPA can optimize evaluation performance.
Briefly, the indexer can in some cases determine that a rule won't successfully evaluate before it's evaluated based on the query input.
The indexer previously only considered terms in certain compound expressions, ignoring single terms; e.g. an expression containing a sole "naked" ref. This has now changed!
Example
Given a policy with an
allowrule containing two "naked" refs:input.fooandinput.bar:and the input document:
{ "foo": 1 }before this improvement, when evaluating the query
data.example.allow, we get the trace log:Here, we can see that the
allowrule is evaluated, but fails on theinput.barexpression, as it's referencing anundefinedvalue.With the improvement to the indexer, we instead get:
Where we can see that the
allowrule was never evaluated, since the input doesn't meet the conditions established by the indexer; i.e. bothinput.fooandinput.barmust havedefinedvalues.Authored by @srenatus
Runtime, Tooling
opa runwhen loading bundles in watch-mode (--watch) (#7870) authored by @sspaink reported by @johanfyllingCompiler, Topdown and Rego
numbers.range_stepbuilt-in error message (#7882) authored by @charlieegan3Docs, Website
everyandnotexamples (#7901) authored by @charlieegan3io.jwtandtimebuilt-ins (#7892) authored by @charlieegan3regexandstringbuilt-ins (#7890) authored by @charlieegan3Miscellaneous
v1.8.0Compare Source
This release contains a mix of new features, performance improvements, and bugfixes. Notably:
io.jwtbuilt-ins, including a newio.jwt.verify_eddsabuilt-in.EdDSA Support in built-ins (#7824)
Support for the EdDSA signing algorithm has been added to built-in functions in the
io.jwtnamespace.This introduces the new io.jwt.verify_eddsa built-in function, and adds EdDSA support for the following built-ins:
This feature benefited greatly from the groundwork laid by @lestrrat in (#7638). 👏 🎉 🥳
Authored by @johanfylling reported by @aromeyer
Runtime
cmd.RootCommanddefinition. (#7811) authored by @philipaconradFixing a breaking change to the go API introduced in OPA v1.7.0.
opa execparameters (#7850, #7840) authored by @srenatusFixing regressions introduced in OPA v1.7.0, where the
--fail-non-emptyand--stdin-inputflags were dropped."", discern from unset (#7831) authored by @srenatus reported by @ManuelNowackConfinaleTopdown
Object.Inserton existing key (#7820) authored by @anderseknertgithub.com/lestrrat-go/jwx/v3(#7638) authored by @lestrratDocs, Website
countdescription (#7836) authored by @charlieegan3Miscellaneous
TestCertReloadingless verbose (#7823) authored by @charlieegan3*-patchbuild targets (#7864) authored by @johanfyllingv1.7.1Compare Source
This is a bug fix release addressing two issues for users that include OPA's CLI in their own application's CLI:
cmdpackage (cmd.RootCommand)opa parsecommandv1.7.0Compare Source
This release contains a mix of new features, performance improvements, and bugfixes. Notably:
SDK Improvements
The OPA SDK/API has been improved to provide better extensibility an more points of integration for developers.
DefaultModuleLoader(#7794) authored by @srenatusQueryTracers,tracing.OptionsandCancelfromQueryContext(#7767) authored by @philipaconradTracingOptsintoEvalContext(#7778) authored by @srenatusExtraDiscoveryOptstoruntime.Params(#7766) authored by @srenatushttp.Flusher(#7772) authored by @srenatusuint64andfloat64metrics inrunBenchmark(#7761) authored by @srenatusRuntime, Tooling
AsBundle()(#7798) authored by @srenatusFactories()merge the factories (#7777) authored by @srenatusOPA will no longer send telemetry data when fetching the latest release version.
BatchDecisionIDfield to Decision Logs (#7791) authored by @philipaconradCompiler, Topdown and Rego
Docs, Website
Note: While we have been working on the new website we have been showing
the edge documentation contents (as contents and framework changes often must
go hand in hand). Now that the website development pace has slowed and the
functionality is more stable, we will be returning to showing the documentation
content from the latest release instead. Please use the
edge documentation site
to review new changes. PR previews are also based on the latest branch commit.
This change will be made to show the v1.7.0 release shortly after publishing.
/docs/envoy-authorization/404(#7755 authored by @charlieegan3/data/versions.json(#7783) authored by @charlieegan3Miscellaneous
Benchmark fixes (#7765) authored by @anderseknert
Use Regal for linting Rego (#7752) authored by @anderseknert
Use shorthand form for types (#7757) authored by @anderseknert
.github: Use types for issues (#7751) authored by @charlieegan3
build: Add top-level token permissions for workflows (#7795) authored by @timothyklee
docs/build: Link checker fixes (#7743) authored by @charlieegan3
Dependency updates; notably:
v1.6.0Compare Source
This release contains a mix of new features, performance improvements, and bugfixes. Notably:
Modernized OPA Website (#7037)
We're continuing to modernize the OPA website with a new design and improved user experience.
Some highlights:
Authored by @sky3n3t and @charlieegan3
Allowing keywords in Rego references (#7709)
Previously, Rego references could not contain terms that conflict with Rego keywords such as
package,if,else,not, etc.in certain constructs:
The constraints for valid Rego references have been relaxed to allow keywords.
The above example is now valid and will no longer cause a compilation error.
Authored by @johanfylling
Parallel Test Execution (#7442)
By default, OPA will now run tests in parallel (defaulting to one parallel execution thread per available CPU core), significantly speeding up test execution time for large test suites.
The performance boost is closely tied to the number of tests in your project and your selected parallelism level. For larger projects and default settings, 2-3x performance gains have been measured on a MacBook Pro.
Parallelism can be disabled to run tests sequentially by setting the
--parallelflag to1. E.g.opa test . --parallel=1.Authored by @sspaink reported by @anderseknert
Faster Builtin Function Evaluation
The builtin context, an internal construct of OPA's evaluation engine, was previously provided to every builtin function.
As it turns out, only very few of them actually need it, for caching, cancellation, or lookups.
Those builtins are still provided with a builtin context, but for calls to all other builtins, we save the memory required by it.
The impact is tremendous: Even though the size of a single builtin context is only about 270 bytes, in an example application (Regal), this change brings about 360 MB of reduced memory usage!
Authored by @anderseknert
Runtime, Tooling, SDK
opa check --bundlereport virtual/base doc conflicts (#7701) authored by @anderseknertWhen
opa checkis used with the--bundleflag, an error will be reported if the provided json/yaml data has a conflicting overlap with the virtual documents generated by Rego rules. Such conflicts are ambiguous and can lead to unexpected evaluation results, and should be resolved.opa inspectwith JSON format (#7459) authored by @johanfylling reported by @mostealth--v0-compatibleflag (#7668) authored by @tsandallNote: This is a potentially breaking change for go API users directly interfacing with the OPA server's routing.
Note: This is only applicable for the web UI hosted by OPA on its root path (
/) and OPA is served at some other path than root.Compiler, Topdown and Rego
Note: Primitive Rego number values with leading zeros (e.g.
0123) are now considered invalid at time of parsing and will generate an error. If you're impacted by this change, please update your policies to not have numbers with leading zeros. E.g.0123should be changed to123.walkwould get mutated (#7656) authored by @anderseknert reported by @robmyersrobmyersDocs, Website, Ecosystem
Miscellaneous
google.golang.org/protobuf(#7655) authored by @sspainkconcatperformance (#7702) authored by @anderseknertv1.5.1Compare Source
This is a bug fix release addressing a regression to the walk built-in function, introduced in v1.5.0. See #7656 (authored by @anderseknert reported by @robmyersrobmyers)
v1.5.0Compare Source
This release contains a mix of new features, performance improvements, and bugfixes. Among others:
object.get,walkand builtin-function evaluationModernized OPA Website (#7037)
The OPA website has been modernized with a new design and improved user experience.
The new site is based on Docusaurus and React which makes it easier to build live functionality and add non-documentation resources. This lays the groundwork for even more improvements in the future!
Documentation for older OPA versions are still available in the version archive.
Authored by @charlieegan3
Runtime, Tooling, SDK
SomeDeclLocationfield when compiler resolves refs (#7543) authored by @johanfyllingcommitandtimestamp(#7471) reported by @kastl-ars authored by @sspainkPlanner, Topdown and Rego
object.getbuilt-in function (#7593) authored by @anderseknertwalkbuilt-in function (#7612) authored by @anderseknertDocs, Website, Ecosystem
Configuration
📅 Schedule: Branch creation - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.