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.
🚀 Features
add a metric tracking coprocessor latency (Issue #2924)
Introduces a new metric for the router:
It has one attributes:
It is a histogram metric tracking the time spent calling into the coprocessor
By @Geal in #3513
Configure AWS sigv4 authentication for subgraph requests (PR #3365)
Secure your router to subgraph communication on AWS using Signature Version 4 (Sigv4)!
This changeset provides you with a way to set up hardcoded credentials, as well as a default provider chain.
We recommend using the default provider chain configuration.
Full use example:
The full documentation can be found in the router documentation.
By @o0Ignition0o and @BlenderDude in #3365
Helm: add init containers to deployemt (Issue #3248)
This is a new option when starting the router, so that before starting another container runs and performs necessary tasks.
By @laszlorostas in #3444
🐛 Fixes
Require the main (GraphQL) route to shutdown before other routes (Issue #3521)
This changes router execution so that there is more control over the sequencing of server shutdown. In particular, this modifies how different routes are shutdown so that the main (GraphQL) route is shutdown before other routes are shutdown. Prior to this change all routes shut down in parallel and this would mean that, for example, health checks stopped responding prematurely.
This is particularly undesirable when the router is executing in Kubernetes, since continuing to report live/ready checks during shutdown is a requirement.
By @garypen in #3557
Fix redis reconnections (Issue #3045)
The reconnection policy was using an exponential backoff delay with a maximum number of attempts. Once that maximum is reached, reconnection was never tried again (there's no baseline retry). We change that behaviour by adding infinite retries with a maximum delay of 2 seconds, and a timeout of 1 millisecond on redis commands, so that the router can continue serving requests in the meantime.
This commit contains additional fixes:
SubSelectionKey
: this type is used as key in aHashMap
, which is converted to a JSON object, and object keys must be strings, so a specific serializer is needed instead of the derived oneBy @Geal in #3509
Close the subscription when a new schema has been detected during hot reload (Issue #3320)
Router hot reloads on schema updates didn't close running subscriptions, which could imply out of date query plans.
This changeset allows the router to signal clients that a
SUBSCRIPTION_SCHEMA_RELOAD
happened, and close the running subscription, so the clients can subscribe again:By @bnjjj in #3341
Fix: handle ping/pong websocket messages before the Ack message is received. (PR #3562)
Websocket servers will sometimes send Ping() messages before they Ack the connection initialization. This changeset allows the router to send Pong() messages, while still waiting until either
CONNECTION_ACK_TIMEOUT
elapsed, or the server successfully Acked the websocket connection start.By @o0Ignition0o in #3562
Fix the error count for subscription requests for apollo telemetry (PR #3500)
Count subscription requests only if the feature is enabled.
The router would previously count subscription requests regardless of whether the feature is enabled or not. This changeset will only count subscription requests if the feature has been enabled.
By @bnjjj in #3500
🛠 Maintenance
Update datadog-subgraph npm dependencies (PR #3560)
This changeset updates the dd-trace dependency and the nodeJS version of the example Dockerfile.
By @o0Ignition0o in #3560
Remove some panic! calls from the pq code. (PR #3527)
Replace a few
panic!
calls withexpect()
in the persisted query code for code clarity.By @BrynCooke in #3527
Add a warning if we think istio-proxy injection is causing problems (Issue #3533)
We have encountered situations where the injection of istio-proxy in a router pod (executing in Kubernetes) causes networking errors during uplink retrieval.
The root cause is that the router is executing and attempting to retrieve uplink schemas while the istio-proxy is simultaneously modifying network configuration.
This new warning message directs users to information which should help them to configure their Kubernetes cluster or pod to avoid this problem.
By @garypen in #3545
Add a message to the logs indicating when custom plugins are detected and there is a possibility that log entries may be silenced (Issue #3526)
Since #3477, users who have created custom plugins no longer see their log entries.
This is because the default logging filter now restricts log entries to those that are in the apollo module.
Users that have custom plugins will need to configure the logging filter to include their modules, but they may not realise this.
Now, if a custom plugin is detected then a message will be logged to the console indicating that the logging filter may need to be configured.
By @BrynCooke in #3540
Parent based sampling tests (PR #3136)
This adds test for OpenTelemetry sampling defined either in the configuration or in headers carried by the request
By @Geal in #3136
📚 Documentation
Document the Redis URL format (Issue #3534)
The Redis client used in the Router follows a convention on Redis server URLs to indicate TLS, cluster or sentinel usage
By @Geal in #3556
Document the request lifecycle (PR #3391)
This adds in-depth documentation of:
By @Geal @Meschreiber in #3391
document TLS termination and subgraph override (Issue #3100)
TLS termination was added in #2614 but never documented, and subgraph certificate override was added in #2008 but the documentation was missing some details on self signed certificates.
By @Geal in #3436
self is immutable in the Plugin trait's methods (Issue #3539)
The Native customizations section of the docs was wrongly portraying Plugin services taking
&mut self
while they take&self
.The doc is now up to date.
By @Geal in #3555