Skip to content

Commit f65c6b9

Browse files
authored
release: v2.9.0 (#8653)
2 parents bc2c2e5 + f02add2 commit f65c6b9

File tree

194 files changed

+14033
-3514
lines changed

Some content is hidden

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

194 files changed

+14033
-3514
lines changed

.circleci/config.yml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,53 +11,53 @@ orbs:
1111
executors:
1212
amd_linux_build: &amd_linux_build_executor
1313
docker:
14-
- image: ghcr.io/apollographql/ci-utility-docker-images/apollo-rust-builder:0.19.0
14+
- image: ghcr.io/apollographql/ci-utility-docker-images/apollo-rust-builder:0.21.1
1515
resource_class: xlarge
1616
environment:
1717
CARGO_BUILD_JOBS: 4
1818
RUST_TEST_THREADS: 6
1919
MISE_ENV: ci
2020
amd_linux_helm: &amd_linux_helm_executor
2121
docker:
22-
- image: ghcr.io/apollographql/ci-utility-docker-images/apollo-rust-builder:0.19.0
22+
- image: ghcr.io/apollographql/ci-utility-docker-images/apollo-rust-builder:0.21.1
2323
resource_class: small
2424
environment:
2525
MISE_ENV: ci
2626
amd_linux_test: &amd_linux_test_executor
2727
docker:
28-
- image: ghcr.io/apollographql/ci-utility-docker-images/apollo-rust-builder:0.19.0
29-
- image: cimg/redis:7.4.6
28+
- image: ghcr.io/apollographql/ci-utility-docker-images/apollo-rust-builder:0.21.1
29+
- image: cimg/redis:7.4.7
3030
- image: openzipkin/zipkin:3.5.1
31-
- image: ghcr.io/datadog/dd-apm-test-agent/ddapm-test-agent:v1.36.0
31+
- image: ghcr.io/datadog/dd-apm-test-agent/ddapm-test-agent:v1.38.0
3232
# redis cluster - 3 primaries, 3 replicas
33-
- image: cimg/redis:7.4.6
33+
- image: cimg/redis:7.4.7
3434
command: [ "redis-server", "--protected-mode", "no", "--port", "7000", "--cluster-enabled", "yes" ]
35-
- image: cimg/redis:7.4.6
35+
- image: cimg/redis:7.4.7
3636
command: [ "redis-server", "--protected-mode", "no", "--port", "7001", "--cluster-enabled", "yes" ]
37-
- image: cimg/redis:7.4.6
37+
- image: cimg/redis:7.4.7
3838
command: [ "redis-server", "--protected-mode", "no", "--port", "7002", "--cluster-enabled", "yes" ]
39-
- image: cimg/redis:7.4.6
39+
- image: cimg/redis:7.4.7
4040
command: [ "redis-server", "--protected-mode", "no", "--port", "7003", "--cluster-enabled", "yes" ]
41-
- image: cimg/redis:7.4.6
41+
- image: cimg/redis:7.4.7
4242
command: [ "redis-server", "--protected-mode", "no", "--port", "7004", "--cluster-enabled", "yes" ]
43-
- image: cimg/redis:7.4.6
43+
- image: cimg/redis:7.4.7
4444
command: [ "redis-server", "--protected-mode", "no", "--port", "7005", "--cluster-enabled", "yes" ]
45-
- image: cimg/redis:7.4.6
45+
- image: cimg/redis:7.4.7
4646
command: [ "sh", "-c", "sleep 30; echo yes | redis-cli --cluster create --cluster-replicas 1 localhost:7000 localhost:7001 localhost:7002 localhost:7003 localhost:7004 localhost:7005" ]
4747
resource_class: 2xlarge
4848
environment:
4949
MISE_ENV: ci
5050
CARGO_BUILD_JOBS: 4
5151
arm_linux_build: &arm_linux_build_executor
5252
docker:
53-
- image: ghcr.io/apollographql/ci-utility-docker-images/apollo-rust-builder:0.19.0
53+
- image: ghcr.io/apollographql/ci-utility-docker-images/apollo-rust-builder:0.21.1
5454
resource_class: arm.xlarge
5555
environment:
5656
MISE_ENV: ci
5757
CARGO_BUILD_JOBS: 8
5858
arm_linux_test: &arm_linux_test_executor
5959
docker:
60-
- image: ghcr.io/apollographql/ci-utility-docker-images/apollo-rust-builder:0.19.0
60+
- image: ghcr.io/apollographql/ci-utility-docker-images/apollo-rust-builder:0.21.1
6161
resource_class: arm.xlarge
6262
environment:
6363
MISE_ENV: ci
@@ -68,7 +68,7 @@ executors:
6868
# at https://circleci.com/docs/using-macos#supported-xcode-versions.
6969
# We use the major.minor notation to bring in compatible patches.
7070
xcode: "15.4.0"
71-
resource_class: m2pro.large
71+
resource_class: m4pro.large
7272
environment:
7373
MISE_ENV: ci,ci-mac
7474
macos_test: &macos_test_executor
@@ -77,7 +77,7 @@ executors:
7777
# at https://circleci.com/docs/using-macos#supported-xcode-versions.
7878
# We use the major.minor notation to bring in compatible patches.
7979
xcode: "15.4.0"
80-
resource_class: m2pro.large
80+
resource_class: m4pro.large
8181
environment:
8282
MISE_ENV: ci,ci-mac
8383
windows_build: &windows_build_executor
@@ -846,7 +846,7 @@ jobs:
846846
847847
publish_github_release:
848848
docker:
849-
- image: ghcr.io/apollographql/ci-utility-docker-images/apollo-rust-builder:0.19.0
849+
- image: ghcr.io/apollographql/ci-utility-docker-images/apollo-rust-builder:0.21.1
850850
resource_class: small
851851
environment:
852852
<<: *common_job_environment

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tools]
22
# renovate-automation: rustc version
3-
rust = { version = "1.90.0", targets = "x86_64-apple-darwin,aarch64-apple-darwin", profile = "default", components = "llvm-tools" }
3+
rust = { version = "1.91.1", targets = "x86_64-apple-darwin,aarch64-apple-darwin", profile = "default", components = "llvm-tools" }
44
"cargo:cargo-llvm-cov" = "0.6.16"
55
"ubi:codecov/codecov-cli" = "10.4.0"

