Commit Graph

356 Commits

Author SHA1 Message Date
Ashutosh Narkar d5cbd16545 Integrate patch release v1.0.1
Signed-off-by: Ashutosh Narkar <anarkar4387@gmail.com>
2025-01-22 10:06:15 +01:00
Eng Zer Jun 304768b4e1 build(deps): upgrade github.com/dgraph-io/badger to v4
Despite the major version bump, there are no breaking changes that
affects our existing code.

From changelog of BadgerDB 4.0.0:

  "This is a major release because we are making a switch to SemVer in
order to make it easier for the community to understand when breaking
API and data format changes are made."

Reference: https://github.com/dgraph-io/badger/blob/ec1a9f3ae8c41edb50703493f1e4991c0641e6a8/CHANGELOG.md

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2025-01-17 12:25:27 -08:00
Ashutosh Narkar 68fd79be90 Prepare v1.1.0 development
Signed-off-by: Ashutosh Narkar <anarkar4387@gmail.com>
2024-12-20 13:45:36 -08:00
Ashutosh Narkar 00cc7ae275 Prepare v1.0.0 release
Signed-off-by: Ashutosh Narkar <anarkar4387@gmail.com>
Co-authored-by: Johan Fylling <johan.dev@fylling.se>
Co-authored-by: Stephan Renatus <stephan@styra.com>
2024-12-20 13:14:34 -08:00
Stephan Renatus 1de3f39814 deps: bump various opentelemetry modules
This release had a fix to avoid "superfluous call to WriteHeader" log lines:

https://github.com/open-telemetry/opentelemetry-go-contrib/releases/tag/v1.30.0

And there are further fixes in the releases we hadn't pulled in. Feels like
a good idea to update this once in a while.

