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.43.1 #4889

Merged
merged 2 commits into from
Apr 1, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


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

This file was deleted.

41 changes: 0 additions & 41 deletions .changesets/feat_bryn_otel_trace_attributes_logging.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changesets/feat_geal_expose_operation_signature.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changesets/feat_geal_graphql_error_metric.md

This file was deleted.

17 changes: 0 additions & 17 deletions .changesets/fix_bnjjj_4798.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changesets/fix_garypen_fix_coprocessor_logs.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changesets/fix_geal_entity_cache_slots.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changesets/fix_geal_reparent_spans.md

This file was deleted.

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

This file was deleted.

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

This file was deleted.

6 changes: 0 additions & 6 deletions .changesets/fix_i1g_subscription_websocket_fix_ping.md

This file was deleted.

153 changes: 153 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,159 @@ 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.43.1] - 2024-03-29

## 🚀 Features

### Enable displaying trace and span id on logs ([PR #4823](https://github.com/apollographql/router/pull/4823))
nicholascioli marked this conversation as resolved.
Show resolved Hide resolved

To enable correlation between trace and logs `trace_id` and `span_id` can now be included on the log messages.
nicholascioli marked this conversation as resolved.
Show resolved Hide resolved

Json:
nicholascioli marked this conversation as resolved.
Show resolved Hide resolved
```
{"timestamp":"2024-03-19T15:37:41.516453239Z","level":"INFO","trace_id":"54ac7e5f0e8ab90ae67b822e95ffcbb8","span_id":"9b3f88c602de0ceb","message":"Supergraph GraphQL response".....
```

Text:
nicholascioli marked this conversation as resolved.
Show resolved Hide resolved
```
2024-03-19T15:14:46.040435Z INFO trace_id: bbafc3f048b6137375dd78c10df18f50 span_id: 40ede28c5df1b5cc router{
```

To configure this, use `display_span_id` and `display_trace_id` options in the logging exporter configuration.
nicholascioli marked this conversation as resolved.
Show resolved Hide resolved

Json (defaults to true):
nicholascioli marked this conversation as resolved.
Show resolved Hide resolved
```
telemetry:
exporters:
logging:
stdout:
format:
json:
display_span_id: true
display_trace_id: true
```

Text (defaults to false):
```
telemetry:
exporters:
logging:
stdout:
format:
text:
display_span_id: false
display_trace_id: false
```

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

### count errors in the apollo.router.graphql_error metrics ([Issue #4749](https://github.com/apollographql/router/issues/4749))

This introduces a new counter metric called `apollo.router.graphql_error` that counts GraphQL errors, split by their code
nicholascioli marked this conversation as resolved.
Show resolved Hide resolved

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

### expose the operation signature in the context ([Issue #4558](https://github.com/apollographql/router/issues/4558))

It is available at the key `apollo_operation_signature`.
nicholascioli marked this conversation as resolved.
Show resolved Hide resolved

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

### Experimental logging of broken pipe errors ([PR #4870](https://github.com/apollographql/router/pull/4870))

You can now emit a log message each time the client closes the connection early, which can help you debug issues with clients that close connections before the server can respond.
nicholascioli marked this conversation as resolved.
Show resolved Hide resolved

This feature is disabled by default but can be enabled by setting the `experimental_log_broken_pipe` option to `true`:

```yaml title="router.yaml"
supergraph:
experimental_log_on_broken_pipe: true
```

Users that have internet facing routers will likely not want to opt in to this log message as they have no control over the clients.
nicholascioli marked this conversation as resolved.
Show resolved Hide resolved

