diff --git a/.changesets/breaking_drop_reuse_fragment.md b/.changesets/breaking_drop_reuse_fragment.md deleted file mode 100644 index ccdb22efec..0000000000 --- a/.changesets/breaking_drop_reuse_fragment.md +++ /dev/null @@ -1,7 +0,0 @@ -### Drop experimental reuse fragment query optimization option ([PR #6354](https://github.com/apollographql/router/pull/6354)) - -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 diff --git a/.changesets/breaking_glasser_pq_metric_attribute_consistency.md b/.changesets/breaking_glasser_pq_metric_attribute_consistency.md deleted file mode 100644 index 87c320e4ad..0000000000 --- a/.changesets/breaking_glasser_pq_metric_attribute_consistency.md +++ /dev/null @@ -1,9 +0,0 @@ -### 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 diff --git a/.changesets/config_simon_router_version_in_cache_key.md b/.changesets/config_simon_router_version_in_cache_key.md deleted file mode 100644 index e5028023b1..0000000000 --- a/.changesets/config_simon_router_version_in_cache_key.md +++ /dev/null @@ -1,8 +0,0 @@ -### Add version number to distributed query plan cache keys ([PR #6406](https://github.com/apollographql/router/pull/6406)) - -The router now includes its version number in the cache keys of distributed cache entries. Given that a new router release may change how query plans are generated or represented, including the router version in a cache key enables the router to use separate cache entries for different versions. - -If you have enabled [distributed query plan caching](https://www.apollographql.com/docs/router/configuration/distributed-caching/#distributed-query-plan-caching), expect additional processing for your cache to update for this router release. - - -By [@SimonSapin](https://github.com/SimonSapin) in https://github.com/apollographql/router/pull/6406 diff --git a/.changesets/feat_feat_fleet_detector_add_schema_metrics.md b/.changesets/feat_feat_fleet_detector_add_schema_metrics.md deleted file mode 100644 index b9ab16aa5a..0000000000 --- a/.changesets/feat_feat_fleet_detector_add_schema_metrics.md +++ /dev/null @@ -1,6 +0,0 @@ -### Add fleet awareness schema metric ([PR #6283](https://github.com/apollographql/router/pull/6283)) - - -The router now supports the `apollo.router.instance.schema` metric for its `fleet_detector` plugin. It has two 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 diff --git a/.changesets/feat_glasser_pq_client_name.md b/.changesets/feat_glasser_pq_client_name.md deleted file mode 100644 index a9da1d73af..0000000000 --- a/.changesets/feat_glasser_pq_client_name.md +++ /dev/null @@ -1,16 +0,0 @@ -### Support client name for persisted query lists ([PR #6198](https://github.com/apollographql/router/pull/6198)) - -The persisted query manifest fetched from Apollo 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 they may have distinct bodies. - -The router resolves the client name by taking the first from the following that exists: -- Reading the `apollo_persisted_queries::client_name` context key that 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, the 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, the router tries to find a persisted query with the specified ID and no client name specified. This means that existing PQ lists that don't contain client names will continue to work. - -To learn more, go to [persisted queries](https://www.apollographql.com/docs/graphos/routing/security/persisted-queries#apollo_persisted_queriesclient_name) docs. - -By [@glasser](https://github.com/glasser) in https://github.com/apollographql/router/pull/6198 \ No newline at end of file diff --git a/.changesets/feat_glasser_pq_safelist_override.md b/.changesets/feat_glasser_pq_safelist_override.md deleted file mode 100644 index f849df60a6..0000000000 --- a/.changesets/feat_glasser_pq_safelist_override.md +++ /dev/null @@ -1,9 +0,0 @@ -### 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. - -> Note: this doesn't 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 \ No newline at end of file diff --git a/.changesets/feat_jr_add_fleet_awareness_plugin.md b/.changesets/feat_jr_add_fleet_awareness_plugin.md deleted file mode 100644 index 863e7e2166..0000000000 --- a/.changesets/feat_jr_add_fleet_awareness_plugin.md +++ /dev/null @@ -1,10 +0,0 @@ -### Add fleet awareness plugin ([PR #6151](https://github.com/apollographql/router/pull/6151)) - -A new `fleet_awareness` plugin has been added that reports telemetry to Apollo about the configuration and deployment of the router. - -The reported telemetry include CPU and 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, go to our -[data privacy policy](https://www.apollographql.com/docs/graphos/reference/data-privacy). - - -By [@jonathanrainer](https://github.com/jonathanrainer), [@nmoutschen](https://github.com/nmoutschen), [@loshz](https://github.com/loshz) -in https://github.com/apollographql/router/pull/6151 diff --git a/.changesets/feat_native_query_planner_ga.md b/.changesets/feat_native_query_planner_ga.md deleted file mode 100644 index 4f0c8469b9..0000000000 --- a/.changesets/feat_native_query_planner_ga.md +++ /dev/null @@ -1,37 +0,0 @@ -### General availability of native query planner - -The router's native, Rust-based, query planner is now [generally available](https://www.apollographql.com/docs/graphos/reference/feature-launch-stages#general-availability) and enabled by default. - -The native query planner achieves better performance for a variety of graphs. In our tests, we observe: - -* 10x median improvement in query planning time (observed via `apollo.router.query_planning.plan.duration`) -* 2.9x improvement in router’s CPU utilization -* 2.2x improvement in router’s memory usage - -> Note: you can expect generated plans and subgraph operations in the native -query planner to have slight differences when compared to the legacy, JavaScript-based query planner. We've ascertained these differences to be semantically insignificant, based on comparing ~2.5 million known unique user operations in GraphOS as well as -comparing ~630 million operations across actual router deployments in shadow -mode for a four month duration. - -The native query planner supports Federation v2 supergraphs. If you are using Federation v1 today, see our [migration guide](https://www.apollographql.com/docs/graphos/reference/migration/to-federation-version-2) on how to update your composition build step and subgraph changes are typically not needed. - -The legacy, JavaScript, query planner is deprecated in this release, but you can still switch -back to it if you are still using Federation v1 supergraph: - -``` -experimental_query_planner_mode: legacy -``` - -> Note: The subgraph operations generated by the query planner are not -guaranteed consistent release over release. We strongly recommend against -relying on the shape of planned subgraph operations, as new router features and -optimizations will continuously affect it. - -By [@sachindshinde](https://github.com/sachindshinde), -[@goto-bus-stop](https://github.com/goto-bus-stop), -[@duckki](https://github.com/duckki), -[@TylerBloom](https://github.com/TylerBloom), -[@SimonSapin](https://github.com/SimonSapin), -[@dariuszkuc](https://github.com/dariuszkuc), -[@lrlna](https://github.com/lrlna), [@clenfest](https://github.com/clenfest), -and [@o0Ignition0o](https://github.com/o0Ignition0o). \ No newline at end of file diff --git a/.changesets/fix_address_dentist_buyer_frown.md b/.changesets/fix_address_dentist_buyer_frown.md deleted file mode 100644 index 243f51fa0b..0000000000 --- a/.changesets/fix_address_dentist_buyer_frown.md +++ /dev/null @@ -1,16 +0,0 @@ -### Fix coprocessor empty body object panic ([PR #6398](https://github.com/apollographql/router/pull/6398)) - -Previously, the router would panic if a coprocessor responds with an empty body object at the supergraph stage: - -```json -{ - ... // other fields - "body": {} // empty object -} -``` - -This has been fixed in this release. - -> Note: the previous issue didn't affect coprocessors that responded with formed responses. - -By [@BrynCooke](https://github.com/BrynCooke) in https://github.com/apollographql/router/pull/6398 diff --git a/.changesets/fix_bnjjj_fix_880.md b/.changesets/fix_bnjjj_fix_880.md deleted file mode 100644 index 939fbda854..0000000000 --- a/.changesets/fix_bnjjj_fix_880.md +++ /dev/null @@ -1,55 +0,0 @@ -### Fix telemetry instrumentation using supergraph query selector ([PR #6324](https://github.com/apollographql/router/pull/6324)) - -Previously, router telemetry instrumentation that used query selectors could log errors with messages such as `this is a bug and should not happen`. - -These errors have now been fixed, and configurations with query selectors such as the following work properly: - -```yaml title=router.yaml -telemetry: - exporters: - metrics: - common: - views: - # Define a custom view because operation limits are different than the default latency-oriented view of OpenTelemetry - - name: oplimits.* - aggregation: - histogram: - buckets: - - 0 - - 5 - - 10 - - 25 - - 50 - - 100 - - 500 - - 1000 - instrumentation: - instruments: - supergraph: - oplimits.aliases: - value: - query: aliases - type: histogram - unit: number - description: "Aliases for an operation" - oplimits.depth: - value: - query: depth - type: histogram - unit: number - description: "Depth for an operation" - oplimits.height: - value: - query: height - type: histogram - unit: number - description: "Height for an operation" - oplimits.root_fields: - value: - query: root_fields - type: histogram - unit: number - description: "Root fields for an operation" -``` - -By [@bnjjj](https://github.com/bnjjj) in https://github.com/apollographql/router/pull/6324 \ No newline at end of file diff --git a/.changesets/fix_bnjjj_fix_retry_metric.md b/.changesets/fix_bnjjj_fix_retry_metric.md deleted file mode 100644 index eaaa220e80..0000000000 --- a/.changesets/fix_bnjjj_fix_retry_metric.md +++ /dev/null @@ -1,6 +0,0 @@ -### 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 \ No newline at end of file diff --git a/.changesets/fix_fix_query_hashing.md b/.changesets/fix_fix_query_hashing.md deleted file mode 100644 index e371bd476e..0000000000 --- a/.changesets/fix_fix_query_hashing.md +++ /dev/null @@ -1,8 +0,0 @@ -### Fix query hashing algorithm ([PR #6205](https://github.com/apollographql/router/pull/6205)) - -> [!IMPORTANT] -> If you have enabled [distributed query plan caching](https://www.apollographql.com/docs/router/configuration/distributed-caching/#distributed-query-plan-caching), updates to the query planner in this release will result in query plan caches being regenerated rather than reused. On account of this, you should anticipate additional cache regeneration cost when updating to this router version while the new query plans come into service. - -The router includes a schema-aware query hashing algorithm designed to return the same hash across schema updates if the query remains unaffected. This update enhances the algorithm by addressing various corner cases to improve its reliability and consistency. - -By [@Geal](https://github.com/Geal) in https://github.com/apollographql/router/pull/6205 diff --git a/.changesets/fix_renee_quieres_queries.md b/.changesets/fix_renee_quieres_queries.md deleted file mode 100644 index 76152d2cc8..0000000000 --- a/.changesets/fix_renee_quieres_queries.md +++ /dev/null @@ -1,6 +0,0 @@ -### Fix typo in persisted query metric attribute ([PR #6332](https://github.com/apollographql/router/pull/6332)) - -The `apollo.router.operations.persisted_queries` metric reports an attribute when a persisted query was not found. -Previously, the attribute name was `persisted_quieries.not_found`, with one `i` too many. Now it's `persisted_queries.not_found`. - -By [@goto-bus-stop](https://github.com/goto-bus-stop) in https://github.com/apollographql/router/pull/6332 \ No newline at end of file diff --git a/.changesets/fix_tninesling_cost_name_handling.md b/.changesets/fix_tninesling_cost_name_handling.md deleted file mode 100644 index fe911c43ed..0000000000 --- a/.changesets/fix_tninesling_cost_name_handling.md +++ /dev/null @@ -1,22 +0,0 @@ -### Ensure cost directives are picked up when not explicitly imported ([PR #6328](https://github.com/apollographql/router/pull/6328)) - -With the recent composition changes, importing `@cost` results in a supergraph schema with the cost specification import at the top. The `@cost` directive itself is not explicitly imported, as it's expected to be available as the default export from the cost link. In contrast, uses of `@listSize` to translate to an explicit import in the supergraph. - -Old SDL link - -``` -@link( - url: "https://specs.apollo.dev/cost/v0.1" - import: ["@cost", "@listSize"] -) -``` - -New SDL link - -``` -@link(url: "https://specs.apollo.dev/cost/v0.1", import: ["@listSize"]) -``` - -Instead of using the directive names from the import list in the link, the directive names now come from `SpecDefinition::directive_name_in_schema`, which is equivalent to the change we made on the composition side. - -By [@tninesling](https://github.com/tninesling) in https://github.com/apollographql/router/pull/6328 diff --git a/.changesets/maint_lrlna_remove_catch_unwind.md b/.changesets/maint_lrlna_remove_catch_unwind.md deleted file mode 100644 index 8390cbe278..0000000000 --- a/.changesets/maint_lrlna_remove_catch_unwind.md +++ /dev/null @@ -1,14 +0,0 @@ - -### 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, the -`catch_unwind` wrapper around the native query planner has been removed. This wrapper served as an extra safeguard for potential panics the native planner could produce. The -native query planner however 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 diff --git a/.changesets/maint_renee_router_297_monotonic_counters.md b/.changesets/maint_renee_router_297_monotonic_counters.md deleted file mode 100644 index f90446e3f4..0000000000 --- a/.changesets/maint_renee_router_297_monotonic_counters.md +++ /dev/null @@ -1,13 +0,0 @@ -### Deprecate various metrics ([PR #6350](https://github.com/apollographql/router/pull/6350)) - -Several metrics have been deprecated in this release, in favor of OpenTelemetry-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 diff --git a/CHANGELOG.md b/CHANGELOG.md index cbab02293c..39162412b6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,266 @@ 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.59.0] - 2024-12-17 + +> [!IMPORTANT] +> If you have enabled [distributed query plan caching](https://www.apollographql.com/docs/router/configuration/distributed-caching/#distributed-query-plan-caching), updates to the query planner in this release will result in query plan caches being regenerated rather than reused. On account of this, you should anticipate additional cache regeneration cost when updating to this router version while the new query plans come into service. + +## 🚀 Features + +### General availability of native query planner + +The router's native, Rust-based, query planner is now [generally available](https://www.apollographql.com/docs/graphos/reference/feature-launch-stages#general-availability) and enabled by default. + +The native query planner achieves better performance for a variety of graphs. In our tests, we observe: + +* 10x median improvement in query planning time (observed via `apollo.router.query_planning.plan.duration`) +* 2.9x improvement in router’s CPU utilization +* 2.2x improvement in router’s memory usage + +> Note: you can expect generated plans and subgraph operations in the native +query planner to have slight differences when compared to the legacy, JavaScript-based query planner. We've ascertained these differences to be semantically insignificant, based on comparing ~2.5 million known unique user operations in GraphOS as well as +comparing ~630 million operations across actual router deployments in shadow +mode for a four month duration. + +The native query planner supports Federation v2 supergraphs. If you are using Federation v1 today, see our [migration guide](https://www.apollographql.com/docs/graphos/reference/migration/to-federation-version-2) on how to update your composition build step. Subgraph changes are typically not needed. + +The legacy, JavaScript, query planner is deprecated in this release, but you can still switch +back to it if you are still using Federation v1 supergraph: + +``` +experimental_query_planner_mode: legacy +``` + +> Note: The subgraph operations generated by the query planner are not +guaranteed consistent release over release. We strongly recommend against +relying on the shape of planned subgraph operations, as new router features and +optimizations will continuously affect it. + +By [@sachindshinde](https://github.com/sachindshinde), +[@goto-bus-stop](https://github.com/goto-bus-stop), +[@duckki](https://github.com/duckki), +[@TylerBloom](https://github.com/TylerBloom), +[@SimonSapin](https://github.com/SimonSapin), +[@dariuszkuc](https://github.com/dariuszkuc), +[@lrlna](https://github.com/lrlna), [@clenfest](https://github.com/clenfest), +and [@o0Ignition0o](https://github.com/o0Ignition0o). + +### 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. + +> Note: this doesn't 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 + +### Add fleet awareness plugin ([PR #6151](https://github.com/apollographql/router/pull/6151)) + +A new `fleet_awareness` plugin has been added that reports telemetry to Apollo about the configuration and deployment of the router. + +The reported telemetry include CPU and 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, go to our +[data privacy policy](https://www.apollographql.com/docs/graphos/reference/data-privacy). + +By [@jonathanrainer](https://github.com/jonathanrainer), [@nmoutschen](https://github.com/nmoutschen), [@loshz](https://github.com/loshz) +in https://github.com/apollographql/router/pull/6151 + +### Add fleet awareness schema metric ([PR #6283](https://github.com/apollographql/router/pull/6283)) + +The router now supports the `apollo.router.instance.schema` metric for its `fleet_detector` plugin. It has two 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 + +### Support client name for persisted query lists ([PR #6198](https://github.com/apollographql/router/pull/6198)) + +The persisted query manifest fetched from Apollo 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 they may have distinct bodies. + +The router resolves the client name by taking the first from the following that exists: +- Reading the `apollo_persisted_queries::client_name` context key that 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, the 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, the router tries to find a persisted query with the specified ID and no client name specified. This means that existing PQ lists that don't contain client names will continue to work. + +To learn more, go to [persisted queries](https://www.apollographql.com/docs/graphos/routing/security/persisted-queries#apollo_persisted_queriesclient_name) docs. + +By [@glasser](https://github.com/glasser) in https://github.com/apollographql/router/pull/6198 + +## 🐛 Fixes + +### Fix coprocessor empty body object panic ([PR #6398](https://github.com/apollographql/router/pull/6398)) + +Previously, the router would panic if a coprocessor responds with an empty body object at the supergraph stage: + +```json +{ + ... // other fields + "body": {} // empty object +} +``` + +This has been fixed in this release. + +> Note: the previous issue didn't affect coprocessors that responded with formed responses. + +By [@BrynCooke](https://github.com/BrynCooke) in https://github.com/apollographql/router/pull/6398 + +### Ensure cost directives are picked up when not explicitly imported ([PR #6328](https://github.com/apollographql/router/pull/6328)) + +With the recent composition changes, importing `@cost` results in a supergraph schema with the cost specification import at the top. The `@cost` directive itself is not explicitly imported, as it's expected to be available as the default export from the cost link. In contrast, uses of `@listSize` to translate to an explicit import in the supergraph. + +Old SDL link + +``` +@link( + url: "https://specs.apollo.dev/cost/v0.1" + import: ["@cost", "@listSize"] +) +``` + +New SDL link + +``` +@link(url: "https://specs.apollo.dev/cost/v0.1", import: ["@listSize"]) +``` + +Instead of using the directive names from the import list in the link, the directive names now come from `SpecDefinition::directive_name_in_schema`, which is equivalent to the change we made on the composition side. + +By [@tninesling](https://github.com/tninesling) in https://github.com/apollographql/router/pull/6328 + +### Fix query hashing algorithm ([PR #6205](https://github.com/apollographql/router/pull/6205)) + +The router includes a schema-aware query hashing algorithm designed to return the same hash across schema updates if the query remains unaffected. This update enhances the algorithm by addressing various corner cases to improve its reliability and consistency. + +By [@Geal](https://github.com/Geal) in https://github.com/apollographql/router/pull/6205 + +### Fix typo in persisted query metric attribute ([PR #6332](https://github.com/apollographql/router/pull/6332)) + +The `apollo.router.operations.persisted_queries` metric reports an attribute when a persisted query was not found. +Previously, the attribute name was `persisted_quieries.not_found`, with one `i` too many. Now it's `persisted_queries.not_found`. + +By [@goto-bus-stop](https://github.com/goto-bus-stop) in https://github.com/apollographql/router/pull/6332 + +### Fix telemetry instrumentation using supergraph query selector ([PR #6324](https://github.com/apollographql/router/pull/6324)) + +Previously, router telemetry instrumentation that used query selectors could log errors with messages such as `this is a bug and should not happen`. + +These errors have now been fixed, and configurations with query selectors such as the following work properly: + +```yaml title=router.yaml +telemetry: + exporters: + metrics: + common: + views: + # Define a custom view because operation limits are different than the default latency-oriented view of OpenTelemetry + - name: oplimits.* + aggregation: + histogram: + buckets: + - 0 + - 5 + - 10 + - 25 + - 50 + - 100 + - 500 + - 1000 + instrumentation: + instruments: + supergraph: + oplimits.aliases: + value: + query: aliases + type: histogram + unit: number + description: "Aliases for an operation" + oplimits.depth: + value: + query: depth + type: histogram + unit: number + description: "Depth for an operation" + oplimits.height: + value: + query: height + type: histogram + unit: number + description: "Height for an operation" + oplimits.root_fields: + value: + query: root_fields + type: histogram + unit: number + description: "Root fields for an operation" +``` + +By [@bnjjj](https://github.com/bnjjj) in https://github.com/apollographql/router/pull/6324 + +### 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. Note these metrics are unstable and will continue to change. + +By [@glasser](https://github.com/glasser) in https://github.com/apollographql/router/pull/6403 + +### Drop experimental reuse fragment query optimization option ([PR #6354](https://github.com/apollographql/router/pull/6354)) + +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 + +## 📃 Configuration + +### Add version number to distributed query plan cache keys ([PR #6406](https://github.com/apollographql/router/pull/6406)) + +The router now includes its version number in the cache keys of distributed cache entries. Given that a new router release may change how query plans are generated or represented, including the router version in a cache key enables the router to use separate cache entries for different versions. + +If you have enabled [distributed query plan caching](https://www.apollographql.com/docs/router/configuration/distributed-caching/#distributed-query-plan-caching), expect additional processing for your cache to update for this router release. + + +By [@SimonSapin](https://github.com/SimonSapin) in https://github.com/apollographql/router/pull/6406 + +## 🛠 Maintenance + +### 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, the +`catch_unwind` wrapper around the native query planner has been removed. This wrapper served as an extra safeguard for potential panics the native planner could produce. The +native query planner however 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 + +### Deprecate various metrics ([PR #6350](https://github.com/apollographql/router/pull/6350)) + +Several metrics have been deprecated in this release, in favor of OpenTelemetry-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 + + + # [1.58.1] - 2024-12-05 > [!IMPORTANT] diff --git a/Cargo.lock b/Cargo.lock index 71b00af853..2e367d7c41 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -204,7 +204,7 @@ dependencies = [ [[package]] name = "apollo-federation" -version = "1.59.0-rc.0" +version = "1.59.0" dependencies = [ "apollo-compiler", "derive_more", @@ -257,7 +257,7 @@ dependencies = [ [[package]] name = "apollo-router" -version = "1.59.0-rc.0" +version = "1.59.0" dependencies = [ "access-json", "ahash", @@ -427,7 +427,7 @@ dependencies = [ [[package]] name = "apollo-router-benchmarks" -version = "1.59.0-rc.0" +version = "1.59.0" dependencies = [ "apollo-parser", "apollo-router", @@ -443,7 +443,7 @@ dependencies = [ [[package]] name = "apollo-router-scaffold" -version = "1.59.0-rc.0" +version = "1.59.0" dependencies = [ "anyhow", "cargo-scaffold", diff --git a/apollo-federation/Cargo.toml b/apollo-federation/Cargo.toml index 34d5b0e999..9469277646 100644 --- a/apollo-federation/Cargo.toml +++ b/apollo-federation/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "apollo-federation" -version = "1.59.0-rc.0" +version = "1.59.0" authors = ["The Apollo GraphQL Contributors"] edition = "2021" description = "Apollo Federation" diff --git a/apollo-router-benchmarks/Cargo.toml b/apollo-router-benchmarks/Cargo.toml index 2211c639fe..53757506a1 100644 --- a/apollo-router-benchmarks/Cargo.toml +++ b/apollo-router-benchmarks/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "apollo-router-benchmarks" -version = "1.59.0-rc.0" +version = "1.59.0" authors = ["Apollo Graph, Inc. "] edition = "2021" license = "Elastic-2.0" diff --git a/apollo-router-scaffold/Cargo.toml b/apollo-router-scaffold/Cargo.toml index 899776abc9..3ce55f07d0 100644 --- a/apollo-router-scaffold/Cargo.toml +++ b/apollo-router-scaffold/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "apollo-router-scaffold" -version = "1.59.0-rc.0" +version = "1.59.0" authors = ["Apollo Graph, Inc. "] edition = "2021" license = "Elastic-2.0" diff --git a/apollo-router-scaffold/templates/base/Cargo.template.toml b/apollo-router-scaffold/templates/base/Cargo.template.toml index 15fdabbbf0..7e188815b2 100644 --- a/apollo-router-scaffold/templates/base/Cargo.template.toml +++ b/apollo-router-scaffold/templates/base/Cargo.template.toml @@ -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.59.0-rc.0" +apollo-router = "1.59.0" {{/if}} {{/if}} async-trait = "0.1.52" diff --git a/apollo-router-scaffold/templates/base/xtask/Cargo.template.toml b/apollo-router-scaffold/templates/base/xtask/Cargo.template.toml index bc31af94d8..59e99a9f2e 100644 --- a/apollo-router-scaffold/templates/base/xtask/Cargo.template.toml +++ b/apollo-router-scaffold/templates/base/xtask/Cargo.template.toml @@ -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.59.0-rc.0" } +apollo-router-scaffold = { git = "https://github.com/apollographql/router.git", tag = "v1.59.0" } {{/if}} {{/if}} anyhow = "1.0.58" diff --git a/apollo-router/Cargo.toml b/apollo-router/Cargo.toml index 5464546fdd..061e24593e 100644 --- a/apollo-router/Cargo.toml +++ b/apollo-router/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "apollo-router" -version = "1.59.0-rc.0" +version = "1.59.0" authors = ["Apollo Graph, Inc. "] repository = "https://github.com/apollographql/router/" documentation = "https://docs.rs/apollo-router" @@ -66,7 +66,7 @@ features = ["docs_rs"] access-json = "0.1.0" anyhow = "1.0.86" apollo-compiler.workspace = true -apollo-federation = { path = "../apollo-federation", version = "=1.59.0-rc.0" } +apollo-federation = { path = "../apollo-federation", version = "=1.59.0" } arc-swap = "1.6.0" async-channel = "1.9.0" async-compression = { version = "0.4.6", features = [ diff --git a/dockerfiles/tracing/docker-compose.datadog.yml b/dockerfiles/tracing/docker-compose.datadog.yml index a94b7ddd79..4eec369eb4 100644 --- a/dockerfiles/tracing/docker-compose.datadog.yml +++ b/dockerfiles/tracing/docker-compose.datadog.yml @@ -3,7 +3,7 @@ services: apollo-router: container_name: apollo-router - image: ghcr.io/apollographql/router:v1.59.0-rc.0 + image: ghcr.io/apollographql/router:v1.59.0 volumes: - ./supergraph.graphql:/etc/config/supergraph.graphql - ./router/datadog.router.yaml:/etc/config/configuration.yaml diff --git a/dockerfiles/tracing/docker-compose.jaeger.yml b/dockerfiles/tracing/docker-compose.jaeger.yml index 1a0109fbba..72a2857397 100644 --- a/dockerfiles/tracing/docker-compose.jaeger.yml +++ b/dockerfiles/tracing/docker-compose.jaeger.yml @@ -4,7 +4,7 @@ services: apollo-router: container_name: apollo-router #build: ./router - image: ghcr.io/apollographql/router:v1.59.0-rc.0 + image: ghcr.io/apollographql/router:v1.59.0 volumes: - ./supergraph.graphql:/etc/config/supergraph.graphql - ./router/jaeger.router.yaml:/etc/config/configuration.yaml diff --git a/dockerfiles/tracing/docker-compose.zipkin.yml b/dockerfiles/tracing/docker-compose.zipkin.yml index 945b147b53..0ebdfb9ce7 100644 --- a/dockerfiles/tracing/docker-compose.zipkin.yml +++ b/dockerfiles/tracing/docker-compose.zipkin.yml @@ -4,7 +4,7 @@ services: apollo-router: container_name: apollo-router build: ./router - image: ghcr.io/apollographql/router:v1.59.0-rc.0 + image: ghcr.io/apollographql/router:v1.59.0 volumes: - ./supergraph.graphql:/etc/config/supergraph.graphql - ./router/zipkin.router.yaml:/etc/config/configuration.yaml diff --git a/helm/chart/router/Chart.yaml b/helm/chart/router/Chart.yaml index fe7cdc4f77..95cf5805eb 100644 --- a/helm/chart/router/Chart.yaml +++ b/helm/chart/router/Chart.yaml @@ -20,10 +20,10 @@ type: application # so it matches the shape of our release process and release automation. # By proxy of that decision, this version uses SemVer 2.0.0, though the prefix # of "v" is not included. -version: 1.59.0-rc.0 +version: 1.59.0 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: "v1.59.0-rc.0" +appVersion: "v1.59.0" diff --git a/helm/chart/router/README.md b/helm/chart/router/README.md index a7f5cfb9d6..a9a5af6b71 100644 --- a/helm/chart/router/README.md +++ b/helm/chart/router/README.md @@ -2,7 +2,7 @@ [router](https://github.com/apollographql/router) Rust Graph Routing runtime for Apollo Federation -![Version: 1.59.0-rc.0](https://img.shields.io/badge/Version-1.59.0--rc.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v1.59.0-rc.0](https://img.shields.io/badge/AppVersion-v1.59.0--rc.0-informational?style=flat-square) +![Version: 1.59.0](https://img.shields.io/badge/Version-1.59.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v1.59.0](https://img.shields.io/badge/AppVersion-v1.59.0-informational?style=flat-square) ## Prerequisites @@ -11,7 +11,7 @@ ## Get Repo Info ```console -helm pull oci://ghcr.io/apollographql/helm-charts/router --version 1.59.0-rc.0 +helm pull oci://ghcr.io/apollographql/helm-charts/router --version 1.59.0 ``` ## Install Chart @@ -19,7 +19,7 @@ helm pull oci://ghcr.io/apollographql/helm-charts/router --version 1.59.0-rc.0 **Important:** only helm3 is supported ```console -helm upgrade --install [RELEASE_NAME] oci://ghcr.io/apollographql/helm-charts/router --version 1.59.0-rc.0 --values my-values.yaml +helm upgrade --install [RELEASE_NAME] oci://ghcr.io/apollographql/helm-charts/router --version 1.59.0 --values my-values.yaml ``` _See [configuration](#configuration) below._ @@ -98,4 +98,4 @@ helm show values oci://ghcr.io/apollographql/helm-charts/router | virtualservice.enabled | bool | `false` | | ---------------------------------------------- -Autogenerated from chart metadata using [helm-docs v1.14.2](https://github.com/norwoodj/helm-docs/releases/v1.14.2) +Autogenerated from chart metadata using [helm-docs v1.13.1](https://github.com/norwoodj/helm-docs/releases/v1.13.1) diff --git a/licenses.html b/licenses.html index 67a2901d9a..3b497f5e45 100644 --- a/licenses.html +++ b/licenses.html @@ -6122,6 +6122,7 @@

Used by:

  • erased-serde
  • ghost
  • itoa
  • +
  • libc
  • linkme
  • paste
  • prettyplease
  • @@ -6138,6 +6139,7 @@

    Used by:

  • serde_path_to_error
  • serde_qs
  • serde_urlencoded
  • +
  • syn
  • thiserror
  • thiserror-impl
  • unicode-ident
  • @@ -12603,7 +12605,6 @@

    Used by:

  • graphql_query_derive
  • http-serde
  • ident_case
  • -
  • libc
  • libssh2-sys
  • linkme-impl
  • md5
  • @@ -12611,7 +12612,6 @@

    Used by:

  • prost
  • rhai_codegen
  • siphasher
  • -
  • syn
  • system-configuration
  • system-configuration-sys
  • thrift
  • diff --git a/scripts/install.sh b/scripts/install.sh index a987f38bfa..4403b9866e 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -11,7 +11,7 @@ BINARY_DOWNLOAD_PREFIX="https://github.com/apollographql/router/releases/downloa # Router version defined in apollo-router's Cargo.toml # Note: Change this line manually during the release steps. -PACKAGE_VERSION="v1.59.0-rc.0" +PACKAGE_VERSION="v1.59.0" download_binary() { downloader --check