-
Notifications
You must be signed in to change notification settings - Fork 46
chore(deps): update ghcr.io/apollographql/router docker tag to v1.61.12 #792
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
Open
renovate
wants to merge
1
commit into
main
Choose a base branch
from
renovate/apollo-graphql-packages
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
auto-merge was automatically disabled
February 11, 2025 02:00
Pull request was closed
8ef54e6 to
51c432d
Compare
auto-merge was automatically disabled
February 13, 2025 22:05
Pull request was closed
51c432d to
6cc4081
Compare
auto-merge was automatically disabled
February 14, 2025 12:40
Pull request was closed
7f826d2 to
6cc4081
Compare
auto-merge was automatically disabled
February 18, 2025 03:15
Pull request was closed
df8daa9 to
6cc4081
Compare
auto-merge was automatically disabled
October 19, 2025 09:12
Pull request was closed
22fe4a4 to
237414c
Compare
237414c to
8d4b4ca
Compare
auto-merge was automatically disabled
October 29, 2025 03:05
Pull request was closed
8d4b4ca to
21a294d
Compare
auto-merge was automatically disabled
November 1, 2025 21:37
Pull request was closed
21a294d to
7bb9976
Compare
7bb9976 to
31fbe63
Compare
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.
This PR contains the following updates:
v1.59.2->v1.61.12Release Notes
apollographql/router (ghcr.io/apollographql/router)
v1.61.12Compare Source
🔒 Security
Fix authorization plugin handling of polymorphic types
Updates the auth plugin to correctly handle access control requirements when processing polymorphic types.
When querying interface types/fields, the auth plugin was verifying only whether all implementations shared the same access control requirements. In cases where interface types/fields did not specify the same access control requirements as the implementations, this could result in unauthorized access to protected data.
The auth plugin was updated to correctly verify that all polymorphic access control requirements are satisfied by the current context.
See GHSA-x33c-7c2v-mrj9 for additional details and the associated CVE number.
By @dariuszkuc
Fixed authorization plugin handling of directive renames
The router auth plugin did not properly handle access control requirements when subgraphs renamed their access control directives through imports. When such renames occurred, the plugin’s
@link-processing code ignored the imported directives entirely, causing access control constraints defined by the renamed directives to be ignored.The plugin code was updated to call the appropriate functionality in the
apollo-federationcrate, which correctly handles both because spec and imports directive renames.See GHSA-g8jh-vg5j-4h3f for additional details and the associated CVE number.
By @sachindshinde
v1.61.11Compare Source
🚀 Features
jemalloc metrics (PR #7735)
The router adds the following new metrics when running the router on Linux with its default
global-allocatorfeature:apollo_router_jemalloc_active: Total number of bytes in active pages allocated by the application.apollo_router_jemalloc_allocated: Total number of bytes allocated by the application.apollo_router_jemalloc_mapped: Total number of bytes in active extents mapped by the allocator.apollo_router_jemalloc_metadata: Total number of bytes dedicated to metadata, which comprise base allocations used for bootstrap-sensitive allocator metadata structures and internal allocations.apollo_router_jemalloc_resident: Maximum number of bytes in physically resident data pages mapped by the allocator, comprising all pages dedicated to allocator metadata, pages backing active allocations, and unused dirty pages.apollo_router_jemalloc_retained: Total number of bytes in virtual memory mappings that were retained rather than being returned to the operating system via e.g.munmap(2)or similar.By @Velfi in #7735
🐛 Fixes
Query planning errors with progressive override on interface implementations (PR #7929)
The router now correctly generates query plans when using progressive override (
@overridewith labels) on types that implement interfaces within the same subgraph.Previously, the Rust query planner would fail to generate plans for these scenarios with the error
"Was not able to find any options for {}: This shouldn't have happened.", while the JavaScript planner handled them correctly.This fix resolves planning failures when your schema uses:
These will now successfully plan and execute.
By @TylerBloom in #7929
WebSocket connection cleanup for subscriptions (PR #8104)
WebSocket connections to subgraphs now close properly when all client subscriptions end, preventing unnecessary resource usage.
Previously, connections could remain open after clients disconnected, not being cleaned up until a new event was received. The router now tracks active subscriptions and closes the subgraph connection when the last client disconnects, ensuring efficient resource management.
By @bnjjj in #8104
Reduce log level for interrupted WebSocket streams (PR #8344)
The router now logs interrupted WebSocket streams at
tracelevel instead oferrorlevel.Previously, WebSocket stream interruptions logged at
errorlevel, creating excessive noise in logs when clients disconnected normally or networks experienced transient issues. Client disconnections and network interruptions are expected operational events that don't require immediate attention.Your logs will now be cleaner and more actionable, making genuine errors easier to spot. You can enable
tracelevel logging when debugging WebSocket connection issues.By @bnjjj in #8344
Connection shutdown race condition during hot reload (PR #8169)
The router now reliably terminates all connections during hot reload, preventing out-of-memory errors from multiple active pipelines.
A race condition during hot reload occasionally left connections in an active state instead of terminating. Connections that are opening during shutdown now immediately terminate, maintaining stable memory usage through hot reloads.
By @BrynCooke in #8169
v1.61.10Compare Source
🐛 Fixes
Fix deduplicated subscriptions hanging when one subscription closes (PR #7879)
Fixes a regression introduced in v1.50.0. When multiple client subscriptions are deduped onto a single subgraph subscription in WebSocket passthrough mode, and the first client subscription closes, the Router would close the subgraph subscription. The other deduplicated subscriptions would then silently stop receiving events.
Now outgoing subscriptions to subgraphs are kept open as long as any client subscription uses them.
By @bnjjj in #7879
v1.61.9Compare Source
🐛 Fixes
Coprocessor: improve handling of invalid GraphQL responses with conditional validation (PR #7731)
The router was creating invalid GraphQL responses internally, especially when subscriptions terminate. When a coprocessor is configured, it validates all responses for correctness, causing errors to be logged when the router generates invalid internal responses. This affects the reliability of subscription workflows with coprocessors.
Fix handling of invalid GraphQL responses returned from coprocessors, particularly when used with subscriptions. Added conditional response validation and improved testing to ensure correctness. Added the
response_validationconfiguration option at the coprocessor level to enable the response validation (by default it's enabled).By @BrynCooke in #7731
Fix several hot reload issues with subscriptions (PR #7746)
When a hot reload is triggered by a configuration change, the router attempted to apply updated configuration to open subscriptions. This could cause excessive logging.
When a hot reload was triggered by a schema change, the router closed subscriptions with a
SUBSCRIPTION_SCHEMA_RELOADerror. This happened before the new schema was fully active and warmed up, so clients could reconnect to the old schema, which should not happen.To fix these issues, a configuration and a schema change now have the same behavior. The router waits for the new configuration and schema to be active, and then closes all subscriptions with a
SUBSCRIPTION_SCHEMA_RELOAD/SUBSCRIPTION_CONFIG_RELOADerror, so clients can reconnect.By @goto-bus-stop and @bnjjj in #7777
v1.61.8Compare Source
🐛 Fixes
Set a valid GraphQL response for websocket handshake response (PR #7680)
Since this PR we added more checks on graphql response returned by coprocessors to be compliant with GraphQL specs. When it's a subscription using websocket it was not returning any data and so was not a correct GraphQL response payload. This is a fix to always return valid GraphQL response when doing the websocket handshake.
By @bnjjj in #7680
Spans should only include path in
http.route(PR #7405)Per the OpenTelemetry spec, the
http.routeshould only include "the matched route, that is, the path template used in the format used by the respective server framework."The router currently sends the full URI in
http.route, which can be high cardinality (ie/graphql?operation=one_of_many_values). After this change, the router will only include the path (/graphql).By @carodewig in #7405
🔍 Debuggability
Add
graphql.operation.nameattribute toapollo.router.opened.subscriptionscounter (PR #7606)The
apollo.router.opened.subscriptionsmetric has angraphql.operation.nameattribute applied to identify the named operation of subscriptions which are still open.By @bnjjj in #7606
v1.61.7Compare Source
🔍 Debuggability
Log whether safe-listing enforcement was skipped (Issue #7509)
When logging unknown operations encountered during safe-listing, include information about whether enforcement was skipped. This will help distinguish between truly problematic external operations (where
enforcement_skippedis false) and internal operations that are intentionally allowed to bypass safelisting (whereenforcement_skippedis true).By @DaleSeo in #7509
v1.61.6Compare Source
🐛 Fixes
Fix JWT metrics discrepancy (PR #7258)
This fixes the
apollo.router.operations.authentication.jwtcounter metric to behave as documented: emitted for every request that uses JWT, with theauthentication.jwt.failedattribute set to true or false for failed or successful authentication.Previously, it was only used for failed authentication.
The attribute-less and accidentally-differently-named
apollo.router.operations.jwtcounter was and is only emitted for successful authentication, but is deprecated now.By @SimonSapin in #7258
Fix Redis connection leak (PR #7319)
The router performs a 'hot reload' whenever it detects a schema update. During this reload, it effectively instantiates a new internal router, warms it up (optional), redirects all traffic to this new router, and drops the old internal router.
This change fixes a bug in that drop process where the Redis connections are never told to terminate, even though the Redis client pool is dropped. This leads to an ever-increasing number of inactive Redis connections, which eats up memory.
It also adds a new up-down counter metric,
apollo.router.cache.redis.connections, to track the number of open Redis connections. This metric includes akindlabel to discriminate between different Redis connection pools, which mirrors thekindlabel on other cache metrics (ieapollo.router.cache.hit.time).By @carodewig in #7319
Fix Parsing of Coprocessor GraphQL Responses (PR #7141)
Previously Router ignored
data: nullproperty inside GraphQL response returned by coprocessor.According to GraphQL Spectification:
That means if coprocessor returned valid execution error, for example:
{ "data": null, "errors": [{ "message": "Some execution error" }] }Router violated above restriction from GraphQL Specification by returning following response to client:
{ "errors": [{ "message": "Some execution error" }] }This fix ensures full compliance with the GraphQL specification by preserving the complete structure of error responses from coprocessors.
Contributed by @IvanGoncharov in #7141
Avoid fractional decimals when generating
apollo.router.operations.batching.sizemetrics for GraphQL request batch sizes (PR #7306)Correct the calculation of the
apollo.router.operations.batching.sizemetric to reflect accurate batch sizes rather than occasionally returning fractional numbers.By @bnjjj in #7306
📃 Configuration
Add configurable server header read timeout (PR #7262)
This change exposes the server's header read timeout as the
server.http.header_read_timeoutconfiguration option.By default, the
server.http.header_read_timeoutis set to previously hard-coded 10 seconds. A longer timeout can be configured using theserver.http.header_read_timeoutoption.By @gwardwell in #7262
🛠 Maintenance
Reject
@skip/@includeon subscription root fields in validation (PR #7338)This implements a GraphQL spec RFC, rejecting subscriptions in validation that can be invalid during execution.
By @goto-bus-stop in #7338
v1.61.5Compare Source
🔍 Debuggability
Add compute job pool spans (PR #7236)
The compute job pool in the router is used to execute CPU intensive work outside of the main I/O worker threads, including GraphQL parsing, query planning, and introspection.
This PR adds spans to jobs that are on this pool to allow users to see when latency is introduced due to
resource contention within the compute job pool.
compute_job:job.type: (query_parsing|query_planning|introspection)compute_job.executionjob.age:P1-P8job.type: (query_parsing|query_planning|introspection)Jobs are executed highest priority (
P8) first. Jobs that are low priority (P1) age over time, eventually executingat highest priority. The age of a job is can be used to diagnose if a job was waiting in the queue due to other higher
priority jobs also in the queue.
By @bryncooke in #7236
Add compute job pool metrics (PR #7184)
The compute job pool in the router is used to execute CPU intensive work outside of the main I/O worker threads, including GraphQL parsing, query planning, and introspection.
When this pool becomes saturated it is difficult for users to see why so that they can take action.
This change adds new metrics to help users understand how long jobs are waiting to be processed.
New metrics:
apollo.router.compute_jobs.queue_is_full- A counter of requests rejected because the queue was full.apollo.router.compute_jobs.duration- A histogram of time spent in the compute pipeline by the job, including the queue and query planning.job.type: (query_planning,query_parsing,introspection)job.outcome: (executed_ok,executed_error,channel_error,rejected_queue_full,abandoned)apollo.router.compute_jobs.queue.wait.duration- A histogram of time spent in the compute queue by the job.job.type: (query_planning,query_parsing,introspection)apollo.router.compute_jobs.execution.duration- A histogram of time spent to execute job (excludes time spent in the queue).job.type: (query_planning,query_parsing,introspection)apollo.router.compute_jobs.active_jobs- A gauge of the number of compute jobs being processed in parallel.job.type: (query_planning,query_parsing,introspection)By @carodewig in #7184
🐛 Fixes
Fix hanging requests when compute job queue is full (PR #7273)
The compute job pool in the router is used to execute CPU intensive work outside of the main I/O worker threads, including GraphQL parsing, query planning, and introspection. When the pool is busy, jobs enter a queue.
When the compute job queue was full, requests could hang until timeout. Now, the router immediately returns a
SERVICE_UNAVAILABLEresponse to the user.By @BrynCooke in #7273
Increase compute job pool queue size (PR #7205)
The compute job pool in the router is used to execute CPU intensive work outside of the main I/O worker threads, including GraphQL parsing, query planning, and introspection. When the pool is busy, jobs enter a queue.
We previously set this queue size to 20 (per thread). However, this may be too small on resource constrained environments.
This patch increases the queue size to 1,000 jobs per thread. For reference, in older router versions before the introduction of the compute job worker pool, the equivalent queue size was 1,000.
By @goto-bus-stop in #7205
v1.61.4Compare Source
🐛 Fixes
Entity-cache: handle multiple key directives (PR #7228)
This PR fixes a bug in entity caching introduced by the fix in #6888 for cases where several
@keydirectives with different fields were declared on a type as documented here.For example if you have this kind of entity in your schema:
By @duckki & @bnjjj in #7228
v1.61.3Compare Source
🐛 Fixes
Fix potential telemetry deadlock (PR #7142)
The
tracing_subscribercrate usesRwLocks to manage access to aSpan'sExtensions. Deadlocks are possible whenmultiple threads access this lock, including with reentrant locks:
This fix removes an opportunity for reentrant locking while extracting a Datadog identifier.
There is also a potential for deadlocks when the root and active spans'
Extensionsare acquired at the same time, ifmultiple threads are attempting to access those
Extensionsbut in a different order. This fix removes a few caseswhere multiple spans'
Extensionsare acquired at the same time.By @carodewig in #7142
Connection shutdown timeout (PR #7058)
When a connection is closed we call
graceful_shutdownon hyper and then await for the connection to close.Hyper 0.x has various issues around shutdown that may result in us waiting for extended periods for the connection to eventually be closed.
This PR introduces a configurable timeout from the termination signal to actual termination, defaulted to 60 seconds. The connection is forcibly terminated after the timeout is reached.
To configure, set the option in router yaml. It accepts human time durations:
Note that even after connections have been terminated the router will still hang onto pipelines if
early_cancelhas not been configured to true. The router is trying to complete the request.Users can either set
early_canceltotrueAND/OR use traffic shaping timeouts:
By @BrynCooke in #7058
Fix crash when an invalid query plan is generated (PR #7214)
When an invalid query plan is generated, the router could panic and crash.
This could happen if there are gaps in the GraphQL validation implementation.
Now, even if there are unresolved gaps, the router will handle it gracefully and reject the request.
By @goto-bus-stop in #7214
Improve Error Message for Invalid JWT Header Values (PR #7121)
Enhanced parsing error messages for JWT Authorization header values now provide developers with clear, actionable feedback while ensuring that no sensitive data is exposed.
Examples of the updated error messages:
By @IvanGoncharov in #7121
v1.61.2Compare Source
🔒 Security
Certain query patterns may cause resource exhaustion
Corrects a set of denial-of-service (DOS) vulnerabilities that made it possible for an attacker to render router inoperable with certain simple query patterns due to uncontrolled resource consumption. All prior-released versions and configurations are vulnerable except those where
persisted_queries.enabled,persisted_queries.safelist.enabled, andpersisted_queries.safelist.require_idare alltrue.See the associated GitHub Advisories GHSA-3j43-9v8v-cp3f, GHSA-84m6-5m72-45fp, GHSA-75m2-jhh5-j5g2, and GHSA-94hh-jmq8-2fgp, and the
apollo-compilerGitHub Advisory GHSA-7mpv-9xg6-5r79 for more information.By @sachindshinde and @goto-bus-stop.
v1.61.1Compare Source
🐛 Fixes
Use correct default values on omitted OTLP endpoints (PR #6931)
Previously, when the configuration didn't specify an OTLP endpoint, the Router would always default to
http://localhost:4318. However, port4318is the correct default only for the HTTP protocol, while port4317should be used for gRPC.Additionally, all other telemetry defaults in the Router configuration consistently use
127.0.0.1as the hostname rather thanlocalhost.With this change, the Router now uses:
http://127.0.0.1:4317as the default for gRPC protocolhttp://127.0.0.1:4318as the default for HTTP protocolThis ensures protocol-appropriate port defaults and consistent hostname usage across all telemetry configurations.
By @IvanGoncharov in #6931
Separate entity keys and representation variables in entity cache key (Issue #6673)
This fix separates the entity keys and representation variable values in the cache key, to avoid issues with
@requiresfor example.By @bnjjj in #6888
🔒 Security
Add
batching.maximum_sizeconfiguration option to limit maximum client batch size (PR #7005)Add an optional
maximum_sizeparameter to the batching configuration.maximum_sizequeries in the client batch.If the number of queries provided exceeds the maximum batch size, the entire batch fails with error code 422 (
Unprocessable Content). For example:{ "errors": [ { "message": "Invalid GraphQL request", "extensions": { "details": "Batch limits exceeded: you provided a batch with 3 entries, but the configured maximum router batch size is 2", "code": "BATCH_LIMIT_EXCEEDED" } } ] }By @carodewig in #7005
🔍 Debuggability
Add
apollo.router.pipelinesmetrics (PR #6967)When the router reloads, either via schema change or config change, a new request pipeline is created.
Existing request pipelines are closed once their requests finish. However, this may not happen if there are ongoing long requests that do not finish, such as Subscriptions.
To enable debugging when request pipelines are being kept around, a new gauge metric has been added:
apollo.router.pipelines- The number of request pipelines active in the routerschema.id- The Apollo Studio schema hash associated with the pipeline.launch.id- The Apollo Studio launch id associated with the pipeline (optional).config.hash- The hash of the configurationBy @BrynCooke in #6967
Add
apollo.router.open_connectionsmetric (PR #7023)To help users to diagnose when connections are keeping pipelines hanging around, the following metric has been added:
apollo.router.open_connections- The number of request pipelines active in the routerschema.id- The Apollo Studio schema hash associated with the pipeline.launch.id- The Apollo Studio launch id associated with the pipeline (optional).config.hash- The hash of the configuration.server.address- The address that the router is listening on.server.port- The port that the router is listening on if not a unix socket.http.connection.state- Eitheractiveorterminating.You can use this metric to monitor when connections are open via long running requests or keepalive messages.
By @BrynCooke in #7009
v1.61.0: - LTSCompare Source
To find out more about our maintenance and support policy, please refer to our docs
🚀 Features
Query planner dry-run option (PR #6656)
This PR adds a new
dry-runoption to theApollo-Expose-Query-Planheader value that emits the query plans back to Studio for visualizations. This new value will only emit the query plan, and abort execution. This can be helpful for tools likerover, where query plan generation is needed but not full runtime, or for potentially prewarming query plan caches out of band.curl --request POST --include \ --header 'Accept: application/json' \ --header 'Apollo-Expose-Query-Plan: dry-run' \ --url 'http://127.0.0.1:4000/' \ --data '{"query": "{ topProducts { upc name } }"}'By @aaronArinder and @lennyburdette in #6656.
Enable Remote Proxy Downloads
This enables users without direct download access to specify a remote proxy mirror location for the github download of
the Apollo Router releases.
By @LongLiveCHIEF in #6667
🐛 Fixes
Header propagation rules passthrough (PR #6690)
Header propagation contains logic to prevent headers from being propagated more than once. This was broken
in #6281 which always considered a header propagated regardless if a rule
actually matched.
This PR alters the logic so that a header is marked as fixed only when it's populated.
The following will now work again:
Note that defaulting a header WILL populate it, so make sure to include your defaults last in your propagation
rules.
Instead, make sure that your headers are defaulted last:
By @BrynCooke in #6690
Entity cache: fix directive conflicts in cache-control header (Issue #6441)
Unnecessary cache-control directives are created in cache-control header. The router will now filter out unnecessary values from the
cache-controlheader when the request resolves. So if there'smax-age=10, no-cache, must-revalidate, no-store, the expected value for the cache-control header would simply beno-store. Please see the MDN docs for justification of this reasoning: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control#preventing_storingBy @bnjjj in #6543
Query Planning: fix
__typenameselections in sibling typename optimizationThe query planner uses an optimization technique called "sibling typename", which attaches
__typenameselections to their sibling selections so the planner won't need to plan them separately.Previously, when there were multiple identical selections and one of them has a
__typenameattached, the query planner could pick the one without the attachment, effectively losing a__typenameselection.Now, the query planner favors the one with a
__typenameattached without losing the__typenameselection.By @duckki in #6824
📃 Configuration
Promote
experimental_otlp_tracing_samplerconfig to stable (PR #6070)The router's otlp tracing sampler feature that was previously experimental is now generally available.
If you used its experimental configuration, you should migrate to the new configuration option:
telemetry.apollo.experimental_otlp_tracing_sampleris nowtelemetry.apollo.otlp_tracing_samplerThe experimental configuration option is now deprecated. It remains functional but will log warnings.
By @garypen in #6070
Promote
experimental_local_manifessconfig for persisted queries to stableThe
experimental_local_manifestsPQ configuration option is being promoted to stable. This change updates the configuration option name and any references to it, as well as the related documentation. Theexperimental_usage remains valid as an alias for existing usages.By @trevor-scheer in #6564
🛠 Maintenance
Reduce demand control allocations on start/reload (PR #6754)
When demand control is enabled, the router now preallocates capacity for demand control's processed schema and shrinks to fit after processing. When it's disabled, the router skips the type processing entirely to minimize startup impact.
By @tninesling in #6754
v1.60.1Compare Source
🐛 Fixes
Header propagation rules passthrough (PR #6690)
Header propagation contains logic to prevent headers from being propagated more than once. This was broken
in #6281 which always considered a header propagated regardless if a rule
actually matched.
This PR alters the logic so that only when a header is populated then the header is marked as fixed.
The following will now work again:
Note that defaulting a head WILL populate a header, so make sure to include your defaults last in your propagation
rules.
Instead, make sure that your headers are defaulted last:
By @BrynCooke in #6690
Entity cache: fix directive conflicts in cache-control header (Issue #6441)
Unnecessary cache-control directives are created in cache-control header. The router will now filter out unnecessary values from the
cache-controlheader when the request resolves. So if there'smax-age=10, no-cache, must-revalidate, no-store, the expected value for the cache-control header would simply beno-store. Please see the MDN docs for justification of this reasoning: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control#preventing_storingBy @bnjjj in #6543
Resolve regressions in fragment compression for certain operations (PR #6651)
In v1.58.0 we introduced a new compression strategy for subgraph GraphQL operations to replace an older, more complicated algorithm.
While we were able to validate improvements for a majority of cases, some regressions still surfaced. To address this, we are extending it to compress more operations with the following outcomes:
By @dariuszkuc in #6651
v1.60.0Compare Source
🚀 Features
Improve BatchProcessor observability (Issue #6558)
A new metric has been introduced to allow observation of how many spans are being dropped by an telemetry batch processor.
apollo.router.telemetry.batch_processor.errors- The number of errors encountered by exporter batch processors.name: One ofapollo-tracing,datadog-tracing,jaeger-collector,otlp-tracing,zipkin-tracing.error= One ofchannel closed,channel full.By observing the number of spans dropped it is possible to estimate what batch processor settings will work for you.
In addition, the log message for dropped spans will now indicate which batch processor is affected.
By @bryncooke in #6558
🐛 Fixes
Improve performance of query hashing by using a precomputed schema hash (PR #6622)
The router now uses a simpler and faster query hashing algorithm with more predictable CPU and memory usage. This improvement is enabled by using a precomputed hash of the entire schema, rather than computing and hashing the subset of types and fields used by each query.
For more details on why these design decisions were made, please see the PR description
By @IvanGoncharov in #6622
Truncate invalid error paths (PR #6359)
This fix addresses an issue where the router was silently dropping subgraph errors that included invalid paths.
According to the GraphQL Specification an error path must point to a response field:
The router now truncates the path to the nearest valid field path if a subgraph error includes a path that can't be matched to a response field,
By @IvanGoncharov in #6359
Eagerly init subgraph operation for subscription primary nodes (PR #6509)
When subgraph operations are deserialized, typically from a query plan cache, they are not automatically parsed into a full document. Instead, each node needs to initialize its operation(s) prior to execution. With this change, the primary node inside SubscriptionNode is initialized in the same way as other nodes in the plan.
By @tninesling in #6509
Fix increased memory usage in
sysinfosince Router 1.59.0 (PR #6634)In version 1.59.0, Apollo Router started using the
sysinfocrate to gather metrics about available CPUs and RAM. By default, that crate usesrayoninternally to parallelize its handling of system processes. In turn, rayon creates a pool of long-lived threads.In a particular benchmark on a 32-core Linux server, this caused resident memory use to increase by about 150 MB. This is likely a combination of stack space (which only gets freed when the thread terminates) and per-thread space reserved by the heap allocator to reduce cross-thread synchronization cost.
This regression is now fixed by:
sysinfo’s use ofrayon, so the thread pool is not created and system processes information is gathered in a sequential loop.sysinfonot gather that information in the first place since Router does not use it.By @SimonSapin in #6634
Optimize demand control lookup (PR #6450)
The performance of demand control in the router has been optimized.
Previously, demand control could reduce router throughput due to its extra processing required for scoring.
This fix improves performance by shifting more data to be computed at plugin initialization and consolidating lookup queries:
By @tninesling in #6450
Fix missing Content-Length header in subgraph requests (Issue #6503)
A change in
1.59.0caused the Router to send requests to subgraphs without aContent-Lengthheader, which would cause issues with some GraphQL servers that depend on that header.This solves the underlying bug and reintroduces the
Content-Lengthheader.By @nmoutschen in #6538
🛠 Maintenance
Remove the legacy query planner (PR #6418)
The legacy query planner has been removed in this release. In the previous release, router v1.58, it was no longer used by default but was still available through the
experimental_query_planner_modeconfiguration key. That key is now removed.Also removed are configuration keys which were only relevant to the legacy planner:
supergraph.query_planning.experimental_parallelism: the new planner can always use available parallelism.supergraph.experimental_reuse_query_fragments: this experimental algorithm that attempted toreuse fragments from the original operation while forming subgraph requests is no longer present. Instead, by default new fragment definitions are generated based on the shape of the subgraph operation.
By @SimonSapin in #6418
Migrate various metrics to OTel instruments (PR #6476, PR #6356, PR #6539)
Various metrics using our legacy mechanism based on the
tracingcrate are migrated to OTel instruments.By @goto-bus-stop in #6476, #6356, #6539
📚 Documentation
Add instrumentation configuration examples (PR #6487)
The docs for router telemetry have new example configurations for common use cases for selectors and condition.
By @shorgi in #6487
🧪 Experimental
Remove experimental_retry option (PR #6338)
The
experimental_retryoption has been removed due to its limited use and functionality during its experimental phase.By @bnjjj in #6338
Configuration
📅 Schedule: Branch creation - At 12:00 AM through 04:59 AM and 10:00 PM through 11:59 PM, Monday through Friday ( * 0-4,22-23 * * 1-5 ), Only on Sunday and Saturday ( * * * * 0,6 ) (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.