Signed-off-by: Stephan Renatus <stephan@styra.com>
2024-11-14 20:36:50 +01:00
Ashutosh Narkar acc03cde0b Prepare v0.71.0 development
Signed-off-by: Ashutosh Narkar <anarkar4387@gmail.com>
2024-10-31 13:04:23 -07:00
Ashutosh Narkar 2ea031ea04 Prepare v0.70.0 release
Signed-off-by: Ashutosh Narkar <anarkar4387@gmail.com>
2024-10-31 12:39:52 -07:00
Johan Fylling dead0855ae Prepare v0.70.0 development (#7080)
Signed-off-by: Johan Fylling <johan.dev@fylling.se>
2024-09-30 16:07:10 +02:00
Ashutosh Narkar 4a3fd1a715 Prepare v0.69.0 release (#7076)
Signed-off-by: Ashutosh Narkar <anarkar4387@gmail.com>
2024-09-30 15:09:00 +02:00
Johan Fylling 0198dcd040 Prepare v0.69.0 development (#6977)
Signed-off-by: Johan Fylling <johan.dev@fylling.se>
2024-08-29 22:52:03 +02:00
Johan Fylling db53d77c48 Prepare v0.68.0 release (#6976)
Signed-off-by: Johan Fylling <johan.dev@fylling.se>
2024-08-29 17:23:19 +02:00
Brett McBride fd0821c1b3 distributedtracing: adding distributed tracing resource attributes
Adding a resource map to the distributed_tracing
config. Entries in this map will be passed through to the OpenTelemetry SDK where they will be
added as resource attributes. The available resource attributes are service.namespace,
service.version and service.instance.id. see
https://opentelemetry.io/docs/specs/semconv/resource/

Fixes: #6492

Signed-off-by: Brett McBride <brett@deakin.edu.au>
2024-08-26 14:39:08 -07:00
Stephan Renatus 64b01e1b04 CHANGELOG.md: add 'opa exec' format (#6928)
Signed-off-by: Stephan Renatus <stephan@styra.com>
2024-08-14 18:38:34 +02:00
Ashutosh Narkar 0f12a96d65 Integrate patch release v0.67.1 (#6914)
Signed-off-by: Ashutosh Narkar <anarkar4387@gmail.com>
2024-08-05 13:17:06 -04:00
Philip Conrad ee9ab0bf75 util+server: Fix bug around chunked request handling. (#6906)
This commit fixes a request handling bug introduced in #6868, which
caused OPA to treat all incoming chunked requests as if they had
zero-length request bodies.

The fix detects cases where the request body size is unknown in the
DecodingLimits handler, and propagates a request context key down to
the `util.ReadMaybeCompressedBody` function, allowing it to correctly
select between using the original `io.ReadAll` style for chunked
requests, or the newer preallocated buffers approach (for requests of
known size).

This change has a small, but barely visible performance impact for large
requests (<5% increase in GC pauses for a 1GB request JSON blob), and
minimal, if any, effect on RPS under load.

Fixes: #6904

Signed-off-by: Philip Conrad <philip@chariot-chaser.net>
2024-08-01 15:22:51 -04:00
Ashutosh Narkar 07f18cc059 Prepare v0.68.0 development
Signed-off-by: Ashutosh Narkar <anarkar4387@gmail.com>
2024-07-25 16:25:50 -07:00
Ashutosh Narkar b62ae6bfed Prepare v0.67.0 release
Signed-off-by: Ashutosh Narkar <anarkar4387@gmail.com>
2024-07-25 14:34:02 -07:00
Philip Conrad c5706eef7c server+util: Limit max request sizes, prealloc request buffers (#6868)
This commit introduces a few major changes:
 - (Breaking change) Limits now exist for maximum request body sizes.
 - Buffers are preallocated for reading request bodies.
 - Buffers are preallocated for decompressing request bodies.
 - Gzip decoder instances are reused in a `sync.Pool` across requests.

The effect on garbage collection is dramatically fewer GC pauses, giving
a roughly 9% RPS improvement in load tests with gzipped request bodies.
For larger request sizes, the number of GC pauses is dramatically
reduced, although the peak pause time may increase by a few percent.

Implementation notes:
 - The DecodingLimits handler enforces the max request body size both
   through a Content-Length check, and a MaxBytesReader wrapper around
   the payload.
 - The DecodingLimits handler passes the gzip payload size limit down
   using a context key.

Signed-off-by: Philip Conrad <philipaconrad@gmail.com>
2024-07-22 13:15:08 -04:00
Johan Fylling b5172db03b Prepare v0.67.0 development (#6835)
Signed-off-by: Johan Fylling <johan.dev@fylling.se>
2024-06-27 16:32:00 +02:00
Johan Fylling 91348a8ccc Prepare v0.66.0 release (#6834)
Signed-off-by: Johan Fylling <johan.dev@fylling.se>
2024-06-27 16:16:32 +02:00
Johan Fylling bb65de47ab Prepare v0.66.0 development (#6775)
Signed-off-by: Johan Fylling <johan.dev@fylling.se>
2024-05-30 18:21:19 +02:00
Johan Fylling f05497530d Updating changelog for v0.65.0 (#6774)
Signed-off-by: Johan Fylling <johan.dev@fylling.se>
2024-05-30 16:54:05 +02:00
Johan Fylling 5a49efdbb1 Release v0.65.0 (#6772)
Signed-off-by: Johan Fylling <johan.dev@fylling.se>
2024-05-30 16:01:57 +02:00
Ashutosh Narkar 16465dd3b9 Integrate patch release v0.64.1
Signed-off-by: Ashutosh Narkar <anarkar4387@gmail.com>
2024-04-26 12:13:32 -07:00
Ashutosh Narkar 29715927df Prepare v0.65.0 development
Signed-off-by: Ashutosh Narkar <anarkar4387@gmail.com>
2024-04-25 16:19:56 -07:00
Ashutosh Narkar 75cc90abee Prepare v0.64.0 release
Signed-off-by: Ashutosh Narkar <anarkar4387@gmail.com>
2024-04-25 10:05:57 -07:00
Ashutosh Narkar 44fa8ad64b Relax configuration check when Discovery is enabled
Previously if Discovery was enabled, other features like bundle downloading and status reporting could not be configured manually.
The reason for this was to prevent OPAs being deployed that could not be controlled through discovery. It's possible that
the system serving the discovered config is unaware of all options locally available in OPA. Hence, we relax the configuration
check when discovery is enabled so that the bootstrap configuration can contain plugin configurations. In case of conflicts,
the bootstrap configuration for plugins wins. These local configuration overrides from the bootstrap configuration are included
in the Status API messages so that management systems can get visibility into the local overrides.

**In general, the bootstrap configuration overrides the discovered configuration.** Previously this was not the case for all
configuration fields. For example, if the discovered configuration changes the `labels` section, only labels that are
additional compared to the bootstrap configuration are used, all other changes are ignored. This implies labels in the
bootstrap configuration override those in the discovered configuration. But for fields such as `default_decision`, `default_authorization_decision`,
`nd_builtin_cache`, the discovered configuration would override the bootstrap configuration. Now the behavior is more consistent
for the entire configuration and helps to avoid accidental configuration errors.

Fixes: #5722

Signed-off-by: Ashutosh Narkar <anarkar4387@gmail.com>
2024-04-23 15:32:37 -07:00
Stephan Renatus c5ab20cc94 go.{mod,sum}: update (#6678)
This reflects the reality -- we hadn't been sure why the dependabot update had
not increased the stanza when it should have; but doing so now should unbreak
the nightly tests.

Signed-off-by: Stephan Renatus <stephan@styra.com>
2024-04-05 12:07:15 +02:00
Johan Fylling 1074b6b6de Prepare v0.64.0 development
Signed-off-by: Johan Fylling <johan.dev@fylling.se>
2024-03-28 09:46:01 -07:00
Johan Fylling bb30b15369 Prepare v0.63.0 release (#6656)
Signed-off-by: Johan Fylling <johan.dev@fylling.se>
2024-03-28 16:50:15 +01:00
occupyhabit d6c8c1b51b chore: remove repetitive words
Signed-off-by: occupyhabit <wangmengjiao@outlook.com>
2024-03-25 11:28:12 -07:00
Philip Conrad 6b7ede0ee0 cmd/exec: Add timeout flag to help prevent infinite hangs. (#6633)
This commit adds a `--timeout` duration flag to the `opa exec` CLI command.
This flag helps out in use cases such as CI, where stalling indefinitely
is undesirable behavior.

Fixes: #6613

Signed-off-by: Philip Conrad <philipaconrad@gmail.com>
2024-03-18 12:22:41 -04:00
Stephan Renatus 11c00dec29 Prep development (#6619)
Signed-off-by: Stephan Renatus <stephan@styra.com>
2024-03-06 13:37:51 +01:00
Stephan Renatus a4d77da064 Release v0.62.1 (#6618)
Signed-off-by: Stephan Renatus <stephan@styra.com>
2024-03-06 11:26:57 +01:00
Ashutosh Narkar 6a2402e0d9 Prepare v0.63.0 development
Signed-off-by: Ashutosh Narkar <anarkar4387@gmail.com>
2024-02-29 09:21:11 -08:00
Ashutosh Narkar 1d0ab93822 Prepare v0.62.0 release
Signed-off-by: Ashutosh Narkar <anarkar4387@gmail.com>
2024-02-29 09:07:11 -08:00
Johan Fylling 4118f0d3b1 Prepare v0.62.0 development
Signed-off-by: Johan Fylling <johan.dev@fylling.se>
2024-01-25 08:51:47 -08:00
Johan Fylling ea7a3e13c8 Prepare v0.61.0 release (#6547)
Signed-off-by: Johan Fylling <johan.dev@fylling.se>
2024-01-25 14:06:02 +01:00
Ashutosh Narkar 85496dfcba Prepare v0.61.0 development (#6502)
Signed-off-by: Ashutosh Narkar <anarkar4387@gmail.com>
2023-12-21 10:49:13 +01:00
Ashutosh Narkar a1a2ae3cbb Prepare v0.60.0 release
Signed-off-by: Ashutosh Narkar <anarkar4387@gmail.com>
2023-12-20 14:07:16 -08:00
Johan Fylling 199c90de7b Prepare v0.60.0 development (#6448)
Signed-off-by: Johan Fylling <johan.dev@fylling.se>
2023-11-30 16:51:49 +01:00
Johan Fylling c8e7863c83 Prepare v0.59.0 release (#6447)
Signed-off-by: Johan Fylling <johan.dev@fylling.se>
2023-11-30 16:17:55 +01:00
Ashutosh Narkar c39e778b58 Prepare v0.59.0 development
Signed-off-by: Ashutosh Narkar <anarkar4387@gmail.com>
2023-10-27 08:39:59 -07:00
Ashutosh Narkar 69a381cc8a Prepare v0.58.0 release
Signed-off-by: Ashutosh Narkar <anarkar4387@gmail.com>
2023-10-26 15:07:36 -07:00
Johan Fylling 94a0b946eb Integrate v0.57.1 patch release (#6327)
Signed-off-by: Johan Fylling <johan.dev@fylling.se>
2023-10-18 15:51:09 +02:00
Johan Fylling d9a5cf7b07 Prepare v0.58.0 development
Signed-off-by: Johan Fylling <johan.dev@fylling.se>
2023-09-28 08:43:42 -07:00
Johan Fylling c2f42aa94a Prepare v0.57.0 release (#6256)
Signed-off-by: Johan Fylling <johan.dev@fylling.se>
2023-09-28 14:31:12 +02:00
Johan Fylling 4d7a844ffe Prepare v0.57.0 development
Signed-off-by: Johan Fylling <johan.dev@fylling.se>
2023-08-31 09:35:50 -07:00
Johan Fylling 016cb07ac9 Prepare v0.56.0 release (#6202)
Signed-off-by: Johan Fylling <johan.dev@fylling.se>
2023-08-31 16:16:16 +02:00
Florian Daguin ca7da22d00 cmd: make opa test -z fail with failing tests
Fixes the failed logic introduced in [1] to compute the exit code of a
test run. When used with the option `--exit-zero-on-skipped`, the
`opa test` command now returns the exit code 0 only if no failed tests
were found.

[1]: https://github.com/open-policy-agent/opa/commit/54f203c3843b23474afd9990787a1affdcaa40c5

Fixes: #6126
BREAKING-CHANGE
Signed-off-by: Florian Daguin <git@fdaguin.dev>
2023-07-28 17:51:53 -07:00