Merged
Conversation
Collaborator
✅ Docs Preview ReadyNo new or changed pages found. |
|
CI performance tests
|
garypen
reviewed
Dec 16, 2024
BrynCooke
commented
Dec 16, 2024
garypen
previously approved these changes
Dec 16, 2024
lrlna
requested changes
Dec 16, 2024
Member
lrlna
left a comment
There was a problem hiding this comment.
blocking for a little bit while I fix the changelog - i don't think dropping an experimental_ feature is a breaking change.
lrlna
reviewed
Dec 16, 2024
lrlna
reviewed
Dec 16, 2024
…ixes" changelog section
lrlna
reviewed
Dec 17, 2024
lrlna
previously approved these changes
Dec 17, 2024
garypen
previously approved these changes
Dec 17, 2024
lrlna
reviewed
Dec 17, 2024
BrynCooke
commented
Dec 17, 2024
Co-authored-by: Iryna Shestak <shestak.irina@gmail.com>
garypen
approved these changes
Dec 17, 2024
lrlna
approved these changes
Dec 17, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
[1.59.0] - 2024-12-17
Important
If you have enabled 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 and enabled by default.
The native query planner achieves better performance for a variety of graphs. In our tests, we observe:
apollo.router.query_planning.plan.duration)The native query planner supports Federation v2 supergraphs. If you are using Federation v1 today, see our migration guide 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:
By @sachindshinde,
@goto-bus-stop,
@duckki,
@TylerBloom,
@SimonSapin,
@dariuszkuc,
@lrlna, @clenfest,
and @o0Ignition0o.
Ability to skip persisted query list safelisting enforcement via plugin (PR #6403)
If safelisting is enabled, a
router_serviceplugin can skip enforcement of the safelist (including therequire_idcheck) by adding the keyapollo_persisted_queries::safelist::skip_enforcementwith valuetrueto the request context.In cases where an operation would have been denied but is allowed due to the context key existing, the attribute
persisted_queries.safelist.enforcement_skippedis set on theapollo.router.operations.persisted_queriesmetric with valuetrue.By @glasser in #6403
Add fleet awareness plugin (PR #6151)
A new
fleet_awarenessplugin 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.
By @jonathanrainer, @nmoutschen, @loshz
in #6151
Add fleet awareness schema metric (PR #6283)
The router now supports the
apollo.router.instance.schemametric for itsfleet_detectorplugin. It has two attributes:schema_hashandlaunch_id.By @loshz and @nmoutschen in #6283
Support client name for persisted query lists (PR #6198)
The persisted query manifest fetched from Apollo Uplink can now contain a
clientNamefield in each operation. Two operations with the sameidbut differentclientNameare 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:
apollo_persisted_queries::client_namecontext key that may be set by arouter_serviceplugintelemetry.apollo.client_name_header, which defaults toapollographql-client-nameIf 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 docs.
By @glasser in #6198
🐛 Fixes
Fix coprocessor empty body object panic (PR #6398)
Previously, the router would panic if a coprocessor responds with an empty body object at the supergraph stage:
{ ... // other fields "body": {} // empty object }This has been fixed in this release.
By @BrynCooke in #6398
Ensure cost directives are picked up when not explicitly imported (PR #6328)
With the recent composition changes, importing
@costresults in a supergraph schema with the cost specification import at the top. The@costdirective itself is not explicitly imported, as it's expected to be available as the default export from the cost link. In contrast, uses of@listSizeto translate to an explicit import in the supergraph.Old SDL link
New SDL link
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 in #6328
Fix query hashing algorithm (PR #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 in #6205
Fix typo in persisted query metric attribute (PR #6332)
The
apollo.router.operations.persisted_queriesmetric reports an attribute when a persisted query was not found.Previously, the attribute name was
persisted_quieries.not_found, with oneitoo many. Now it'spersisted_queries.not_found.By @goto-bus-stop in #6332
Fix telemetry instrumentation using supergraph query selector (PR #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:
By @bnjjj in #6324
More consistent attributes on
apollo.router.operations.persisted_queriesmetric (PR #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.unknownattribute on the metric. Previously, this attribute had the valuetrueif the operation is logged (vialog_unknown), andfalseif 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 thepersisted_queries.loggedattribute.Router now only sets this attribute to true, and never to false. Note these metrics are unstable and will continue to change.
By @glasser in #6403
Drop experimental reuse fragment query optimization option (PR #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 in #6353
📃 Configuration
Add version number to distributed query plan cache keys (PR #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, expect additional processing for your cache to update for this router release.
By @SimonSapin in #6406
🛠 Maintenance
Remove catch_unwind wrapper around the native query planner (PR #6397)
As part of internal maintenance of the query planner, the
catch_unwindwrapper around the native query planner has been removed. This wrapper served as an extra safeguard for potential panics the native planner could produce. Thenative 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 in #6397
Deprecate various metrics (PR #6350)
Several metrics have been deprecated in this release, in favor of OpenTelemetry-compatible alternatives:
apollo_router_deduplicated_subscriptions_total- use theapollo.router.operations.subscriptionsmetric'ssubscriptions.deduplicatedattribute.apollo_authentication_failure_count- use theapollo.router.operations.authentication.jwtmetric'sauthentication.jwt.failedattribute.apollo_authentication_success_count- use theapollo.router.operations.authentication.jwtmetric instead. If theauthentication.jwt.failedattribute is absent orfalse, the authentication succeeded.apollo_require_authentication_failure_count- use thehttp.server.request.durationmetric'shttp.response.status_codeattribute. 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 thehttp.response.status_codeattribute on thehttp.server.request.durationmetric to identify timed-out router requests, and the same attribute on thehttp.client.request.durationmetric to identify timed-out subgraph requests.The deprecated metrics will continue to work in the 1.x release line.
By @goto-bus-stop in #6350