Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prep release: v1.32.0 #3965

Merged
merged 2 commits into from
Oct 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 0 additions & 21 deletions .changesets/exp_garypen_126_query_batching.md

This file was deleted.

14 changes: 0 additions & 14 deletions .changesets/feat_glasser_persisted_queries_ga.md

This file was deleted.

12 changes: 0 additions & 12 deletions .changesets/fix_bryn_move_telemetry.md

This file was deleted.

16 changes: 0 additions & 16 deletions .changesets/fix_igni_coprocessor_error_body_fix.md

This file was deleted.

19 changes: 0 additions & 19 deletions .changesets/maint_bnjjj_fix_3865.md

This file was deleted.

20 changes: 0 additions & 20 deletions .changesets/maint_bryn_otel_update.md

This file was deleted.

108 changes: 108 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,114 @@ All notable changes to Router will be documented in this file.

This project adheres to [Semantic Versioning v2.0.0](https://semver.org/spec/v2.0.0.html).

# [1.32.0] - 2023-10-04

## 🚀 Features

### Move Persisted Queries to General Availability ([PR #3914](https://github.com/apollographql/router/pull/3914))

[Persisted Queries](https://www.apollographql.com/docs/graphos/operations/persisted-queries/) (a GraphOS Enterprise feature) is now moving to General Availability, from Preview where it has been since Apollo Router 1.25. In addition to Safelisting, persisted queries can now also be used to [pre-warm the query plan cache](https://github.com/apollographql/router/releases/tag/v1.31.0) to speed up schema updates.


The feature is now configured with a `persisted_queries` top-level key in the YAML configuration instead of with `preview_persisted_queries`. Existing configuration files will keep working as before, only with a warning. To fix that warning, rename the configuration section like so:

```diff
-preview_persisted_queries:
+persisted_queries:
enabled: true
```

By [@glasser](https://github.com/glasser) in https://github.com/apollographql/router/pull/3914

## 🐛 Fixes

### Coprocessors: Allow to return with an error message ([PR #3806](https://github.com/apollographql/router/pull/3806))

As mentionned in the [Coprocessors documentation](https://www.apollographql.com/docs/router/customizations/coprocessor#terminating-a-client-request) you can (again) return an error message string in the body of a coprocessor request:

```json
{
"version": 1,
"stage": "SubgraphRequest",
"control": {
"break": 401
},
"body": "my error message"
}
```

By [@o0Ignition0o](https://github.com/o0Ignition0o) in https://github.com/apollographql/router/pull/3806


## 🛠 Maintenance

### Update to OpenTelemetry 0.20.0 ([PR #3649](https://github.com/apollographql/router/pull/3649))

The router now uses OpenTelemetry 0.20.0. This includes a number of fixes and improvements from upstream.

In particular metrics have some significant changes:
* Prometheus metrics are now aligned with the [OpenTelemetry spec](https://opentelemetry.io/docs/specs/otel/compatibility/prometheus_and_openmetrics/), and will not report `service_name` on each individual metric. Resource attributes are now moved to a single `target_info` metric.

Users should check that their dashboards and alerts are properly configured when upgrading.

* The default service name for metrics is now `unknown_service` as per the [OpenTelemetry spec](https://opentelemetry.io/docs/concepts/sdk-configuration/general-sdk-configuration/#otel_service_name).

Users should ensure to configure service name via router.yaml, or via the `OTEL_SERVICE_NAME` environment variable.

* The order of priority for setting service name has been brought into line with the rest of the router configuration. The order of priority is now:
1. `OTEL_RESOURCE_ATTRIBUTES` environment variable
2. `OTEL_SERVICE_NAME` environment variable
3. `resource_attributes` in router.yaml
4. `service_name` in router.yaml

By [@BrynCooke](https://github.com/BrynCooke) in https://github.com/apollographql/router/pull/3649

### fix(telemetry): support more types for metric counters ([Issue #3865](https://github.com/apollographql/router/issues/3865))

Add more supported types for metric counters in `MetricsLayer`.

Now it's not mandatory and won't panic in debug mode if you don't specify `1u64` in this example:

```rust
tracing::info!(
monotonic_counter
.apollo
.router
.operations
.authentication
.jwt = 1,
authentication.jwt.failed = true
)
```

By [@bnjjj](https://github.com/bnjjj) in https://github.com/apollographql/router/pull/3868

## 🧪 Experimental

### query batching prototype ([Issue #126](https://github.com/apollographql/router/issues/126))

An experimental implementation of query batching which adds support for client request batching to the Apollo Router.

If you’re using Apollo Client, you can leverage the in-built support for batching to reduce the number of individual requests sent to the Apollo Router.

Once [configured](https://www.apollographql.com/docs/react/api/link/apollo-link-batch-http/), Apollo Client will automatically combine multiple operations into a single HTTP request. The number of operations within a batch is client configurable, including the maximum number of operations in a batch and the maximum duration to wait for operations to accumulate before sending the batch request.

The Apollo Router must be configured to receive batch requests, otherwise it rejects them. When processing a batch request, the router deserializes and processes each operation of a batch independently, and it responds to the client only after all operations of the batch have been completed.

```yaml
experimental_batching:
enabled: true
mode: batch_http_link
```

All operations within a batch will execute concurrently with respect to each other.

Do not attempt to use subscriptions or `@defer` queries within a batch as they are not supported.

By [@garypen](https://github.com/garypen) in https://github.com/apollographql/router/pull/3837



# [1.31.0] - 2023-09-27

## 🚀 Features
Expand Down
6 changes: 3 additions & 3 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ dependencies = [

[[package]]
name = "apollo-router"
version = "1.32.0-alpha.1"
version = "1.32.0"
dependencies = [
"access-json",
"anyhow",
Expand Down Expand Up @@ -413,7 +413,7 @@ dependencies = [

[[package]]
name = "apollo-router-benchmarks"
version = "1.32.0-alpha.1"
version = "1.32.0"
dependencies = [
"apollo-parser 0.6.2",
"apollo-router",
Expand All @@ -429,7 +429,7 @@ dependencies = [

[[package]]
name = "apollo-router-scaffold"
version = "1.32.0-alpha.1"
version = "1.32.0"
dependencies = [
"anyhow",
"cargo-scaffold",
Expand Down
2 changes: 1 addition & 1 deletion apollo-router-benchmarks/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "apollo-router-benchmarks"
version = "1.32.0-alpha.1"
version = "1.32.0"
authors = ["Apollo Graph, Inc. <[email protected]>"]
edition = "2021"
license = "Elastic-2.0"
Expand Down
2 changes: 1 addition & 1 deletion apollo-router-scaffold/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "apollo-router-scaffold"
version = "1.32.0-alpha.1"
version = "1.32.0"
authors = ["Apollo Graph, Inc. <[email protected]>"]
edition = "2021"
license = "Elastic-2.0"
Expand Down
2 changes: 1 addition & 1 deletion apollo-router-scaffold/templates/base/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ apollo-router = { path ="{{integration_test}}apollo-router" }
apollo-router = { git="https://github.com/apollographql/router.git", branch="{{branch}}" }
{{else}}
# Note if you update these dependencies then also update xtask/Cargo.toml
apollo-router = "1.32.0-alpha.1"
apollo-router = "1.32.0"
{{/if}}
{{/if}}
async-trait = "0.1.52"
Expand Down
2 changes: 1 addition & 1 deletion apollo-router-scaffold/templates/base/xtask/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ apollo-router-scaffold = { path ="{{integration_test}}apollo-router-scaffold" }
{{#if branch}}
apollo-router-scaffold = { git="https://github.com/apollographql/router.git", branch="{{branch}}" }
{{else}}
apollo-router-scaffold = { git = "https://github.com/apollographql/router.git", tag = "v1.32.0-alpha.1" }
apollo-router-scaffold = { git = "https://github.com/apollographql/router.git", tag = "v1.32.0" }
{{/if}}
{{/if}}
anyhow = "1.0.58"
Expand Down
2 changes: 1 addition & 1 deletion apollo-router/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "apollo-router"
version = "1.32.0-alpha.1"
version = "1.32.0"
authors = ["Apollo Graph, Inc. <[email protected]>"]
repository = "https://github.com/apollographql/router/"
documentation = "https://docs.rs/apollo-router"
Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/tracing/docker-compose.datadog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ services:

apollo-router:
container_name: apollo-router
image: ghcr.io/apollographql/router:v1.32.0-alpha.1
image: ghcr.io/apollographql/router:v1.32.0
volumes:
- ./supergraph.graphql:/etc/config/supergraph.graphql
- ./router/datadog.router.yaml:/etc/config/configuration.yaml
Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/tracing/docker-compose.jaeger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ services:
apollo-router:
container_name: apollo-router
#build: ./router
image: ghcr.io/apollographql/router:v1.32.0-alpha.1
image: ghcr.io/apollographql/router:v1.32.0
volumes:
- ./supergraph.graphql:/etc/config/supergraph.graphql
- ./router/jaeger.router.yaml:/etc/config/configuration.yaml
Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/tracing/docker-compose.zipkin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ services:
apollo-router:
container_name: apollo-router
build: ./router
image: ghcr.io/apollographql/router:v1.32.0-alpha.1
image: ghcr.io/apollographql/router:v1.32.0
volumes:
- ./supergraph.graphql:/etc/config/supergraph.graphql
- ./router/zipkin.router.yaml:/etc/config/configuration.yaml
Expand Down
2 changes: 1 addition & 1 deletion docs/source/containerization/docker.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The default behaviour of the router images is suitable for a quickstart or devel

Note: The [docker documentation](https://docs.docker.com/engine/reference/run/) for the run command may be helpful when reading through the examples.

Note: The exact image version to use is your choice depending on which release you wish to use. In the following examples, replace `<image version>` with your chosen version. e.g.: `v1.32.0-alpha.1`
Note: The exact image version to use is your choice depending on which release you wish to use. In the following examples, replace `<image version>` with your chosen version. e.g.: `v1.32.0`

## Override the configuration

Expand Down
Loading