Skip to content

Commit

Permalink
merge dev into next (#6416)
Browse files Browse the repository at this point in the history
  • Loading branch information
garypen authored Dec 9, 2024
2 parents 3ab3a59 + 3f1025b commit 8b7b31e
Show file tree
Hide file tree
Showing 207 changed files with 9,164 additions and 10,531 deletions.
7 changes: 7 additions & 0 deletions .changesets/breaking_drop_reuse_fragment.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
### Drop experimental reuse fragment query optimization option ([PR #6353](https://github.com/apollographql/router/pull/6353))

Drop support for the experimental reuse fragment query optimization. This implementation was not only very slow but also very buggy due to its complexity.

Auto generation of fragments is a much simpler (and faster) algorithm that in most cases produces better results. Fragment auto generation is the default optimization since v1.58 release.

By [@dariuszkuc](https://github.com/dariuszkuc) in https://github.com/apollographql/router/pull/6353
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
### More consistent attributes on `apollo.router.operations.persisted_queries` metric ([PR #6403](https://github.com/apollographql/router/pull/6403))

Version 1.28.1 added several *unstable* metrics, including `apollo.router.operations.persisted_queries`.

When an operation is rejected, Router includes a `persisted_queries.safelist.rejected.unknown` attribute on the metric. Previously, this attribute had the value `true` if the operation is logged (via `log_unknown`), and `false` if the operation is not logged. (The attribute is not included at all if the operation is not rejected.) This appears to have been a mistake, as you can also tell whether it is logged via the `persisted_queries.logged` attribute.

Router now only sets this attribute to true, and never to false. This may be a breaking change for your use of metrics; note that these metrics should be treated as unstable and may change in the future.

By [@glasser](https://github.com/glasser) in https://github.com/apollographql/router/pull/6403
7 changes: 7 additions & 0 deletions .changesets/config_simon_router_version_in_cache_key.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
### Distributed query plan cache keys include the Router version number ([PR #6406](https://github.com/apollographql/router/pull/6406))

More often than not, an Apollo Router release may contain changes that affect what query plans are generated or how they’re represented. To avoid using outdated entries from distributed cache, the cache key includes a counter that was manually incremented with relevant data structure or algorithm changes. Instead the cache key now includes the Router version number, so that different versions will always use separate cache entries.

If you have enabled [Distributed query plan caching](https://www.apollographql.com/docs/router/configuration/distributed-caching/#distributed-query-plan-caching), starting with this release and going forward you should anticipate additional cache regeneration cost when updating between any Router versions.

By [@SimonSapin](https://github.com/SimonSapin) in https://github.com/apollographql/router/pull/6406
6 changes: 6 additions & 0 deletions .changesets/feat_feat_fleet_detector_add_schema_metrics.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
### Adds Fleet Awareness Schema Metrics

Adds an additional metric to the `fleet_detector` plugin in the form of `apollo.router.schema` with 2 attributes:
`schema_hash` and `launch_id`.

By [@loshz](https://github.com/loshz) and [@nmoutschen](https://github.com/nmoutschen) in https://github.com/apollographql/router/pull/6283
13 changes: 13 additions & 0 deletions .changesets/feat_glasser_pq_client_name.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
### Client name support for Persisted Query Lists ([PR #6198](https://github.com/apollographql/router/pull/6198))

The persisted query manifest fetched from Uplink can now contain a `clientName` field in each operation. Two operations with the same `id` but different `clientName` are considered to be distinct operations (and may have distinct bodies).

Router resolves the client name by taking the first of these which exists:
- Reading the `apollo_persisted_queries::client_name` context key (which may be set by a `router_service` plugin)
- Reading the HTTP header named by `telemetry.apollo.client_name_header` (which defaults to `apollographql-client-name`)

If a client name can be resolved for a request, Router first tries to find a persisted query with the specified ID and the resolved client name.

If there is no operation with that ID and client name, or if a client name cannot be resolved, Router tries to find a persisted query with the specified ID and no client name specified. (This means that existing PQ lists that do not contain client names will continue to work.)

By [@glasser](https://github.com/glasser) in https://github.com/apollographql/router/pull/6198
10 changes: 10 additions & 0 deletions .changesets/feat_glasser_pq_safelist_override.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
### Ability to skip Persisted Query List safelisting enforcement via plugin ([PR #6403](https://github.com/apollographql/router/pull/6403))

If safelisting is enabled, a `router_service` plugin can skip enforcement of the safelist (including the `require_id` check) by adding the key `apollo_persisted_queries::safelist::skip_enforcement` with value `true` to the request context.

(This does not affect the logging of unknown operations by the `persisted_queries.log_unknown` option.)

In cases where an operation would have been denied but is allowed due to the context key existing, the attribute
`persisted_queries.safelist.enforcement_skipped` is set on the `apollo.router.operations.persisted_queries` metric with value true.

By [@glasser](https://github.com/glasser) in https://github.com/apollographql/router/pull/6403
13 changes: 13 additions & 0 deletions .changesets/feat_jr_add_fleet_awareness_plugin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
### Adds Fleet Awareness Plugin

Adds a new plugin that reports telemetry to Apollo on the configuration and deployment of the Router. Initially this
covers CPU & Memory usage, CPU Frequency, and other deployment characteristics such as Operating System, and Cloud
Provider. For more details, along with a full list of data captured and how to opt out, please see our guidance
[here](https://www.apollographql.com/docs/graphos/reference/data-privacy).

As part of the above PluginPrivate has been extended with a new `activate` hook which is guaranteed to be called once
the OTEL meter has been refreshed. This ensures that code, particularly that concerned with gauges, will survive a hot
reload of the router.

By [@jonathanrainer](https://github.com/jonathanrainer), [@nmoutschen](https://github.com/nmoutschen), [@loshz](https://github.com/loshz)
in https://github.com/apollographql/router/pull/6151
13 changes: 13 additions & 0 deletions .changesets/fix_address_dentist_buyer_frown.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
### Fix coprocessor empty body object panic ([PR #6398](https://github.com/apollographql/router/pull/6398))
If a coprocessor responds with an empty body object at the supergraph stage then the router would panic.

```json
{
... // other fields
"body": {} // empty object
}
```

This does not affect coprocessors that respond with formed responses.

By [@BrynCooke](https://github.com/BrynCooke) in https://github.com/apollographql/router/pull/6398
6 changes: 6 additions & 0 deletions .changesets/fix_bnjjj_fix_retry_metric.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
### Fix and test experimental_retry ([PR #6338](https://github.com/apollographql/router/pull/6338))

Fix the behavior of `experimental_retry` and make sure both the feature and metrics are working.
An entry in the context was also added, which would be useful later to implement a new standard attribute and selector for advanced telemetry.

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

This file was deleted.

15 changes: 15 additions & 0 deletions .changesets/maint_lrlna_remove_catch_unwind.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@

### Remove catch_unwind wrapper around the native query planner ([PR #6397](https://github.com/apollographql/router/pull/6397))

As part of internal maintenance of the query planner, we are removing the
catch_unwind wrapper around the native query planner. This wrapper was used as
an extra safeguard for potential panics the native planner could produce. The
native query planner no longer has any code paths that could panic. We have also
not witnessed a panic in the last four months, having processed 560 million real
user operations through the native planner.

This maintenance work also removes backtrace capture for federation errors which
was used for debugging and is no longer necessary as we have the confidence in
the native planner's implementation.

By [@lrlna](https://github.com/lrlna) in https://github.com/apollographql/router/pull/6397
13 changes: 13 additions & 0 deletions .changesets/maint_renee_router_297_monotonic_counters.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
### Docs-deprecate several metrics ([PR #6350](https://github.com/apollographql/router/pull/6350))

These metrics are deprecated in favor of better, OTel-compatible alternatives:

- `apollo_router_deduplicated_subscriptions_total` - use the `apollo.router.operations.subscriptions` metric's `subscriptions.deduplicated` attribute.
- `apollo_authentication_failure_count` - use the `apollo.router.operations.authentication.jwt` metric's `authentication.jwt.failed` attribute.
- `apollo_authentication_success_count` - use the `apollo.router.operations.authentication.jwt` metric instead. If the `authentication.jwt.failed` attribute is *absent* or `false`, the authentication succeeded.
- `apollo_require_authentication_failure_count` - use the `http.server.request.duration` metric's `http.response.status_code` attribute. Requests with authentication failures have HTTP status code 401.
- `apollo_router_timeout` - this metric conflates timed-out requests from client to the router, and requests from the router to subgraphs. Timed-out requests have HTTP status code 504. Use the `http.response.status_code` attribute on the `http.server.request.duration` metric to identify timed-out router requests, and the same attribute on the `http.client.request.duration` metric to identify timed-out subgraph requests.

The deprecated metrics will continue to work in the 1.x release line.

By [@goto-bus-stop](https://github.com/goto-bus-stop) in https://github.com/apollographql/router/pull/6350
8 changes: 4 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
version: 2.1

# Cache key bump: 2
# Cache key bump: 3

# These "CircleCI Orbs" are reusable bits of configuration that can be shared
# across projects. See https://circleci.com/orbs/ for more information.
orbs:
gh: circleci/[email protected]
slack: circleci/slack@4.15.0
slack: circleci/slack@5.1.1
secops: apollo/[email protected]

executors:
Expand All @@ -26,9 +26,9 @@ executors:
- image: cimg/base:stable
- image: cimg/redis:7.4.1
- image: jaegertracing/all-in-one:1.54.0
- image: openzipkin/zipkin:3.4.2
- image: openzipkin/zipkin:3.4.3
- image: ghcr.io/datadog/dd-apm-test-agent/ddapm-test-agent:v1.17.0
resource_class: xlarge
resource_class: 2xlarge
environment:
CARGO_BUILD_JOBS: 4
arm_linux_build: &arm_linux_build_executor
Expand Down
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,28 @@ Default values of some GraphOS reporting metrics have been changed from v1.x to
* `telemetry.apollo.signature_normalization_algorithm` now defaults to `enhanced`. (In v1.x the default is `legacy`.)
* `telemetry.apollo.metrics_reference_mode` now defaults to `extended`. (In v1.x the default is `standard`.)

# [1.58.1] - 2024-12-05

> [!IMPORTANT]
> If you have enabled [Distributed query plan caching](https://www.apollographql.com/docs/router/configuration/distributed-caching/#distributed-query-plan-caching), this release contains changes which necessarily alter the hashing algorithm used for the cache keys. On account of this, you should anticipate additional cache regeneration cost when updating between these versions while the new hashing algorithm comes into service.

## 🐛 Fixes

### Particular `supergraph` telemetry customizations using the `query` selector do not error ([PR #6324](https://github.com/apollographql/router/pull/6324))

Telemetry customizations like those featured in the [request limits telemetry documentation](https://www.apollographql.com/docs/graphos/routing/security/request-limits#collecting-metrics) now work as intended when using the `query` selector on the `supergraph` layer. Prior to this fix, this was sometimes causing a `this is a bug and should not happen` error, but is now resolved.

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

### Native query planner now receives both "plan" and "path" limits configuration ([PR #6316](https://github.com/apollographql/router/pull/6316))

The native query planner now correctly sets two experimental configuration options for limiting query planning complexity. These were previously available in the configuration and observed by the legacy planner, but were not being passed to the new native planner until now:

- `supergraph.query_planning.experimental_plans_limit`
- `supergraph.query_planning.experimental_paths_limit`

By [@goto-bus-stop](https://github.com/goto-bus-stop) in https://github.com/apollographql/router/pull/6316

# [1.58.0] - 2024-11-27

> [!IMPORTANT]
Expand Down Expand Up @@ -174,6 +196,12 @@ experimental_query_planner_mode: new

By [@clenfest](https://github.com/clenfest), [@TylerBloom](https://github.com/TylerBloom) in https://github.com/apollographql/router/pull/6310

### Allow configuring host via Helm template for virtual service ([PR #5545](https://github.com/apollographql/router/pull/5795))

When deploying via Helm, you can now configure hosts in `virtualservice.yaml` as a single host or a range of hosts. This is helpful when different hosts could be used within a cluster.

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

## 🐛 Fixes

### Remove noisy demand control logs ([PR #6192](https://github.com/apollographql/router/pull/6192))
Expand Down
Loading

0 comments on commit 8b7b31e

Please sign in to comment.