|
3 | 3 | All notable changes to this project will be documented in this file. This |
4 | 4 | project adheres to [Semantic Versioning](http://semver.org/). |
5 | 5 |
|
6 | | -## Unreleased |
| 6 | +## 1.6.0 |
| 7 | + |
| 8 | +This release contains a mix of new features, performance improvements, and bugfixes. Notably: |
| 9 | + |
| 10 | +- Improvements to the OPA website and documentation |
| 11 | +- Allowing keywords in Rego references |
| 12 | +- Parallel test execution |
| 13 | +- Faster built-in function execution |
| 14 | + |
| 15 | +### Modernized OPA Website ([#7037](https://github.com/open-policy-agent/opa/issues/7037)) |
| 16 | + |
| 17 | +We're continuing to modernize the OPA website with a new design and improved user experience. |
| 18 | + |
| 19 | +Some highlights: |
| 20 | + |
| 21 | +- [Builtins](https://www.openpolicyagent.org/docs/policy-reference#built-in-functions): You can now search them on the docs page! |
| 22 | +- Sidebar redesign: Making it easier to find what you're looking for in our docs |
| 23 | +- Feedback forms: Closing the feedback loop between docs authors and readers -- Please let us know if you dislike, or like, a docs page. |
| 24 | +- [Downloads page](https://www.openpolicyagent.org/docs#1-download-opa): Find your OS' installation instructions on a less cluttered page! |
| 25 | +- And much more |
| 26 | + |
| 27 | +Authored by @sky3n3t and @charlieegan3 |
| 28 | + |
| 29 | +### Allowing keywords in Rego references ([#7709](https://github.com/open-policy-agent/opa/pull/7709)) |
| 30 | + |
| 31 | +Previously, Rego references could not contain terms that conflict with Rego keywords such as `package`, `if`, `else`, `not`, etc. |
| 32 | +in certain constructs: |
| 33 | + |
| 34 | +```rego |
| 35 | +package example |
| 36 | +
|
| 37 | +allow if { |
| 38 | + input.package.source # not allowed (before v1.6.0) |
| 39 | + input["package"].destination # allowed |
| 40 | +} |
| 41 | +``` |
| 42 | + |
| 43 | +The constraints for valid Rego references have been relaxed to allow keywords. |
| 44 | +The above example is now valid and will no longer cause a compilation error. |
| 45 | + |
| 46 | +Authored by @johanfylling |
| 47 | + |
| 48 | +### Parallel Test Execution ([#7442](https://github.com/open-policy-agent/opa/issues/7442)) |
| 49 | + |
| 50 | +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. |
| 51 | +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. |
| 52 | + |
| 53 | +Parallelism can be disabled to run tests sequentially by setting the `--parallel` flag to `1`. E.g. `opa test . --parallel=1`. |
| 54 | + |
| 55 | +Authored by @sspaink reported by @anderseknert |
| 56 | + |
| 57 | +### Faster Builtin Function Evaluation |
| 58 | + |
| 59 | +The builtin context, an internal construct of OPA's evaluation engine, was previously provided to every builtin function. |
| 60 | +As it turns out, only very few of them actually need it, for caching, cancellation, or lookups. |
| 61 | +Those builtins are still provided with a builtin context, but for calls to all other builtins, we save the memory required by it. |
| 62 | +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! |
| 63 | + |
| 64 | +Authored by @anderseknert |
| 65 | + |
| 66 | +### Runtime, Tooling, SDK |
| 67 | + |
| 68 | +- cmd/check: `opa check --bundle` report virtual/base doc conflicts ([#7701](https://github.com/open-policy-agent/opa/pull/7701)) authored by @anderseknert |
| 69 | + When `opa check` is used with the `--bundle` flag, 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. |
| 70 | +- cmd/inspect: Fixing missing annotations location in `opa inspect` with JSON format ([#7459](https://github.com/open-policy-agent/opa/issues/7459)) authored by @johanfylling reported by @mostealth |
| 71 | +- cmd/parse: Expose `--v0-compatible` flag ([#7668](https://github.com/open-policy-agent/opa/pull/7668)) authored by @tsandall |
| 72 | +- cmd/refactor: Fix src:dst parsing to deal with colons ([#7648](https://github.com/open-policy-agent/opa/pull/7648)) authored by @tsandall |
| 73 | +- metrics: Fix restartable timer bug. ([#7669](https://github.com/open-policy-agent/opa/pull/7669)) authored by @philipaconrad |
| 74 | +- metrics: Prealloc maps + add benchmark ([#7664](https://github.com/open-policy-agent/opa/pull/7664)) authored by @philipaconrad |
| 75 | +- oracle: Add support for some and every ([#7716](https://github.com/open-policy-agent/opa/pull/7716)) authored by @charlieegan3 |
| 76 | +- oracle: Support object refs in FindDefinition ([#7711](https://github.com/open-policy-agent/opa/pull/7711)) authored by @charlieegan3 |
| 77 | +- plugin/decision: Check if event is too large after compression ([#7526](https://github.com/open-policy-agent/opa/issues/7526)) authored by @sspaink |
| 78 | +- runtime,server: Replace gorilla/mux dependency with http.ServeMux ([#7676](https://github.com/open-policy-agent/opa/pull/7676)) authored by @anderseknert |
| 79 | + **Note**: This is a potentially breaking change for go API users directly interfacing with the OPA server's routing. |
| 80 | +- server: Fix deferred metrics timers. ([#7671](https://github.com/open-policy-agent/opa/pull/7671)) authored by @philipaconrad |
| 81 | +- server: Fix query url when opa is served not from root path ([#7644](https://github.com/open-policy-agent/opa/pull/7644)) authored by @olegKoshmeliuk |
| 82 | + **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. |
| 83 | + |
| 84 | +### Compiler, Topdown and Rego |
| 85 | + |
| 86 | +- ast: Ensure surplus leading zeros always error ([#7726](https://github.com/open-policy-agent/opa/pull/7726)) authored by @charlieegan3 |
| 87 | + **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. `0123` should be changed to `123`. |
| 88 | +- ast: Fixing type-checker schema cache race condition for inlined schemas ([#7679](https://github.com/open-policy-agent/opa/issues/7679), [7571](https://github.com/open-policy-agent/opa/issues/7571)) authored by @johanfylling reported by @daniel-petrov-gig |
| 89 | +- perf: Improve performance when referencing "global" in loop ([#7654](https://github.com/open-policy-agent/opa/issues/7654)) authored by @anderseknert |
| 90 | +- topdown: Fix issue where path in `walk` would get mutated ([#7656](https://github.com/open-policy-agent/opa/issues/7656)) authored by @anderseknert reported by @robmyersrobmyers |
| 91 | +- topdown/http: Lenient application/json Content-Type header ([#6684](https://github.com/open-policy-agent/opa/issues/6684)) authored by @sspaink reported by @mrvanes |
| 92 | + |
| 93 | +### Docs, Website, Ecosystem |
| 94 | + |
| 95 | +- adopters: add Pix4D as adopters for its RBAC service ([#7645](https://github.com/open-policy-agent/opa/pull/7645)) authored by @marcaurele |
| 96 | +- api: Expand docs for RegisterBuiltin — no thread-safety ([#7667](https://github.com/open-policy-agent/opa/issues/7667)) authored by @anderseknert reported by @parth-mehta-989 |
| 97 | +- docs: Added a search function for the builtins section of policy-reference ([#7704](https://github.com/open-policy-agent/opa/pull/7704)) authored by @sky3n3t |
| 98 | +- docs: Add another OR note in AND section ([#7706](https://github.com/open-policy-agent/opa/pull/7706)) authored by @charlieegan3 |
| 99 | +- docs: Add basic docs covering CI/CD use case ([#7703](https://github.com/open-policy-agent/opa/pull/7703)) authored by @charlieegan3 |
| 100 | +- docs: Add current ecosystem contribution docs ([#7678](https://github.com/open-policy-agent/opa/pull/7678)) authored by @charlieegan3 |
| 101 | +- docs: Add EvergreenCodeBlock for code with version ([#7706](github.com/open-policy-agent/opa/pull/7706)) authored by @charlieegan3 |
| 102 | +- docs: Add feedback form for user reported issues ([#7662](https://github.com/open-policy-agent/opa/pull/7662)) authored by @charlieegan3 |
| 103 | +- docs: Address broken links ([#7661](https://github.com/open-policy-agent/opa/pull/7661)) authored by @charlieegan3 |
| 104 | +- docs: Archive explain that only latest patch is shown ([#7682](https://github.com/open-policy-agent/opa/pull/7682)) authored by @charlieegan3 |
| 105 | +- docs: Fix bug where the search match respects case ([#7713](https://github.com/open-policy-agent/opa/pull/7713)) authored by @sky3n3t |
| 106 | +- docs: Hide feedback pop-up forever if dismissed ([#7674](https://github.com/open-policy-agent/opa/pull/7674)) authored by @charlieegan3 |
| 107 | +- docs: Improve bundle structure documentation ([#7683](https://github.com/open-policy-agent/opa/pull/7683)) authored by @charlieegan3 |
| 108 | +- docs: Improve explanations for initial examples ([#7677](https://github.com/open-policy-agent/opa/pull/7677)) authored by @charlieegan3 |
| 109 | +- docs: Install/Download Instruction Update ([#7687](https://github.com/open-policy-agent/opa/pull/7687)) authored by @charlieegan3 |
| 110 | +- docs: Move code example data inside the PlaygroundComponent ([#7724](https://github.com/open-policy-agent/opa/pull/7724)) authored by @sky3n3t |
| 111 | +- docs: policy-reference, update sig algs formatting ([#7685](https://github.com/open-policy-agent/opa/pull/7685)) authored by @charlieegan3 |
| 112 | +- docs: Redirect old admission control link ([#7730](https://github.com/open-policy-agent/opa/pull/7730)) authored by @charlieegan3 |
| 113 | +- docs: Refactored Networking Reference docs ([#7686](https://github.com/open-policy-agent/opa/pull/7686)) authored by @sky3n3t |
| 114 | +- docs: Revise sidebar order and layout ([#7731](https://github.com/open-policy-agent/opa/pull/7731)) authored by @charlieegan3 |
| 115 | +- docs: Reworked existing policy examples to use PlaygroundExample ([#7690](https://github.com/open-policy-agent/opa/pull/7690)) authored by @sky3n3t |
| 116 | +- docs: Show a feedback popup on the docs site ([#7663](https://github.com/open-policy-agent/opa/pull/7663)) authored by @charlieegan3 |
| 117 | +- docs: Show edge rather than latest release ([#7717](https://github.com/open-policy-agent/opa/pull/7717)) authored by @charlieegan3 |
| 118 | +- docs: Show TOC on CLI page ([#7712](https://github.com/open-policy-agent/opa/pull/7712)) authored by @charlieegan3 |
| 119 | +- docs: Update colors for feedback form in dark mode ([#7691](https://github.com/open-policy-agent/opa/pull/7691)) authored by @charlieegan3 |
| 120 | +- docs: Update policy-ref allowing anchor linking ([#7675](https://github.com/open-policy-agent/opa/pull/7675)) authored by @charlieegan3 |
| 121 | +- docs: Update rego in deployment examples ([#7707](https://github.com/open-policy-agent/opa/pull/7707)) authored by @charlieegan3 |
| 122 | +- docs: Update sidebar ([#7723](https://github.com/open-policy-agent/opa/pull/7723)) authored by @charlieegan3 |
| 123 | +- website: Disable cancel script ([#7719](https://github.com/open-policy-agent/opa/pull/7719)) authored by @charlieegan3 |
| 124 | +- website: Explain automation in RELEASE.md ([#7721](https://github.com/open-policy-agent/opa/pull/7721)) authored by @charlieegan3 |
| 125 | +- website: Fix badge endpoints ([#7653](https://github.com/open-policy-agent/opa/pull/7653)) authored by @charlieegan3 |
| 126 | +- website: Refactor site components with CSS modules ([#7666](https://github.com/open-policy-agent/opa/pull/7666)) authored by @charlieegan3 |
| 127 | +- website: Update docusaurus components to 3.8.1 ([#7718](https://github.com/open-policy-agent/opa/pull/7718)) authored by @charlieegan3 |
| 128 | + |
| 129 | +### Miscellaneous |
| 130 | + |
| 131 | +- build: Better detection of go changes ([#7696](https://github.com/open-policy-agent/opa/pull/7696)) authored by @charlieegan3 |
| 132 | +- build: Bump golang 1.24.3 -> 1.24.4 ([#7672](https://github.com/open-policy-agent/opa/pull/7672)) authored by @srenatus |
| 133 | +- Adding Clarification to merge instructions when cutting a patch release ([#7660](https://github.com/open-policy-agent/opa/pull/7660)) authored by @johanfylling |
| 134 | +- build: Make summary failure source clearer ([#7697](https://github.com/open-policy-agent/opa/pull/7697)) authored by @charlieegan3 |
| 135 | +- build: Skip jobs for non docs changes ([#7688](https://github.com/open-policy-agent/opa/pull/7688)) authored by @charlieegan3 |
| 136 | +- deps: Use `google.golang.org/protobuf` ([#7655](https://github.com/open-policy-agent/opa/pull/7655)) authored by @sspaink |
| 137 | +- perf: Simplify interning ([#7714](https://github.com/open-policy-agent/opa/pull/7714)) authored by @anderseknert |
| 138 | +- perf: Only pass built-in context to calls depending on it ([#7728](https://github.com/open-policy-agent/opa/pull/7728)) authored by @anderseknert |
| 139 | +- perf: Improve built-in `concat` performance ([#7702](https://github.com/open-policy-agent/opa/pull/7702)) authored by @anderseknert |
| 140 | +- perf: More efficient data/v1 POST handler ([#7673](https://github.com/open-policy-agent/opa/pull/7673)) authored by @anderseknert |
| 141 | +- test: Fix flaky TestRaisingHTTPClientQueryError ([#7698](https://github.com/open-policy-agent/opa/pull/7698)) authored by @sspaink |
| 142 | +- test: Fix flaky topdown query cache tests ([#7590](https://github.com/open-policy-agent/opa/issues/7590)) authored by @sspaink |
| 143 | +- Dependency updates; notably: |
| 144 | + - build(deps): Bump gqlparser from v2.5.27 to v2.5.28 ([#7699](https://github.com/open-policy-agent/opa/issues/7699)) authored by @robmyersrobmyers |
| 145 | + - build(deps): bump github.com/go-logr/logr from 1.4.2 to 1.4.3 |
| 146 | + - build(deps): bump github.com/vektah/gqlparser/v2 from 2.5.26 to 2.5.27 |
| 147 | + - build(deps): bump golang.org/x/net from 0.39.0 to 0.40.0 |
| 148 | + - build(deps): bump google.golang.org/grpc from 1.72.0 to 1.72.2 |
| 149 | + - build(deps): bump oras.land/oras-go/v2 from 2.5.0 to 2.6.0 |
| 150 | + - build(deps): bump go.opentelemetry.io deps to 1.36.0/0.61.0 |
7 | 151 |
|
8 | 152 | ## 1.5.1 |
9 | 153 |
|
|
0 commit comments