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

Reconcile dev after merge to main for v1.32.0 #3967

Merged
merged 9 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.

15 changes: 0 additions & 15 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.

112 changes: 112 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,118 @@ 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, but with a warning that can be resolved by renaming the configuration section from `preview_persisted_queries` to `persisted_queries`:

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

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

## 🐛 Fixes

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

Previously, a regression prevented an error message string from being returned in the body of a coprocessor request. That regression has been fixed, and a coprocessor can once again [return with an error message](https://www.apollographql.com/docs/router/customizations/coprocessor#terminating-a-client-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 type handling for telemetry metric counter ([Issue #3865](https://github.com/apollographql/router/issues/3865))

Previously, the assignment of some telemetry metric counters may not have succeeded because the assignment type wasn't accounted for. For example, the following panicked in debug mode because `1` wasn't `1u64`:

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

This issue has been fixed by adding more supported types for metric counters.

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


## 🧪 Experimental

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

An experimental implementation of query batching has been added to support client request batching in the Apollo Router.

If you’re using Apollo Client, you can leverage its built-in 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 automatically combines 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 execute concurrently with respect to each other.

Don't use subscriptions or `@defer` queries within a batch, as they are unsupported.

For details, see the documentation for [query batching](https://www.apollographql.com/docs/router/executing-operations/query-batching).

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.31.0"
version = "1.32.0"
dependencies = [
"access-json",
"anyhow",
Expand Down Expand Up @@ -413,7 +413,7 @@ dependencies = [

[[package]]
name = "apollo-router-benchmarks"
version = "1.31.0"
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.31.0"
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.31.0"
version = "1.32.0"
authors = ["Apollo Graph, Inc. <packages@apollographql.com>"]
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.31.0"
version = "1.32.0"
authors = ["Apollo Graph, Inc. <packages@apollographql.com>"]
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.31.0"
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.31.0" }
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.31.0"
version = "1.32.0"
authors = ["Apollo Graph, Inc. <packages@apollographql.com>"]
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.31.0
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.31.0
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.31.0
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
Loading
Loading