Skip to content

Commit 016cb07

Browse files
authored
Prepare v0.56.0 release (#6202)
Signed-off-by: Johan Fylling <[email protected]>
1 parent 65a8b7d commit 016cb07

File tree

4 files changed

+4970
-7
lines changed

4 files changed

+4970
-7
lines changed

CHANGELOG.md

+86-5
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,99 @@
33
All notable changes to this project will be documented in this file. This
44
project adheres to [Semantic Versioning](http://semver.org/).
55

6-
## Unreleased
6+
## 0.56.0
7+
8+
This release contains a mix of new features, bugfixes and a new builtin function.
9+
10+
### Support for General References in Rule Heads (Experimental)
11+
12+
A new experimental feature in OPA is support for general refs in rule heads. Where a general ref is a reference with variables at arbitrary locations.
13+
14+
```rego
15+
package example
16+
17+
import future.keywords
18+
19+
# Converting a flat list of users to a mapping by "role" and then "id".
20+
users_by_role[role][id] := user if {
21+
some user in data.users
22+
id := user.id
23+
role := user.role
24+
}
25+
26+
# Explicit "admin" key override to the above mapping.
27+
users_by_role.admin[id] := user if {
28+
some user in data.admins
29+
id := user.id
30+
}
31+
32+
# Leaf entries can be multi-value.
33+
users_by_country[country] contains user.id if {
34+
some user in data.users
35+
country := user.country
36+
}
37+
```
38+
39+
General refs are currently not supported by the OPA planner, making this feature unsupported for Wasm and IR.
40+
41+
Note: this feature is disabled by default, and needs to be enabled by setting the `EXPERIMENTAL_GENERAL_RULE_REFS` environment variable (once the feature is complete - supports Wasm and IR - this requirement will be dropped).
42+
43+
Authored by @johanfylling.
44+
45+
### New Built-In Function: `numbers.range_step`
46+
47+
Similar to the `numbers.range` built-in function, `numbers.range_step` returns an array of numbers in a given range. The new built-in function also allows you to control the _step between each entry_.
48+
49+
See [the documentation on the new built-in](https://www.openpolicyagent.org/docs/v0.56.0/policy-reference/#builtin-numbers-numbersrange_step)
50+
for all the details.
51+
52+
Authored by @sspaink.
53+
54+
### New Ecosystem page on The Website
55+
56+
The OPA Ecosystem of related integrations has been refreshed and moved to a more prominent location on [the website](https://www.openpolicyagent.org/ecosystem/).
57+
58+
If you're interested to add any new integrations you've been working on, please see the [docs here](https://github.com/open-policy-agent/opa/tree/main/docs#opa-ecosystem) (updates to existing integrations are very welcome too!).
59+
60+
### Runtime, Tooling, SDK
61+
62+
- ast: Update strict error check message for unused args ([#6125](https://github.com/open-policy-agent/opa/pull/6125)) authored by @ashutosh-narkar
63+
- ast: Remove unnecessary nil check ([#6155](https://github.com/open-policy-agent/opa/pull/6155)) authored by @Juneezee
64+
- cmd: Make `opa test -z` fail with failing tests ([#6126](https://github.com/open-policy-agent/opa/issues/6126)) authored by @fdaguin
65+
- cmd: Fix `opa test` `--ignore` when used together with `--bundle` ([#6185](https://github.com/open-policy-agent/opa/pull/6185)) authored by @joaobrandt
66+
- cmd: Adding `--fail-non-empty` flag to `opa exec` ([#6153](https://github.com/open-policy-agent/opa/pull/6153)) authored by @Ronnie-personal
67+
- download: Add `opa_no_oci` flag to build without containerd ([#6159](https://github.com/open-policy-agent/opa/pull/6159)) authored by @slonka
68+
- download: Remove not required basedir for oci bundles & add test to verify signature verification ([#6145](https://github.com/open-policy-agent/opa/pull/6145)) authored by @gitu
69+
- fmt: Trim trailing whitespace in comments ([#6161](https://github.com/open-policy-agent/opa/issues/6161)) authored by @anderseknert
70+
- fmt: Remove dedup comment function in opa fmt ([#6165](https://github.com/open-policy-agent/opa/pull/6165)) authored by @anderseknert
71+
- runtime: Always read .tar.gz file provided in argument as a bundle ([#5879](https://github.com/open-policy-agent/opa/issues/5879)) authored by @yogisinha
72+
- server/authorizer: Inline readBody ([#6156](https://github.com/open-policy-agent/opa/pull/6156)) authored by @srenatus
73+
- test: Bind test server to localhost interface ([#6162](https://github.com/open-policy-agent/opa/issues/6162)) authored by @anderseknert
74+
75+
### Topdown and Rego
76+
77+
- ast: Including "child" rules when fetching rules by ref ([#6182](https://github.com/open-policy-agent/opa/issues/6182)) authored by @johanfylling
78+
- ast: Making partial object key rules contribute to dynamic portion of object type ([#6138](https://github.com/open-policy-agent/opa/issues/6138)) authored by @johanfylling
79+
- rego: Expose PrepareOption, add BuiltinFuncs ([#6188](https://github.com/open-policy-agent/opa/pull/6188)) authored by @srenatus
80+
- topdown: Support force cache even when server doesn't set the Date header ([#6175](https://github.com/open-policy-agent/opa/pull/6175)) authored by @c2zwdjnlcg
81+
- topdown: Partial-eval for partial object/set ref head rules ([#6094](https://github.com/open-policy-agent/opa/issues/6094)) authored by @johanfylling
82+
83+
### Miscellaneous
84+
85+
- Updates to Documentation and Website (authored by: @anderseknert, @ashutosh-narkar, @atkrad, @charlieegan3, @hmoazzem, @johndbro1, @Pushkarm029, @srenatus and @testwill)
86+
- Dependency updates; notably:
87+
- golang: from 1.20.6 to 1.21 (authored by @ashutosh-narkar amd @srenatus)
88+
- golang.org/x/net from 0.12.0 to 0.14.0
89+
- google.golang.org/grpc from 1.56.2 to 1.57.0
90+
- oras.land/oras-go/v2 from 2.2.1 to 2.3.0
91+
- Replace ghodss/yaml with sigs.k8s.io/yaml ([#6195](https://github.com/open-policy-agent/opa/pull/6195)) authored by @mrueg
792

893
### Breaking changes
994

1095
Since its introduction in 0.34.0, the `--exit-zero-on-skipped` option always made the `opa test` command return an exit code 0. When used, it now returns the exit code 0 only if no failed tests were found.
1196

1297
Test runs on existing projects using `--exit-zero-on-skipped` will fail if any failed tests were inhibited by this behavior.
1398

14-
### Tooling, SDK, and Runtime
15-
16-
- `opa test`: Fix `--exit-zero-on-skipped` behavior to make test runs fail with failing test rules ([#6126](https://github.com/open-policy-agent/opa/issues/6126)) reported and authored by @fdaguin
17-
1899
## 0.55.0
19100

20101
> **_NOTES:_**

0 commit comments

Comments
 (0)