.config/mise/config.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[tools]
22
# renovate-automation: rustc version
3-
rust = "1.90.0"
4-
"aqua:cargo-bins/cargo-binstall" = "1.15.7"
3+
rust = "1.91.1"
4+
"aqua:cargo-bins/cargo-binstall" = "1.16.0"
55
"cargo:cargo-nextest" = "0.9.70"
66
"cargo:cargo-deny" = "0.18.2"
77
"cargo:cargo-edit" = "0.13.0"
@@ -11,9 +11,9 @@ rust = "1.90.0"
1111
"cargo:cargo-watch" = "8.5.3"
1212
"cargo:cargo-machete" = "0.9.0"
1313
"cargo:typos-cli" = "1.31.1"
14-
protoc = "33.0"
14+
protoc = "33.1"
1515
gh = "2.72.0"
16-
helm = "3.19.0"
16+
helm = "3.19.2"
1717
helm-docs = "1.14.2"
18-
yq = "4.48.1"
18+
yq = "4.48.2"
1919
jq = "1.8.1"

.github/workflows/update_apollo_protobuf.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
Update-Protobuf-Schema:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
12+
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
1313
- name: Make changes to pull request
1414
run: |
1515
curl -f https://usage-reporting.api.apollographql.com/proto/reports.proto > ./apollo-router/src/plugins/telemetry/proto/reports.proto

.github/workflows/update_uplink_schema.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
Update-Uplink-Schema:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
12+
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
1313
- name: Install Rover
1414
run: |
1515
curl -sSL https://rover.apollo.dev/nix/v0.14.1 | sh

.gitleaks.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
[[ rules ]]
2+
id = "generic-api-key"
3+
[ rules.allowlist ]
4+
paths = [
5+
'''Cargo.lock$'''
6+
,'''^\.changesets\/.+\.md$'''
7+
,'''^CHANGELOG\.md$'''
8+
]
19

210
[[ rules ]]
311
id = "generic-api-key"
@@ -41,6 +49,7 @@
4149

4250
paths = [
4351
'''^apollo-router\/src\/.+\/testdata\/.+''',
52+
'''^apollo-router\/tests\/integration\/fixtures\/.+''',
4453
]
4554

4655
[[ rules ]]

CHANGELOG.md

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

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

