Skip to content

Commit 721100f

Browse files
Aguilarjafdylan-apolloconwuegbabernixsmyrick
authored
v2.2.1 (#31)
* Remove duplicate reqwest (apollographql#7329) * Port first batch of supgraph validation tests (apollographql#7321) - Adds a portion of the subgraph validation tests being ported over from the federation repo. - Exposes error fields on SubgraphError and FederationError for use in the tests. - Creates a public getter method for SubgraphError's error field - Creates a public getter method returning an array of errors associated with a given FederationError - Ports over the build_for_errors() test utility. * chore(deps): update xtask/Cargo.lock h2 dependency (apollographql#7336) * [docs] Add new page for query planning best practices (apollographql#7263) Co-authored-by: Lucas Leadbetter <5595530+lleadbet@users.noreply.github.com> Co-authored-by: Edward Huang <edhuang@gmail.com> * fix: terminate unused Redis connections on schema update (apollographql#7319) Co-authored-by: Renée <renee.kooi@apollographql.com> * test(federation/composition): ported the rest of "@core/@link handling" tests (apollographql#7335) * Add code for add_shareable and has_applied_directive (apollographql#7327) * Basic changes to connect/ * docs: otlp metrics exporters (apollographql#7334) * Removes redundant clones * add const fn warning * Remove const_fn warning * Apply comments * Remove todo comment * Update apollo-federation/src/sources/connect/json_selection/parser.rs Co-authored-by: Dylan Anthony <dylan@apollographql.com> * Update apollo-federation/src/sources/connect/json_selection/parser.rs Co-authored-by: Dylan Anthony <dylan@apollographql.com> * Reformats code after suggestions * fix(deps): update rust crate thiserror to v2 (apollographql#7288) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Renée Kooi <renee.kooi@apollographql.com> * deps: update apollo-compiler (apollographql#7338) * Add _dd.measured to spans when agent sampling is enabled (apollographql#7344) Co-authored-by: bryn <bryn@apollographql.com> * Fix metric `apollo.router.operations.batching.size` (apollographql#7306) Signed-off-by: Benjamin <5719034+bnjjj@users.noreply.github.com> Co-authored-by: Jesse Rosenberger <git@jro.cc> * Clarify coprocessor config `context: true` behaviour (apollographql#7349) * Avoid unnecessary cloning in the deduplication plugin (apollographql#7347) * expanded supergraph now uses join spec v0.5 so that we don't skip the… (apollographql#7351) * make use of new build image when building the router (apollographql#7355) * Move content negotiation to a plugin (apollographql#7316) Co-authored-by: Iryna Shestak <shestak.irina@gmail.com> * Port batch of `subgraph_validation_tests` from federation repo (apollographql#7345) * DOC-391 clarify tracing exporters configs of OTLP * edit overview * Add subgraph validation for interface objects (apollographql#7317) Port `validateKeyOnInterfacesAreAlsoOnAllImplementations()` and `validateInterfaceObjectsAreOnEntities()` from the JS composition code, i.e. the per-subgraph validations for interface objects. Note that as part of this, `printHumanReadableList()` and `joinStrings()`, were also ported. * rewrite upgrade_subgraphs_if_necessary() to minimize cloning and fix tests. (apollographql#7346) * Update schema upgrader to use apollo-compiler 1.28 (apollographql#7356) * test(federation/composition): Port subgraph validation tests (part 2) (apollographql#7343) Co-authored-by: Taylor Ninesling <taylor.ninesling@apollographql.com> * Fix clippy when run with `--all-features` (apollographql#7352) * Move aggressive lints to connectors module * temporarily ignore failing tests in dev (apollographql#7375) * fix-less-performant-code * docs: fix typo in distributed caching (apollographql#7358) * docs: typo on PQ docs (apollographql#7373) * Fix router enforcement of connect spec version. (apollographql#7377) * Add a test in connectors batching for handling gaps (apollographql#7328) * Remove fed1 links and reexpand after fixing federation arguments (apollographql#7374) * DOC-448 clarify apollo_router_session_count_active removal * feat(federation/composition): ported `@external` directive validation (apollographql#7381) * Remove 0.2 version checks in composition for headers & connect-on-type (apollographql#7387) * feat(federation/composition): implemented `UNSUPPORTED_ON_INTERFACE` errors (apollographql#7382) * implement ->joinNotNull method (apollographql#7165) Co-authored-by: Ben Newman <ben@apollographql.com> * chore: remove dead code (apollographql#7391) * Auto-upgrade connect 0.1 subgraphs to 0.2 in composition (apollographql#7388) * telemetry: remove excessive bool from DisplayRouterResponse(refactoring) (apollographql#7331) * Simplify condition handling in coprocessor (apollographql#7320) * Implement demand control directive validations (apollographql#7376) * Remove aws-lc from dependencies (apollographql#7389) * Account for spec aliases/imports when auto-injecting `link` spec directives/types (apollographql#7365) When the `@link` directive definition is missing, we have some logic that automatically adds the `link` spec's type/directive definitions to the schema. We weren't accounting for the link spec's aliases/imports when doing this, while the JS codebase was, so we've ported that logic here. Note that this logic has several bugs, but we're going to port it as-is for now and address the bugs later. * chore(federation/composition): deleted a duplicate test module `link_handling_tests` (apollographql#7392) * fix: decrease log level for JWT authentication failure (apollographql#7396) * fix: make sure all input types end up in the expanded supergraph (apollographql#7383) * remove apollographql#7383 changeset (apollographql#7401) * Revert "Add _dd.measured to spans when agent sampling is enabled" (apollographql#7403) * fix: spans should only include path in `http.route` (apollographql#7390) * fix: propagate client name and version modifications through telemetry (apollographql#7369) * Manage all CI versions through mise and use binstall (backport apollographql#7393) (apollographql#7410) * prep release: v2.2.1-rc.0 * macos specific mise: we need x86_64-apple-darwin + aarch64-apple-darwin these both need to be installed on our releasing image * Remove no-longer-necessary installation of `gh` via Orb ✨ This is now accomplished with `gh` * prep release: v2.2.1-rc.1 * Include inadvertently removed fetch_dependencies This was inadverently removed in apollographql#7410 but should continue to exist. * prep release: v2.2.1 --------- Signed-off-by: Benjamin <5719034+bnjjj@users.noreply.github.com> Co-authored-by: Dylan Anthony <dylan@apollographql.com> Co-authored-by: Chidimma O <conwuegb@users.noreply.github.com> Co-authored-by: Jesse Rosenberger <git@jro.cc> Co-authored-by: Shane Myrick <mail@shanemyrick.com> Co-authored-by: Lucas Leadbetter <5595530+lleadbet@users.noreply.github.com> Co-authored-by: Edward Huang <edhuang@gmail.com> Co-authored-by: Caroline Rodewig <16093297+carodewig@users.noreply.github.com> Co-authored-by: Renée <renee.kooi@apollographql.com> Co-authored-by: Duckki Oe <duckki.oe@apollographql.com> Co-authored-by: Chris Lenfest <clenfest@apollographql.com> Co-authored-by: Julia Naomi <jnboeira@outlook.com> Co-authored-by: Edward Huang <edward.huang@apollographql.com> Co-authored-by: Julia Naomi <naomijub@users.noreply.github.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Bryn Cooke <BrynCooke@gmail.com> Co-authored-by: bryn <bryn@apollographql.com> Co-authored-by: Coenen Benjamin <benjamin.coenen@hotmail.com> Co-authored-by: Gary Pennington <gary@apollographql.com> Co-authored-by: Lenny Burdette <lenny@apollographql.com> Co-authored-by: Iryna Shestak <shestak.irina@gmail.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: Sachin D. Shinde <sachin@apollographql.com> Co-authored-by: Taylor Ninesling <taylor.ninesling@apollographql.com> Co-authored-by: Sam Friedman <sam.friedman@apollographql.com> Co-authored-by: Dale Seo <5466341+DaleSeo@users.noreply.github.com> Co-authored-by: Ben Newman <ben@apollographql.com> Co-authored-by: Dariusz Kuc <9501705+dariuszkuc@users.noreply.github.com> Co-authored-by: Ivan Goncharov <ivan.goncharov.ua@gmail.com>
1 parent 381dcb6 commit 721100f

File tree

303 files changed

+9156
-3664
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

303 files changed

+9156
-3664
lines changed

.circleci/config.yml

Lines changed: 52 additions & 200 deletions
Large diffs are not rendered by default.

.config/mise/config.ci-mac.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[tools]
2+
# renovate-automation: rustc version
3+
rust = { version = "1.85.1", targets = "x86_64-apple-darwin,aarch64-apple-darwin" }

.config/mise/config.ci.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[tools]
2+
"cargo:cargo-fuzz" = "0.12.0"
3+
kubeconform = "0.6.7"

.config/mise/config.toml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11
[tools]
22
# renovate-automation: rustc version
3-
rust = "1.85.0"
3+
rust = "1.85.1"
4+
"aqua:cargo-bins/cargo-binstall" = "1.12.3"
45
"cargo:cargo-nextest" = "0.9.70"
56
"cargo:cargo-deny" = "0.18.2"
67
"cargo:cargo-edit" = "0.12.2"
78
"cargo:cargo-about" = "0.6.6"
89
"cargo:cargo-insta" = "1.38.0"
910
"cargo:htmlq" = "0.4.0"
10-
"cargo:cargo-upgrades" = "2.1.1"
1111
"cargo:cargo-watch" = "8.5.3"
12-
"cargo:graphql_client_cli" = "0.14.0"
13-
"cargo:cargo-llvm-cov" = "0.6.10"
14-
"cargo:cargo-fuzz" = "0.12.0"
1512
"cargo:typos-cli" = "1.31.1"
13+
protoc = "21.8"
14+
gh = "2.72.0"
15+
helm = "3.17.3"
16+
helm-docs = "1.14.2"
17+
yq = "4.45.1"
18+
jq = "1.7.1"

.config/mise/config.windows.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[tools]
2+
cmake = "3.31.1"

.gitignore

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,9 @@ dockerfiles/federation2-demo
3737
dhat-heap.json
3838

3939
# env file
40-
.env
40+
.env
41+
42+
# generated fuzz/ files
43+
fuzz/crash-*
44+
fuzz/slow-unit-*
45+
fuzz/timeout-*

CHANGELOG.md

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,116 @@
22

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

5+
# [2.2.1] - 2025-05-13
6+
7+
## 🐛 Fixes
8+
9+
### Redis connection leak on schema changes ([PR #7319](https://github.com/apollographql/router/pull/7319))
10+
11+
The router performs a 'hot reload' whenever it detects a schema update. During this reload, it effectively instantiates a new internal router, warms it up (optional), redirects all traffic to this new router, and drops the old internal router.
12+
13+
This change fixes a bug in that "drop" process where the Redis connections are never told to terminate, even though the Redis client pool is dropped. This leads to an ever-increasing number of inactive Redis connections as each new schema comes in and goes out of service, which eats up memory.
14+
15+
The solution adds a new up-down counter metric, `apollo.router.cache.redis.connections`, to track the number of open Redis connections. This metric includes a `kind` label to discriminate between different Redis connection pools, which mirrors the `kind` label on other cache metrics (ie `apollo.router.cache.hit.time`).
16+
17+
By [@carodewig](https://github.com/carodewig) in https://github.com/apollographql/router/pull/7319
18+
19+
### Propagate client name and version modifications through telemetry ([PR #7369](https://github.com/apollographql/router/pull/7369))
20+
21+
The router accepts modifications to the client name and version (`apollo::telemetry::client_name` and `apollo::telemetry::client_version`), but those modifications are not currently propagated through the telemetry layers to update spans and traces.
22+
23+
This PR moves where the client name and version are bound to the span, so that the modifications from plugins **on the `router` service** are propagated.
24+
25+
By [@carodewig](https://github.com/carodewig) in https://github.com/apollographql/router/pull/7369
26+
27+
### Progressive overrides are not disabled when connectors are used ([PR #7351](https://github.com/apollographql/router/pull/7351))
28+
29+
Prior to this fix, introducing a connector disabled the progressive override plugin.
30+
31+
By [@lennyburdette](https://github.com/lennyburdette) in https://github.com/apollographql/router/pull/7351
32+
33+
### Avoid unnecessary cloning in the deduplication plugin ([PR #7347](https://github.com/apollographql/router/pull/7347))
34+
35+
The deduplication plugin always cloned responses, even if there were not multiple simultaneous requests that would benefit from the cloned response.
36+
37+
We now check to see if deduplication will provide a benefit before we clone the subgraph response.
38+
39+
There was also an undiagnosed race condition which meant that a notification could be missed. This would have resulted in additional work being performed as the missed notification would have led to another subgraph request.
40+
41+
By [@garypen](https://github.com/garypen) in https://github.com/apollographql/router/pull/7347
42+
43+
### Spans should only include path in `http.route` ([PR #7390](https://github.com/apollographql/router/pull/7390))
44+
45+
Per the [OpenTelemetry spec](https://opentelemetry.io/docs/specs/semconv/attributes-registry/http/#http-route), the `http.route` should only include "the matched route, that is, the path template used in the format used by the respective server framework."
46+
47+
The router currently sends the full URI in `http.route`, which can be high cardinality (ie `/graphql?operation=one_of_many_values`). After this change, the router will only include the path (`/graphql`).
48+
49+
By [@carodewig](https://github.com/carodewig) in https://github.com/apollographql/router/pull/7390
50+
51+
### Decrease log level for JWT authentication failure ([PR #7396](https://github.com/apollographql/router/pull/7396))
52+
53+
A recent change inadvertently increased the log level of JWT authentication failures from `info` to `error`. This reverts that change returning it to the previous behavior.
54+
55+
By [@carodewig](https://github.com/carodewig) in https://github.com/apollographql/router/pull/7396
56+
57+
### Avoid fractional decimals when generating `apollo.router.operations.batching.size` metrics for GraphQL request batch sizes ([PR #7306](https://github.com/apollographql/router/pull/7306))
58+
59+
Corrects the calculation of the `apollo.router.operations.batching.size` metric to reflect accurate batch sizes rather than occasionally returning fractional numbers.
60+
61+
By [@bnjjj](https://github.com/bnjjj) in https://github.com/apollographql/router/pull/7306
62+
63+
## 📃 Configuration
64+
65+
### Log warnings for deprecated coprocessor `context` configuration usage ([PR #7349](https://github.com/apollographql/router/pull/7349))
66+
67+
`context: true` is an alias for `context: deprecated` but should not be used. The router now logs a runtime warning on startup if you do use it.
68+
69+
Instead of:
70+
71+
```yaml
72+
coprocessor:
73+
supergraph:
74+
request:
75+
context: true #
76+
```
77+
78+
Explicitly use `deprecated` or `all`:
79+
80+
```yaml
81+
coprocessor:
82+
supergraph:
83+
request:
84+
context: deprecated # ✅
85+
```
86+
87+
See [the 2.x upgrade guide](https://www.apollographql.com/docs/graphos/routing/upgrade/from-router-v1#context-keys-for-coprocessors) for more detailed upgrade steps.
88+
89+
By [@goto-bus-stop](https://github.com/goto-bus-stop) in https://github.com/apollographql/router/pull/7349
90+
91+
## 🛠 Maintenance
92+
93+
### Linux: Compatibility with glibc 2.28 or newer ([PR #7355](https://github.com/apollographql/router/pull/7355))
94+
95+
The default build images provided in our CI environment have a relatively modern version of `glibc` (2.35). This means that on some distributions, notably those based around RedHat, it wasn't possible to use our binaries since the version of `glibc` was older than 2.35.
96+
97+
We now maintain a build image which is based on a distribution with `glibc` 2.28. This is old enough that recent releases of either of the main Linux distribution families (Debian and RedHat) can make use of our binary releases.
98+
99+
By [@garypen](https://github.com/garypen) in https://github.com/apollographql/router/pull/7355
100+
101+
### Reject `@skip`/`@include` on subscription root fields in validation ([PR #7338](https://github.com/apollographql/router/pull/7338))
102+
103+
This implements a [GraphQL spec RFC](https://github.com/graphql/graphql-spec/pull/860), rejecting subscriptions in validation that can be invalid during execution.
104+
105+
By [@goto-bus-stop](https://github.com/goto-bus-stop) in https://github.com/apollographql/router/pull/7338
106+
107+
## 📚 Documentation
108+
109+
### Query planning best practices ([PR #7263](https://github.com/apollographql/router/pull/7263))
110+
111+
Added a new page under Routing docs about [Query Planning Best Practices](https://www.apollographql.com/docs/graphos/routing/query-planning/query-planning-best-practices).
112+
113+
By [@smyrick](https://github.com/smyrick) in https://github.com/apollographql/router/pull/7263
114+
5115
# [2.2.0] - 2025-04-28
6116

7117
## 🚀 Features

0 commit comments

Comments
 (0)