Merged
Conversation
Collaborator
|
bnjjj
approved these changes
May 6, 2025
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.
🐛 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