By [@Geal](https://github.com/Geal) in https://github.com/apollographql/router/pull/4770 and [@BrynCooke](https://github.com/BrynCooke) in https://github.com/apollographql/router/pull/4870

## 🐛 Fixes

### Entity cache: fix support for Redis cluster ([PR #4790](https://github.com/apollographql/router/pull/4790))

in a Redis cluster, entities can be stored in different nodes, and a query to one node should only refer to the keys it manages. This is challenging for the MGET operation which requests multiple entities in the same request from the same node. This splits the MGET query in multiple MGETs calls grouped by key hash, to make sure each one will get to the corresponding node, then merges responses in the correct order.
nicholascioli marked this conversation as resolved.
Show resolved Hide resolved

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

### Give spans their proper parent in the plugin stack ([Issue #4827](https://github.com/apollographql/router/issues/4827))

Due to the way plugin spans were created and applied, they would appear as siblings instead of being nested, which creates some issues when displaying traces and accounting for time spent in Datadog. Plugin spans are now correctly nested within each other.
nicholascioli marked this conversation as resolved.
Show resolved Hide resolved

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

### Fix(telemetry): keep consistency between tracing otlp endpoint ([Issue #4798](https://github.com/apollographql/router/issues/4798))

In our [documentation](https://www.apollographql.com/docs/router/configuration/telemetry/exporters/tracing/otlp/#endpoint) when configuration http endpoint for tracing otlp exporter we say that users should only include the base address of the otlp endpoint. It was only working for grpc protocol and not http due to [this bug](https://github.com/open-telemetry/opentelemetry-rust/issues/1618). This inconsistency is now fixed with a workaround in the router waiting for the fix in openetelemetry crate.
nicholascioli marked this conversation as resolved.
Show resolved Hide resolved

So for example you'll have to specify the right path for http:
nicholascioli marked this conversation as resolved.
Show resolved Hide resolved

```yaml
telemetry:
exporters:
tracing:
otlp:
enabled: true
endpoint: "http://localhost:4318"
protocol: http
```

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

### Execute the entire request pipeline if the client closed the connection ([Issue #4569](https://github.com/apollographql/router/issues/4569)), [Issue #4576](https://github.com/apollographql/router/issues/4576)), ([Issue #4589](https://github.com/apollographql/router/issues/4589)), ([Issue #4590](https://github.com/apollographql/router/issues/4590)), ([Issue #4611](https://github.com/apollographql/router/issues/4611))

The router is now making sure that the entire request handling pipeline is executed when the client closes the connection early, to let telemetry and any rhai scrit or coprocessor perform their tasks before canceling. Before that, when a client canceled a request, the entire execution was dropped and parts of the router, like telemetry, could not run properly. It now executes up to the first response event (in the case of subscription or `@defer` usage), adds a 499 status code to the response and skips the remaining subgraph requests.
nicholascioli marked this conversation as resolved.
Show resolved Hide resolved

This change will report more requests to Studio and the configured telemetry, which will appear like a sudden increase in errors, because those failing requests were not reported before. To keep the previous behavior of immediately dropping execution for canceled requests, it is possible with the following option:
nicholascioli marked this conversation as resolved.
Show resolved Hide resolved

```yaml
supergraph:
early_cancel: true
```

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

### `null` extensions incorrectly disallowed on request ([Issue #4856](https://github.com/apollographql/router/issues/4856))

The [graphql over http spec](https://graphql.github.io/graphql-over-http/draft/#sel-EALFPCCBCEtC37P) mandates `null` is allowed for request extensions.

We were previously rejecting such payloads, but now we will allow them. For example:
nicholascioli marked this conversation as resolved.
Show resolved Hide resolved

```json
{
"query": "{ topProducts { upc name reviews { id product { name } author { id name } } } }",
"variables": {
"date": "2022-01-01T00:00:00+00:00"
},
"extensions": null
}
```

Fixes #4856
nicholascioli marked this conversation as resolved.
Show resolved Hide resolved

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

### fix the log lines for external extensibility ([PR #4869](https://github.com/apollographql/router/pull/4869))
nicholascioli marked this conversation as resolved.
Show resolved Hide resolved

The `execution` and `supergraph` responses were mistakenly reporting as `router`. This is now fixed.
nicholascioli marked this conversation as resolved.
Show resolved Hide resolved

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

### Remove invalid payload on graphql-ws Ping message ([Issue #4852](https://github.com/apollographql/router/issues/4852))

According to [graphql-ws spec](https://github.com/enisdenjo/graphql-ws/blob/master/PROTOCOL.md#ping) `Ping` payload should be an object or null but router was sending a string.
To ensure better compatibility Ping's payload was removed.
nicholascioli marked this conversation as resolved.
Show resolved Hide resolved

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



# [1.43.0] - 2024-03-21

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

[[package]]
name = "apollo-router"
version = "1.43.1-rc.3"
version = "1.43.1"
dependencies = [
"access-json",
"anyhow",
Expand Down Expand Up @@ -410,7 +410,7 @@ dependencies = [

[[package]]
name = "apollo-router-benchmarks"
version = "1.43.1-rc.3"
version = "1.43.1"
dependencies = [
"apollo-parser",
"apollo-router",
Expand All @@ -426,7 +426,7 @@ dependencies = [

[[package]]
name = "apollo-router-scaffold"
version = "1.43.1-rc.3"
version = "1.43.1"
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.43.1-rc.3"
version = "1.43.1"
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.43.1-rc.3"
version = "1.43.1"
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.43.1-rc.3"
apollo-router = "1.43.1"
{{/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.43.1-rc.3" }
apollo-router-scaffold = { git = "https://github.com/apollographql/router.git", tag = "v1.43.1" }
{{/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.43.1-rc.3"
version = "1.43.1"
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.43.1-rc.3
image: ghcr.io/apollographql/router:v1.43.1
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.43.1-rc.3
image: ghcr.io/apollographql/router:v1.43.1
volumes:
- ./supergraph.graphql:/etc/config/supergraph.graphql
- ./router/jaeger.router.yaml:/etc/config/configuration.yaml
Expand Down