Skip to content

Commit 00cc7ae

Browse files
ashutosh-narkarjohanfyllingsrenatus
authored
Prepare v1.0.0 release
Signed-off-by: Ashutosh Narkar <[email protected]> Co-authored-by: Johan Fylling <[email protected]> Co-authored-by: Stephan Renatus <[email protected]>
1 parent 94118ac commit 00cc7ae

File tree

4 files changed

+113
-16
lines changed

4 files changed

+113
-16
lines changed

CHANGELOG.md

+109-3
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,117 @@
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+
## 1.0.0
77

8-
### Minimal Go version to build OPA: 1.22
8+
> **_NOTES:_**
9+
>
10+
> * The minimum version of Go required to build the OPA module is **1.22**
11+
12+
We are excited to announce **OPA 1.0**, a milestone release consolidating an improved developer experience for the future of Policy as Code.
13+
The release makes new functionality designed to simplify policy writing and improve the language's consistency the default.
14+
15+
### Changes to Rego in OPA 1.0
16+
17+
Below we highlight some key changes to the defaults in OPA 1.0:
18+
19+
- Using `if` for all rule definitions and `contains` for multi-value rules is now mandatory, not just when using the `rego.v1` import.
20+
- Other new keywords (`every`, `in`) are available without any imports.
21+
- Previously requirements that were only run in "strict mode" (like `opa check --strict`) are now the default. Duplicate imports and imports which shadow each other are no longer allowed.
22+
- OPA 1.0 comes with a range of backwards compatibility features to aid your migrations, please see the [v0 compatibility guide](https://www.openpolicyagent.org/docs/latest/v0-compatibility/)
23+
if you must continue to support v0 Rego.
24+
25+
Read more about the OPA 1.0 announcement on the [OPA blog](https://blog.openpolicyagent.org/).
26+
27+
Following are other changes that are included in OPA 1.0.
28+
29+
### Improvements to memory allocations
30+
31+
PRs [#7172](https://github.com/open-policy-agent/opa/pull/7172), [#7190](https://github.com/open-policy-agent/opa/pull/7190),
32+
[#7193](https://github.com/open-policy-agent/opa/pull/7193), [#7165](https://github.com/open-policy-agent/opa/pull/7165),
33+
[#7168](https://github.com/open-policy-agent/opa/pull/7168), [#7191](https://github.com/open-policy-agent/opa/pull/7191) &
34+
[#7222](https://github.com/open-policy-agent/opa/pull/7222) together improve the memory performance of OPA. Key strategies
35+
include reusing pointers and optimizing array and object operations, minimizing intermediate object creation, and using `sync.Pool`
36+
to manage memory-heavy operations. These changes cumulatively greatly reduced the number of allocations and improved
37+
evaluation speed by 10-20%. Additional benchmarks highlighted significant memory and speed improvements in custom
38+
function evaluation.
39+
40+
Authored by @anderseknert.
41+
42+
### Wrap http.RoundTripper for SDK users
43+
44+
PR [#7180](https://github.com/open-policy-agent/opa/pull/7180) adds an `EvalHTTPRoundTrip` EvalOption and query-level `WithHTTPRoundTrip` option.
45+
Both use a new function type which converts an `http.Transport` configured by topdown to an `http.RoundTripper`.
46+
This supports use cases requiring the customization of the `http.send` built in behavior.
47+
48+
Authored by @evankanderson.
49+
50+
### Improvements to scientific notation parsing in `units.parse`
51+
52+
PR [#7147](https://github.com/open-policy-agent/opa/pull/7147) extends the behaviour of `extractNumAndUnit` to support
53+
scientific notation values. This means values such as `1e3KB` can now be handled by this function.
54+
55+
Authored by @berdanA.
56+
57+
### Support customized buckets `bundle_loading_duration_ns` metric
58+
59+
PR [#7156](https://github.com/open-policy-agent/opa/pull/7156) extends OPA’s Prometheus configuration to allow the
60+
setting of user defined buckets for metrics. This aids when debugging the loading of slow bundles.
61+
62+
Authored by @jwu730-1.
63+
64+
### Test suite performance improvements
65+
66+
PR [#7126](https://github.com/open-policy-agent/opa/pull/7126) updates tests to improve performance. Topdown and `storage/disk/`
67+
tests now run around 50% and 75% faster respectively.
68+
69+
Authored by @philipaconrad.
70+
71+
### OPA 1.0 Preparation
72+
73+
- Update v1 capabilities by @johanfylling in [#7216](https://github.com/open-policy-agent/opa/pull/7216)
74+
- v1 API by @johanfylling in [#7215](https://github.com/open-policy-agent/opa/pull/7215)
75+
- Updating formatter to not drop `rego.v1` and `future.keywords` imports for v1 by @johanfylling in [#7224](https://github.com/open-policy-agent/opa/pull/7224)
76+
- Update docs and server binding address per OPA 1.0 specs by @ashutosh-narkar & @charlieegan3 in [#7140](https://github.com/open-policy-agent/opa/pull/7140)
77+
- Renaming `--rego-v1` cmd flag to `--v0-v1` by @johanfylling in [#7225](https://github.com/open-policy-agent/opa/pull/7225)
78+
79+
80+
### Topdown and Rego
81+
82+
- Provide a more useful error message when there are conflicting default rules by @tjons in [#7164](https://github.com/open-policy-agent/opa/pull/7164)
83+
- Fix test flakes in `topdown/cache` by @evankanderson in [#7188](https://github.com/open-policy-agent/opa/pull/7188)
84+
- Add description to all built-in function args and return values by @anderseknert in [#7153](https://github.com/open-policy-agent/opa/pull/7153)
85+
- Built-in function `to_number` now rejects "Inf", "Infinity" and "NaN" values by @sikehish in [#7203](https://github.com/open-policy-agent/opa/pull/7203)
86+
- Update eval_cancel_error logic to separate context canceled, timeout errors by @mchitten in [#7202](https://github.com/open-policy-agent/opa/pull/7202)
87+
88+
### Runtime, Tooling, SDK
89+
90+
- Respect runtime rego-version in RESTful policy API by @johanfylling in [#7183](https://github.com/open-policy-agent/opa/pull/7183)
91+
- Debugger: allow YAML to be used as input by @anderseknert in [#7178](https://github.com/open-policy-agent/opa/pull/7178)
92+
- `opa build`: provide an option to preserve print statements for the "wasm" target (#7194) by @me-viper in [#7195](https://github.com/open-policy-agent/opa/pull/7195)
93+
- Fix improper formatter behavior when comprehension contains comment by @tjons in [#7169](https://github.com/open-policy-agent/opa/pull/7169)
94+
- runtime: send version report less often when OPA long-running by @srenatus in [#7211](https://github.com/open-policy-agent/opa/pull/7211)
95+
- `opa eval`: Return error if illegal arguments passed with `--unknowns` flag by @kd-labs in [#7149](https://github.com/open-policy-agent/opa/pull/7149)
96+
- Enable direct error handling for bundle plugin trigger method by @torwunder in [#7143](https://github.com/open-policy-agent/opa/pull/7143)
97+
98+
### Docs, Website, Ecosystem
999

10-
OPA now requires at least Go 1.22 to build.
100+
- Add VodafoneZiggo as adopters by @Parsifal-M in [#7154](https://github.com/open-policy-agent/opa/pull/7154)
101+
- Add opa-java-wasm to docs by @andreaTP in [#7199](https://github.com/open-policy-agent/opa/pull/7199)
102+
103+
### Dependency Updates
104+
105+
- (build) golangci-lint: v1.59.1 -> v1.60.1 by @srenatus in [#7175](https://github.com/open-policy-agent/opa/pull/7175)
106+
- github.com/containerd/containerd: v1.7.23 -> v1.7.24
107+
- github.com/fsnotify/fsnotify: v1.7.0 -> v1.8.0
108+
- golang.org/x/net: v0.30.0 -> v0.33.0
109+
- golang.org/x/time: v0.7.0 -> v0.8.0
110+
- google.golang.org/grpc: v1.67.1 -> v1.69.2
111+
- go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp: v0.53.0 -> v0.58.0
112+
- go.opentelemetry.io/otel: v1.28.0 -> v1.33.0
113+
- go.opentelemetry.io/otel/exporters/otlp/otlptrace: v1.28.0 -> v1.33.0
114+
- go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc: v1.28.0 -> v1.33.0
115+
- go.opentelemetry.io/otel/sdk: v1.28.0 -> v1.33.0
116+
- go.opentelemetry.io/otel/trace: v1.28.0 -> v1.33.0
11117

12118

13119
## 0.70.0

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -499,14 +499,14 @@ endif
499499
-e GITHUB_TOKEN=$(GITHUB_TOKEN) \
500500
-e LAST_VERSION=$(LAST_VERSION) \
501501
-v $(PWD):/_src:Z \
502-
ashtalk/python-go-perl:v1 \
502+
ashtalk/python-go-perl:v2 \
503503
/_src/build/gen-release-patch.sh --version=$(VERSION) --source-url=/_src
504504

505505
.PHONY: dev-patch
506506
dev-patch:
507507
@$(DOCKER) run $(DOCKER_FLAGS) \
508508
-v $(PWD):/_src:Z \
509-
ashtalk/python-go-perl:v1 \
509+
ashtalk/python-go-perl:v2 \
510510
/_src/build/gen-dev-patch.sh --version=$(VERSION) --source-url=/_src
511511

512512
# Deprecated targets. To be removed.

capabilities/v1.0.0.json

+1-10
Original file line numberDiff line numberDiff line change
@@ -4819,12 +4819,6 @@
48194819
}
48204820
}
48214821
],
4822-
"future_keywords": [
4823-
"contains",
4824-
"every",
4825-
"if",
4826-
"in"
4827-
],
48284822
"wasm_abi_versions": [
48294823
{
48304824
"version": 1,
@@ -4836,9 +4830,6 @@
48364830
}
48374831
],
48384832
"features": [
4839-
"rule_head_ref_string_prefixes",
4840-
"rule_head_refs",
4841-
"rego_v1",
4842-
"rego_v1_import"
4833+
"rego_v1"
48434834
]
48444835
}

v1/version/version.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
)
1212

1313
// Version is the canonical version of OPA.
14-
var Version = "0.71.0-dev"
14+
var Version = "1.0.0"
1515

1616
// GoVersion is the version of Go this was built with
1717
var GoVersion = runtime.Version()

0 commit comments

Comments
 (0)