5+
# [2.9.0] - 2025-11-27
6+
7+
## 🚀 Features
8+
9+
### Add CORS Private Network Access support ([PR #8279](https://github.com/apollographql/router/pull/8279))
10+
11+
CORS configuration now supports [private network access](https://wicg.github.io/private-network-access/) (PNA). Enable PNA for a CORS policy by specifying the `private_network_access` field, which supports two optional subfields: `access_id` and `access_name`.
12+
13+
**Example configuration:**
14+
15+
```yaml
16+
cors:
17+
policies:
18+
- origins: ["https://studio.apollographql.com"]
19+
private_network_access:
20+
access_id:
21+
- match_origins: ["^https://(dev|staging|www)?\\.my-app\\.(com|fr|tn)$"]
22+
private_network_access:
23+
access_id: "01:23:45:67:89:0A"
24+
access_name: "mega-corp device"
25+
```
26+
27+
By [@TylerBloom](https://github.com/TylerBloom) in https://github.com/apollographql/router/pull/8279
28+
29+
### Configure maximum HTTP/2 header list size ([PR #8636](https://github.com/apollographql/router/pull/8636))
30+
31+
The router now supports configuring the maximum size for HTTP/2 header lists via the `limits.http2_max_headers_list_bytes` setting. This protects against excessive resource usage from clients sending large sets of HTTP/2 headers.
32+
33+
The default remains 16KiB. When a client sends a request with HTTP/2 headers whose total size exceeds the configured limit, the router rejects the request with a 431 error code.
34+
35+
**Example configuration:**
36+
37+
```yaml
38+
limits:
39+
http2_max_headers_list_bytes: "48KiB"
40+
```
41+
42+
By [@aaronArinder](https://github.com/aaronArinder) in https://github.com/apollographql/router/pull/8636
43+
44+
### Customize response cache key per subgraph via context ([PR #8543](https://github.com/apollographql/router/pull/8543))
45+
46+
The response cache key can now be customized per subgraph using the `apollo::response_cache::key` context entry. The new `subgraphs` field enables defining separate cache keys for individual subgraphs.
47+
48+
Subgraph-specific data takes precedence over data in the `all` field—the router doesn't merge them. To set common data when providing subgraph-specific data, add it to the subgraph-specific section.
49+
50+
**Example payload:**
51+
52+
```json
53+
{
54+
"all": 1,
55+
"subgraph_operation1": "key1",
56+
"subgraph_operation2": {
57+
"data": "key2"
58+
},
59+
"subgraphs": {
60+
"my_subgraph": {
61+
"locale": "be"
62+
}
63+
}
64+
}
65+
```
66+
67+
By [@bnjjj](https://github.com/bnjjj) in https://github.com/apollographql/router/pull/8543
68+
69+
### Add telemetry selector for Cache-Control metrics ([PR #8524](https://github.com/apollographql/router/pull/8524))
70+
71+
The new `response_cache_control` selector enables telemetry metrics based on the computed [`Cache-Control` header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Cache-Control) from subgraph responses.
72+
73+
**Example configuration:**
74+
75+
```yaml
76+
telemetry:
77+
exporters:
78+
metrics:
79+
common:
80+
service_name: apollo-router
81+
views:
82+
- name: subgraph.response.cache_control.max_age
83+
aggregation:
84+
histogram:
85+
buckets:
86+
- 10
87+
- 100
88+
- 1000
89+
- 10000
90+
- 100000
91+
instrumentation:
92+
instruments:
93+
subgraph:
94+
subgraph.response.cache_control.max_age:
95+
value:
96+
response_cache_control: max_age
97+
type: histogram
98+
unit: s
99+
description: A histogram of the computed TTL for a subgraph response
100+
```
101+
102+
By [@bnjjj](https://github.com/bnjjj) in https://github.com/apollographql/router/pull/8524
103+
104+
## 🐛 Fixes
105+
106+
### Remove `_redacted` suffix from event attributes in `apollo.router.state.change.total` metric ([Issue #8464](https://github.com/apollographql/router/issues/8464))
107+
108+
Event names in the `apollo.router.state.change.total` metric no longer include the `_redacted` suffix. The metric now uses the `Display` trait instead of `Debug` for event names, changing values like `updateconfiguration_redacted` to `updateconfiguration` in APM platforms.
109+
110+
The custom behavior for `UpdateLicense` events is retained—the license state name is still appended.
111+
112+
By [@rohan-b99](https://github.com/rohan-b99) in https://github.com/apollographql/router/pull/8464
113+
114+
### Preserve Content-Length header for responses with known size ([Issue #7941](https://github.com/apollographql/router/issues/7941))
115+
116+
The router now uses the `Content-Length` header for GraphQL responses with known content lengths instead of `transfer-encoding: chunked`. Previously, the `fleet_detector` plugin destroyed HTTP body size hints when collecting metrics.
117+
118+
This extends the fix from [#6538](https://github.com/apollographql/router/pull/6538), which preserved size hints for `router → subgraph` requests, to also cover `client → router` requests and responses. Size hints now flow correctly through the entire pipeline for optimal HTTP header selection.
119+
120+
By [@morriswchris](https://github.com/morriswchris) in https://github.com/apollographql/router/pull/7977
121+
122+
### Correct `apollo.router.operations.subscriptions.events` metric counting ([PR #8483](https://github.com/apollographql/router/pull/8483))
123+
124+
The `apollo.router.operations.subscriptions.events` metric now increments correctly for each subscription event (excluding ping/pong/close messages). The counter call has been moved into the stream to trigger on each event.
125+
126+
This change also removes custom pong response handling before connection acknowledgment, which previously caused duplicate pongs because the WebSocket implementation already handles pings by default.
127+
128+
By [@rohan-b99](https://github.com/rohan-b99) in https://github.com/apollographql/router/pull/8483
129+
130+
### Unify timeout codes in response caching metrics ([PR #8515](https://github.com/apollographql/router/pull/8515))
131+
132+
Tokio- and Redis-based timeouts now use the same `timeout` code in `apollo.router.operations.response_cache.*.error` metrics. Previously, they were inadvertently given different code values.
133+
134+
By [@carodewig](https://github.com/carodewig) in https://github.com/apollographql/router/pull/8515
135+
136+
## 📃 Configuration
137+
138+
### Remove unused TTL parameter from response cache Redis configuration ([PR #8513](https://github.com/apollographql/router/pull/8513))
139+
140+
The `ttl` parameter under `redis` configuration had no effect and is removed. Configure TTL at the `subgraph` level to control cache entry expiration:
141+
142+
```yaml
143+
preview_response_cache:
144+
enabled: true
145+
subgraph:
146+
all:
147+
enabled: true
148+
ttl: 10m # ✅ Configure TTL here
149+
redis:
150+
urls: [ "redis://..." ]
151+
# ❌ ttl was here previously (unused)
152+
```
153+
154+
By [@carodewig](https://github.com/carodewig) in https://github.com/apollographql/router/pull/8513
155+
156+
## 📚 Documentation
157+
158+
### Document active subgraph requests selector ([PR #8530](https://github.com/apollographql/router/pull/8530))
159+
160+
The telemetry selectors documentation now correctly reflects the `active_subgraph_requests` attribute.
161+
162+
By [@faisalwaseem](https://github.com/faisalwaseem) in https://github.com/apollographql/router/pull/8530
163+
164+
### Add Redis cache suggestions to response cache documentation ([PR #8624](https://github.com/apollographql/router/pull/8624))
165+
166+
The FAQ now includes information about supported Redis versions and Redis key eviction setup.
167+
168+
By [@carodewig](https://github.com/carodewig) in https://github.com/apollographql/router/pull/8624
169+
170+
171+
5172
# [2.8.2] - 2025-11-11
6173

7174
## 🐛 Fixes

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ Don't be a bad actor.
8282

8383
It’s important that every piece of code in Apollo packages is reviewed by at least one core contributor familiar with that codebase. Here are some things we look for:
8484

85-
1. **Required CI checks pass.** This is a prerequisite for the review, and it is the PR author's responsibility. As long as the tests don’t pass, the PR won't get reviewed. To learn more about our CI pipeline, read about it [below](#pipelines)
85+
1. **Required CI checks pass.** This is a prerequisite for the review, and it is the PR author's responsibility. As long as the tests don’t pass, the PR won't get reviewed. To learn more about our CI pipeline, read about it [above](#continuous-integration).
8686
2. **Simplicity.** Is this the simplest way to achieve the intended goal? If there are too many files, redundant functions, or complex lines of code, suggest a simpler way to do the same thing. In particular, avoid implementing an overly general solution when a simple, small, and pragmatic fix will do.
8787
3. **Testing.** Please make sure that the tests ensure that the code won’t break when other stuff change around it. The error messages in the test should help identify what is broken exactly and how. The tests should test every edge case if possible. Please make sure you get as much coverage as possible.
8888
4. **No unnecessary or unrelated changes.** PRs shouldn’t come with random formatting changes, especially in unrelated parts of the code. If there is some refactoring that needs to be done, it should be in a separate PR from a bug fix or feature, if possible.

0 commit comments

Comments
 (0)