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

1.31.0 changesets #3910

Merged
merged 10 commits into from
Sep 27, 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
2 changes: 1 addition & 1 deletion .changesets/docs_garypen_fix_rhai_subgraph_docs.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
### Rhai documentation: remove incorrect statement about request.subgraph fields ([PR #3808](https://github.com/apollographql/router/pull/3808))

It is possible to modify `request.subgraph` fields from a `Rhai` script and so the documentation should reflect that.
It is possible to modify `request.subgraph` fields from a Rhai script, which is now correctly reflected in [Rhai documentation](https://www.apollographql.com/docs/router/customizations/rhai-api/#request-interface).

By [@garypen](https://github.com/garypen) in https://github.com/apollographql/router/pull/3808
8 changes: 4 additions & 4 deletions .changesets/feat_bnjjj_fix_3621.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
### feat(redis): add configuration to set the timeout ([Issue #3621](https://github.com/apollographql/router/issues/3621))
### Added configuration to set redis request timeout ([Issue #3621](https://github.com/apollographql/router/issues/3621))

It adds a configuration to set another timeout than the default one (2ms) for redis requests. It also change the default timeout to 2ms (previously set to 1ms)
We added configuration to override default timeout for Redis requests. Default timeout was also changed from 1ms to **2ms**.

Example for APQ:
Here is an example to change the timeout for [Distributed APQ](https://www.apollographql.com/docs/router/configuration/distributed-caching#distributed-apq-caching) (an Enterprise Feature):
```yaml
apq:
router:
cache:
redis:
urls: ["redis://..."]
urls: ["redis://..."]
timeout: 5ms
```

Expand Down
42 changes: 0 additions & 42 deletions .changesets/feat_bnjjj_fix_3767.md

This file was deleted.

11 changes: 0 additions & 11 deletions .changesets/feat_garypen_one_shot_async_check.md

This file was deleted.

4 changes: 2 additions & 2 deletions .changesets/feat_geal_h2c.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
### HTTP/2 Cleartext protocol (h2c) support for subgraph connections ([Issue #3535](https://github.com/apollographql/router/issues/3535))
### HTTP/2 Cleartext protocol (H2C) support for subgraph connections ([Issue #3535](https://github.com/apollographql/router/issues/3535))

The router can now connect to subgraphs over HTTP/2 Cleartext, which uses the HTTP/2 binary protocol directly over TCP without TLS. To activate it, set the `experimental_http2` option to `http2_only`.
The router can now connect to subgraphs over HTTP/2 Cleartext (H2C), which uses the HTTP/2 binary protocol directly over TCP **without TLS**, which is a mode of operation desired with some service mesh configurations (e.g., Istio, Envoy) where the value of added encryption is unnecessary. To activate it, set the `experimental_http2` option to `http2_only`.

By [@Geal](https://github.com/Geal) in https://github.com/apollographql/router/pull/3852
36 changes: 29 additions & 7 deletions .changesets/feat_geal_plan_cache_warmup_doc.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,35 @@
### Query plan cache warm-up improvements ([Issue #3704](https://github.com/apollographql/router/issues/3704))
### Query plan cache warm-up improvements ([Issue #3704](https://github.com/apollographql/router/issues/3704), [Issue #3767](https://github.com/apollographql/router/issues/3767))

The `warm_up_queries` option enables quicker schema updates by precomputing query plans for your most used cached queries and your persisted queries. When a new schema is loaded, a precomputed query plan for it may already be in in-memory cache.
The `warm_up_queries` option enables quicker schema updates by precomputing query plans for your most used cached queries and your persisted queries. When a new schema is loaded, a precomputed query plan for it may already be in the in-memory cache.

We made a series of improvements to this feature to make it more usable:
* It is now active by default and warms up the cache with the 30% most used queries of the previous cache. The amount is still configurable, and it can be deactivated by setting it to 0.
* We added new metrics to track the time spent loading a new schema and planning queries in the warm-up phase. You can also measure the query plan cache usage, to know how many entries are used, and the cache hit rate, both for the in memory cache and the distributed cache.
* The warm-up will now plan queries in random order, to make sure that the work can be shared by multiple router instances using distributed caching
We made a series of improvements to this feature to make it easier to use:
* It is now active by default.
* It warms up the cache with the 30% most used queries from previous cache.
* The query cache percentage continues to be configurable, and it can be deactivated by setting it to 0.
* The warm-up will now plan queries in random order to make sure that the work can be shared by multiple router instances using distributed caching.
* Persisted queries are part of the warmed up queries.

We also added histogram metrics for `apollo_router_query_planning_warmup_duration` and `apollo_router_schema_load_duration`. These metrics make it easier to track the time spent loading a new schema and planning queries in the warm-up phase. You can measure the query plan cache usage for both the in-memory-cache and distributed cache. This makes it easier to know how many entries are used as well as the cache hit rate.

Here is what these metrics would look like in Prometheus:

```
# HELP apollo_router_query_planning_warmup_duration apollo_router_query_planning_warmup_duration
# TYPE apollo_router_query_planning_warmup_duration histogram
apollo_router_query_planning_warmup_duration_bucket{service_name="apollo-router",otel_scope_name="apollo/router",otel_scope_version="",le="0.05"} 1
apollo_router_query_planning_warmup_duration_bucket{service_name="apollo-router",otel_scope_name="apollo/router",otel_scope_version="",le="0.1"} 1
apollo_router_query_planning_warmup_duration_bucket{service_name="apollo-router",otel_scope_name="apollo/router",otel_scope_version="",le="0.25"} 1
apollo_router_query_planning_warmup_duration_sum{service_name="apollo-router",otel_scope_name="apollo/router",otel_scope_version=""} 0.022390619
apollo_router_query_planning_warmup_duration_count{service_name="apollo-router",otel_scope_name="apollo/router",otel_scope_version=""} 1
# HELP apollo_router_schema_load_duration apollo_router_schema_load_duration
# TYPE apollo_router_schema_load_duration histogram
apollo_router_schema_load_duration_bucket{service_name="apollo-router",otel_scope_name="apollo/router",otel_scope_version="",le="0.05"} 8
apollo_router_schema_load_duration_bucket{service_name="apollo-router",otel_scope_name="apollo/router",otel_scope_version="",le="0.1"} 8
apollo_router_schema_load_duration_bucket{service_name="apollo-router",otel_scope_name="apollo/router",otel_scope_version="",le="0.25"} 8
```

You can get more information about operating the query plan cache and its warm-up phase in the [documentation](https://www.apollographql.com/docs/router/configuration/in-memory-caching#cache-warm-up)

By [@Geal](https://github.com/Geal) in https://github.com/apollographql/router/pull/3815 https://github.com/apollographql/router/pull/3801 https://github.com/apollographql/router/pull/3767 https://github.com/apollographql/router/pull/3769 https://github.com/apollographql/router/pull/3770
By [@Geal](https://github.com/Geal) in https://github.com/apollographql/router/pull/3815 https://github.com/apollographql/router/pull/3801 https://github.com/apollographql/router/pull/3767 https://github.com/apollographql/router/pull/3769 https://github.com/apollographql/router/pull/3770

By [@bnjjj](https://github.com/bnjjj) in https://github.com/apollographql/router/pull/3807
2 changes: 1 addition & 1 deletion .changesets/feat_geal_reintroduce_rhai_json.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
### JSON encoding and decoding in Rhai ([PR #3785](https://github.com/apollographql/router/pull/3785))

It is now possible to encode or decode JSON from Rhai scripts using `json::encode` and `json::decode`
It is now possible to encode or decode JSON from Rhai scripts using `json::encode` and `json::decode`.

By [@Geal](https://github.com/Geal) in https://github.com/apollographql/router/pull/3785
2 changes: 2 additions & 0 deletions .changesets/feat_geal_subgraph_mtls.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,6 @@ tls:
key: ${file./path/to/key.pem}
```

Details on TLS client authentication can be found in the [documentation](https://www.apollographql.com/docs/router/configuration/overview#tls-client-authentication-for-subgraph-requests)

By [@Geal](https://github.com/Geal) in https://github.com/apollographql/router/pull/3794
20 changes: 10 additions & 10 deletions .changesets/feat_geal_supergraph_coprocessor2.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
### Supergraph coprocessor implementation ([PR #3647](https://github.com/apollographql/router/pull/3647))

Coprocessors now support supergraph service interception.
Coprocessors now support supergraph service interception.

On the request side, the coprocessor payload can contain:
- method
Expand All @@ -17,17 +17,17 @@ On the response side, the payload can contain:
- sdl

The supergraph request body contains:
* query
* operation name
* variables
* extensions
- query
- operation name
- variables
- extensions

The supergraph response body contains:
* label
* data
* errors
* extensions
- label
- data
- errors
- extensions

When using `@defer` or subscriptions a supergraph response may contain multiple GraphQL responses, and the coprocessor will be called for each.
When using `@defer` or subscriptions a supergraph response may contain multiple GraphQL responses. The coprocessor will be called for each response. Please refer to our [coprocessor documentation](https://www.apollographql.com/docs/router/customizations/coprocessor) for more information.

By [@Geal](https://github.com/Geal) in https://github.com/apollographql/router/pull/3647
4 changes: 2 additions & 2 deletions .changesets/feat_sm_add_awsxray_propagator.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Adds support for the OpenTelemetry AWS X-Ray tracing propagator.
### Adds support for the OpenTelemetry AWS X-Ray tracing propagator ([PR #3580](https://github.com/apollographql/router/pull/3580))

This propagator helps propagate tracing information from upstream services (such as AWS load balancers) to downstream services and handles conversion between the X-Ray trace id format and OpenTelemetry span contexts.
This propagator helps propagate tracing information from upstream services (such as AWS load balancers) to downstream services. It also handles conversion between the X-Ray trace id format and OpenTelemetry span contexts.

By [@scottmace](https://github.com/scottmace) in https://github.com/apollographql/router/pull/3580
5 changes: 0 additions & 5 deletions .changesets/fix_bnjjj_fix_otel_data_from_log.md

This file was deleted.

7 changes: 0 additions & 7 deletions .changesets/fix_garypen_3823_fix_diy.md

This file was deleted.

2 changes: 1 addition & 1 deletion .changesets/fix_garypen_helm_extra_labels.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
### Helm: If there are `extraLabels` add them to all resources ([PR #3622](https://github.com/apollographql/router/pull/3622))

This extends the functionality of `extraLabels` so that, if they are defined, they will be templated for all resources created by the chart.

Previously, they were only templated onto the `Deployment` resource.

By [@garypen](https://github.com/garypen) and [@bjoernw](https://github.com/bjoernw) in https://github.com/apollographql/router/pull/3622
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
### Coprocessors: Discard content-length sent by coprocessors. ([PR #3802](https://github.com/apollographql/router/pull/3802))
### Coprocessors: Discard content-length sent by coprocessors ([PR #3802](https://github.com/apollographql/router/pull/3802))

The `content-length` of an HTTP response can only be computed when a router response is being sent.
We now discard coprocessors `content-length` header to make sure the value is computed correctly.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
### Improve multi-cloud failover and error handling for Persisted Queries
### Improve multi-cloud failover and error handling for Persisted Queries ([PR #3863](https://github.com/apollographql/router/pull/3863))

Improves the resilience of the Persisted Queries feature to Uplink outages, and makes errors fetching Persisted Query Manifests from Uplink more visible.
Improves the resilience of the Persisted Queries feature to Uplink outages. This makes errors while fetching persisted query manifests from Uplink more visible.

By [@glasser](https://github.com/glasser) in https://github.com/apollographql/router/pull/3863
8 changes: 2 additions & 6 deletions .changesets/fix_renee_fix_large_ints.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
### Fix error response on large numbers in query transformations ([PR #3820](https://github.com/apollographql/router/pull/3820))
### Fix error response on large number types in query transformations ([PR #3820](https://github.com/apollographql/router/pull/3820))

This bug caused the router to reject operations where a large hardcoded integer was used as input for a Float field:

Expand All @@ -13,10 +13,6 @@ type Query {
}
```

Now the number is correctly interpreted as a Float.
This bug only affected hardcoded numbers, not numbers provided through variables.

<!-- start metadata -->
---
This number is now correctly interpreted as a `Float`. This bug only affected hardcoded numbers, not numbers provided through variables.

By [@goto-bus-stop](https://github.com/goto-bus-stop) in https://github.com/apollographql/router/pull/3820
2 changes: 1 addition & 1 deletion .changesets/fix_simon_large_id.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
### Fix validation error with ID variable values overflowing i32 ([Issue #3873](https://github.com/apollographql/router/issues/3873))
### Fix validation error with `ID` variable values overflowing 32-bit integers ([Issue #3873](https://github.com/apollographql/router/issues/3873))

Input values for variables of type `ID` were previously validated as "either like a GraphQL `Int` or like a GraphQL `String`". GraphQL `Int` is specified as a signed 32-bit integer, such that values that overflow fail validation. Applying this range restriction to `ID` values was incorrect. Instead, validation for `ID` now accepts any JSON integer or JSON string value, so that IDs larger than 32 bits can be used.

Expand Down
5 changes: 0 additions & 5 deletions .changesets/maint_bnjjj_fix_3740.md

This file was deleted.

Loading