From d523de3de3603fb075779285149f4f5a5a5e01d7 Mon Sep 17 00:00:00 2001 From: o0Ignition0o Date: Fri, 18 Aug 2023 11:07:33 +0200 Subject: [PATCH 01/12] prep release: v1.27.0 --- .../docs_geal_document_request_lifecycle.md | 9 - .changesets/docs_geal_document_tls.md | 5 - .changesets/docs_geal_plugin_doc_fix.md | 4 - .../docs_geal_redis_connection_schemes.md | 6 - .changesets/feat_add_helm_init_containers.md | 5 - ...eat_add_lifecycle_support_to_helm_chart.md | 5 - .../feat_geal_coprocessor_latency_metric.md | 17 - .../feat_geal_supergraph_coprocessor.md | 5 - .changesets/feat_igni_subgraph_auth.md | 34 -- .../fix_bnjjj_fix_subscription_metrics.md | 7 - .../fix_garypen_3521_keep_listening.md | 7 - .changesets/fix_geal_redis_fixes.md | 9 - ...gni_safely_deal_with_invalid_redis_keys.md | 6 - ...x_igni_subscriptions_subgraph_ping_pong.md | 5 - .changesets/fix_porch_pulse_bloody_receipt.md | 21 - .../fix_spelling_content_negotiation.md | 5 - .../maint_contract_fiancee_ark_grey.md | 5 - .changesets/maint_garypen_3533_istio_warn.md | 9 - .../maint_geal_parent_based_sampling_test.md | 5 - ...t_igni_dockerfiles_datadog_dependencies.md | 5 - .../maint_rhubarb_waterfront_notebook.md | 10 - CHANGELOG.md | 217 +++++++++ Cargo.lock | 6 +- apollo-router-benchmarks/Cargo.toml | 2 +- apollo-router-scaffold/Cargo.toml | 2 +- .../templates/base/Cargo.toml | 2 +- .../templates/base/xtask/Cargo.toml | 2 +- apollo-router/Cargo.toml | 2 +- .../tracing/docker-compose.datadog.yml | 2 +- dockerfiles/tracing/docker-compose.jaeger.yml | 2 +- dockerfiles/tracing/docker-compose.zipkin.yml | 2 +- docs/source/containerization/docker.mdx | 2 +- docs/source/containerization/kubernetes.mdx | 31 +- helm/chart/router/Chart.yaml | 4 +- helm/chart/router/README.md | 8 +- licenses.html | 424 +++++++++++++++++- scripts/install.sh | 2 +- 37 files changed, 667 insertions(+), 227 deletions(-) delete mode 100644 .changesets/docs_geal_document_request_lifecycle.md delete mode 100644 .changesets/docs_geal_document_tls.md delete mode 100644 .changesets/docs_geal_plugin_doc_fix.md delete mode 100644 .changesets/docs_geal_redis_connection_schemes.md delete mode 100644 .changesets/feat_add_helm_init_containers.md delete mode 100644 .changesets/feat_add_lifecycle_support_to_helm_chart.md delete mode 100644 .changesets/feat_geal_coprocessor_latency_metric.md delete mode 100644 .changesets/feat_geal_supergraph_coprocessor.md delete mode 100644 .changesets/feat_igni_subgraph_auth.md delete mode 100644 .changesets/fix_bnjjj_fix_subscription_metrics.md delete mode 100644 .changesets/fix_garypen_3521_keep_listening.md delete mode 100644 .changesets/fix_geal_redis_fixes.md delete mode 100644 .changesets/fix_igni_safely_deal_with_invalid_redis_keys.md delete mode 100644 .changesets/fix_igni_subscriptions_subgraph_ping_pong.md delete mode 100644 .changesets/fix_porch_pulse_bloody_receipt.md delete mode 100644 .changesets/fix_spelling_content_negotiation.md delete mode 100644 .changesets/maint_contract_fiancee_ark_grey.md delete mode 100644 .changesets/maint_garypen_3533_istio_warn.md delete mode 100644 .changesets/maint_geal_parent_based_sampling_test.md delete mode 100644 .changesets/maint_igni_dockerfiles_datadog_dependencies.md delete mode 100644 .changesets/maint_rhubarb_waterfront_notebook.md diff --git a/.changesets/docs_geal_document_request_lifecycle.md b/.changesets/docs_geal_document_request_lifecycle.md deleted file mode 100644 index c6e6ba536a..0000000000 --- a/.changesets/docs_geal_document_request_lifecycle.md +++ /dev/null @@ -1,9 +0,0 @@ -### Document the request lifecycle ([PR #3391](https://github.com/apollographql/router/pull/3391)) - -This adds in-depth documentation of: -- the entire request lifecycle -- which services exist in the router -- the request and response types they use -- where plugins can attach themselves - -By [@Geal](https://github.com/Geal) [@Meschreiber](https://github.com/Meschreiber) in https://github.com/apollographql/router/pull/3391 diff --git a/.changesets/docs_geal_document_tls.md b/.changesets/docs_geal_document_tls.md deleted file mode 100644 index a25dabc585..0000000000 --- a/.changesets/docs_geal_document_tls.md +++ /dev/null @@ -1,5 +0,0 @@ -### document TLS termination and subgraph override ([Issue #3100](https://github.com/apollographql/router/issues/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](https://github.com/Geal) in https://github.com/apollographql/router/pull/3436 \ No newline at end of file diff --git a/.changesets/docs_geal_plugin_doc_fix.md b/.changesets/docs_geal_plugin_doc_fix.md deleted file mode 100644 index 46552bb5b6..0000000000 --- a/.changesets/docs_geal_plugin_doc_fix.md +++ /dev/null @@ -1,4 +0,0 @@ -### self is immutable in the Plugin trait's methods ([Issue #3539](https://github.com/apollographql/router/issues/3539)) - - -By [@Geal](https://github.com/Geal) in https://github.com/apollographql/router/pull/3555 \ No newline at end of file diff --git a/.changesets/docs_geal_redis_connection_schemes.md b/.changesets/docs_geal_redis_connection_schemes.md deleted file mode 100644 index b6cf9b8ee3..0000000000 --- a/.changesets/docs_geal_redis_connection_schemes.md +++ /dev/null @@ -1,6 +0,0 @@ -### Document the Redis URL format ([Issue #3534](https://github.com/apollographql/router/issues/3534)) - -The Redis client used in the Router follows a convention on Redis server URLs to indicate TLS, cluster or sentinel usage - - -By [@Geal](https://github.com/Geal) in https://github.com/apollographql/router/pull/3556 \ No newline at end of file diff --git a/.changesets/feat_add_helm_init_containers.md b/.changesets/feat_add_helm_init_containers.md deleted file mode 100644 index e5d42b65f0..0000000000 --- a/.changesets/feat_add_helm_init_containers.md +++ /dev/null @@ -1,5 +0,0 @@ -### Helm: add init containers to deployemt ([Issue #3248](https://github.com/apollographql/router/issues/3248)) - -This is a new option when starting the router, so that before starting another container runs and performs necessary tasks. - -By [@laszlorostas](https://github.com/laszlorostas) in https://github.com/apollographql/router/pull/3444 diff --git a/.changesets/feat_add_lifecycle_support_to_helm_chart.md b/.changesets/feat_add_lifecycle_support_to_helm_chart.md deleted file mode 100644 index e6049c9952..0000000000 --- a/.changesets/feat_add_lifecycle_support_to_helm_chart.md +++ /dev/null @@ -1,5 +0,0 @@ -### Helm: exposes the lifecycle object on the router container ([Issue #3563](https://github.com/apollographql/router/issues/3563)) - -You can now set the kubernetes lifecycle object on the router container in the helm chart. - -By [@bjoernw](https://github.com/bjoernw) in https://github.com/apollographql/router/pull/3570 diff --git a/.changesets/feat_geal_coprocessor_latency_metric.md b/.changesets/feat_geal_coprocessor_latency_metric.md deleted file mode 100644 index 3b46315643..0000000000 --- a/.changesets/feat_geal_coprocessor_latency_metric.md +++ /dev/null @@ -1,17 +0,0 @@ -### add a metric tracking coprocessor latency ([Issue #2924](https://github.com/apollographql/router/issues/2924)) - -Introduces a new metric for the router: - -``` -apollo.router.operations.coprocessor.duration -``` - -It has one attributes: - -``` -coprocessor.stage: string (RouterRequest, RouterResponse, SubgraphRequest, SubgraphResponse) -``` - -It is an histogram metric tracking the time spent calling into the coprocessor - -By [@Geal](https://github.com/Geal) in https://github.com/apollographql/router/pull/3513 \ No newline at end of file diff --git a/.changesets/feat_geal_supergraph_coprocessor.md b/.changesets/feat_geal_supergraph_coprocessor.md deleted file mode 100644 index 941767ef6d..0000000000 --- a/.changesets/feat_geal_supergraph_coprocessor.md +++ /dev/null @@ -1,5 +0,0 @@ -### Supergraph coprocessor implementation ([PR #3408](https://github.com/apollographql/router/pull/3408)) - -This adds support for coprocessors at the supergraph service level. Supergraph plugins work on the request side with a parsed GraphQL request object, so the query and operation name, variables and extensions are directly accessible. On the response side, they handle GraphQL response objects, with label, data, path, errors, extensions. The supergraph response contains a stream of GraphQL responses, which can contain multiple elements if the query uses `@defer` or subscriptions. When configured to observe the responses, the coprocessor will be called for each of the deferred responses. - -By [@Geal](https://github.com/Geal) in https://github.com/apollographql/router/pull/3408 \ No newline at end of file diff --git a/.changesets/feat_igni_subgraph_auth.md b/.changesets/feat_igni_subgraph_auth.md deleted file mode 100644 index d4f4898df7..0000000000 --- a/.changesets/feat_igni_subgraph_auth.md +++ /dev/null @@ -1,34 +0,0 @@ -### Configure AWS sigv4 authentication for subgraph requests ([PR #3365](https://github.com/apollographql/router/pull/3365)) - -Secure your router to subgraph communication on AWS using [Signature Version 4](https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html) (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: - -```yaml - authentication: - subgraph: - all: # configuration that will apply to all subgraphs - aws_sig_v4: - default_chain: - profile_name: "my-test-profile" # https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html#ec2-instance-profile - region: "us-east-1" # https://docs.aws.amazon.com/general/latest/gr/rande.html - service_name: "lambda" # https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_aws-services-that-work-with-iam.html - assume_role: # https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html - role_arn: "test-arn" - session_name: "test-session" - external_id: "test-id" - subgraphs: - products: - aws_sig_v4: - hardcoded: # Not recommended, prefer using default_chain as shown above - access_key_id: "my-access-key" - secret_access_key: "my-secret-access-key" - region: "us-east-1" - service_name: "vpc-lattice-svcs" # "s3", "lambda" etc. -``` - -The full documentation can be found in the [router documentation](https://www.apollographql.com/docs/router/configuration/authn-subgraph). - -By [@o0Ignition0o](https://github.com/o0Ignition0o) and [@BlenderDude](https://github.com/BlenderDude) in https://github.com/apollographql/router/pull/3365 diff --git a/.changesets/fix_bnjjj_fix_subscription_metrics.md b/.changesets/fix_bnjjj_fix_subscription_metrics.md deleted file mode 100644 index b955f53dbd..0000000000 --- a/.changesets/fix_bnjjj_fix_subscription_metrics.md +++ /dev/null @@ -1,7 +0,0 @@ -### Fix the error count for subscription requests for apollo telemetry ([PR #3500](https://github.com/apollographql/router/pull/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](https://github.com/bnjjj) in https://github.com/apollographql/router/pull/3500 diff --git a/.changesets/fix_garypen_3521_keep_listening.md b/.changesets/fix_garypen_3521_keep_listening.md deleted file mode 100644 index 2a796ef96c..0000000000 --- a/.changesets/fix_garypen_3521_keep_listening.md +++ /dev/null @@ -1,7 +0,0 @@ -### Require the main (GraphQL) route to shutdown before other routes ([Issue #3521](https://github.com/apollographql/router/issues/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](https://github.com/garypen) in https://github.com/apollographql/router/pull/3557 \ No newline at end of file diff --git a/.changesets/fix_geal_redis_fixes.md b/.changesets/fix_geal_redis_fixes.md deleted file mode 100644 index abb955e25c..0000000000 --- a/.changesets/fix_geal_redis_fixes.md +++ /dev/null @@ -1,9 +0,0 @@ -### Fix redis reconnections ([Issue #3045](https://github.com/apollographql/router/issues/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: -- release the lock on the in memory cache while waiting for redis, to let the in memory cache serve other requests -- add a custom serializer for `SubSelectionKey`: this type is used as key in a `HashMap`, which is converted to a JSON object, and object keys must be strings, so a specific serializer is needed instead of the derived one - -By [@Geal](https://github.com/Geal) in https://github.com/apollographql/router/pull/3509 \ No newline at end of file diff --git a/.changesets/fix_igni_safely_deal_with_invalid_redis_keys.md b/.changesets/fix_igni_safely_deal_with_invalid_redis_keys.md deleted file mode 100644 index 7c1169450c..0000000000 --- a/.changesets/fix_igni_safely_deal_with_invalid_redis_keys.md +++ /dev/null @@ -1,6 +0,0 @@ -### Redis storage: return an error instead if a non serializable value is sent. ([#3594](https://github.com/apollographql/router/issues/3594)) - -This changeset returns an error if a value couldn't be serialized before being sent to the redis storage backend. -It also logs the error in console and prompts you to open an issue (This message showing up would be a router bug!). - -By [@o0Ignition0o](https://github.com/o0Ignition0o) in https://github.com/apollographql/router/pull/3597 diff --git a/.changesets/fix_igni_subscriptions_subgraph_ping_pong.md b/.changesets/fix_igni_subscriptions_subgraph_ping_pong.md deleted file mode 100644 index dd8397d770..0000000000 --- a/.changesets/fix_igni_subscriptions_subgraph_ping_pong.md +++ /dev/null @@ -1,5 +0,0 @@ -### Fix: handle ping/pong websocket messages before the Ack message is received. ([PR #3562](https://github.com/apollographql/router/pull/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](https://github.com/o0Ignition0o) in https://github.com/apollographql/router/pull/3562 diff --git a/.changesets/fix_porch_pulse_bloody_receipt.md b/.changesets/fix_porch_pulse_bloody_receipt.md deleted file mode 100644 index 2f1d4b84b1..0000000000 --- a/.changesets/fix_porch_pulse_bloody_receipt.md +++ /dev/null @@ -1,21 +0,0 @@ -### Close the subscription when a new schema has been detected during hot reload ([Issue #3320](https://github.com/apollographql/router/issues/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: - - -```json -{ - "errors": [ - { - "message": "subscription has been closed due to a schema reload", - "extensions": { - "code": "SUBSCRIPTION_SCHEMA_RELOAD" - } - } - ] -} -``` - - -By [@bnjjj](https://github.com/bnjjj) in https://github.com/apollographql/router/pull/3341 \ No newline at end of file diff --git a/.changesets/fix_spelling_content_negotiation.md b/.changesets/fix_spelling_content_negotiation.md deleted file mode 100644 index 27130467a3..0000000000 --- a/.changesets/fix_spelling_content_negotiation.md +++ /dev/null @@ -1,5 +0,0 @@ -### spelling of content_negociation corrected to content_negotiation ([Issue #3204](https://github.com/apollographql/router/issues/3204)) - -spelling mistake in content_negociation is fixed - -By [@krishna15898](https://github.com/krishna15898) in https://github.com/apollographql/router/pull/3162 diff --git a/.changesets/maint_contract_fiancee_ark_grey.md b/.changesets/maint_contract_fiancee_ark_grey.md deleted file mode 100644 index cd812be36b..0000000000 --- a/.changesets/maint_contract_fiancee_ark_grey.md +++ /dev/null @@ -1,5 +0,0 @@ -### Remove some panic! calls from the pq code. ([PR #3527](https://github.com/apollographql/router/pull/3527)) - -Replace a few `panic!` calls with `expect()` in the persisted query code for code clarity. - -By [@BrynCooke](https://github.com/BrynCooke) in https://github.com/apollographql/router/pull/3527 diff --git a/.changesets/maint_garypen_3533_istio_warn.md b/.changesets/maint_garypen_3533_istio_warn.md deleted file mode 100644 index 916457ce2d..0000000000 --- a/.changesets/maint_garypen_3533_istio_warn.md +++ /dev/null @@ -1,9 +0,0 @@ -### Add a warning if we think istio-proxy injection is causing problems ([Issue #3533](https://github.com/apollographql/router/issues/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](https://github.com/garypen) in https://github.com/apollographql/router/pull/3545 \ No newline at end of file diff --git a/.changesets/maint_geal_parent_based_sampling_test.md b/.changesets/maint_geal_parent_based_sampling_test.md deleted file mode 100644 index bf006ba94b..0000000000 --- a/.changesets/maint_geal_parent_based_sampling_test.md +++ /dev/null @@ -1,5 +0,0 @@ -### Parent based sampling tests ([PR #3136](https://github.com/apollographql/router/pull/3136)) - -This adds test for OpenTelemetry sampling defined either in the configuration or in headers carried by the request - -By [@Geal](https://github.com/Geal) in https://github.com/apollographql/router/pull/3136 \ No newline at end of file diff --git a/.changesets/maint_igni_dockerfiles_datadog_dependencies.md b/.changesets/maint_igni_dockerfiles_datadog_dependencies.md deleted file mode 100644 index e6a106f19b..0000000000 --- a/.changesets/maint_igni_dockerfiles_datadog_dependencies.md +++ /dev/null @@ -1,5 +0,0 @@ -### Update datadog-subgraph npm dependencies ([PR #3560](https://github.com/apollographql/router/pull/3560)) - -This changeset updates the dd-trace dependency and the nodeJS version of the example Dockerfile. - -By [@o0Ignition0o](https://github.com/o0Ignition0o) in https://github.com/apollographql/router/pull/3560 diff --git a/.changesets/maint_rhubarb_waterfront_notebook.md b/.changesets/maint_rhubarb_waterfront_notebook.md deleted file mode 100644 index ed2af63f9e..0000000000 --- a/.changesets/maint_rhubarb_waterfront_notebook.md +++ /dev/null @@ -1,10 +0,0 @@ -### 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](https://github.com/apollographql/router/issues/3526)) - -Since [#3477](https://github.com/apollographql/router/pull/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](https://github.com/BrynCooke) in https://github.com/apollographql/router/pull/3540 diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f0da82a0a..d898900a06 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,223 @@ 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.27.0] - 2023-08-18 + +## 🚀 Features + +### add a metric tracking coprocessor latency ([Issue #2924](https://github.com/apollographql/router/issues/2924)) + +Introduces a new metric for the router: + +``` +apollo.router.operations.coprocessor.duration +``` + +It has one attributes: + +``` +coprocessor.stage: string (RouterRequest, RouterResponse, SubgraphRequest, SubgraphResponse) +``` + +It is an histogram metric tracking the time spent calling into the coprocessor + +By [@Geal](https://github.com/Geal) in https://github.com/apollographql/router/pull/3513 + +### Supergraph coprocessor implementation ([PR #3408](https://github.com/apollographql/router/pull/3408)) + +This adds support for coprocessors at the supergraph service level. Supergraph plugins work on the request side with a parsed GraphQL request object, so the query and operation name, variables and extensions are directly accessible. On the response side, they handle GraphQL response objects, with label, data, path, errors, extensions. The supergraph response contains a stream of GraphQL responses, which can contain multiple elements if the query uses `@defer` or subscriptions. When configured to observe the responses, the coprocessor will be called for each of the deferred responses. + +By [@Geal](https://github.com/Geal) in https://github.com/apollographql/router/pull/3408 + +### Configure AWS sigv4 authentication for subgraph requests ([PR #3365](https://github.com/apollographql/router/pull/3365)) + +Secure your router to subgraph communication on AWS using [Signature Version 4](https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html) (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: + +```yaml + authentication: + subgraph: + all: # configuration that will apply to all subgraphs + aws_sig_v4: + default_chain: + profile_name: "my-test-profile" # https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html#ec2-instance-profile + region: "us-east-1" # https://docs.aws.amazon.com/general/latest/gr/rande.html + service_name: "lambda" # https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_aws-services-that-work-with-iam.html + assume_role: # https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html + role_arn: "test-arn" + session_name: "test-session" + external_id: "test-id" + subgraphs: + products: + aws_sig_v4: + hardcoded: # Not recommended, prefer using default_chain as shown above + access_key_id: "my-access-key" + secret_access_key: "my-secret-access-key" + region: "us-east-1" + service_name: "vpc-lattice-svcs" # "s3", "lambda" etc. +``` + +The full documentation can be found in the [router documentation](https://www.apollographql.com/docs/router/configuration/authn-subgraph). + +By [@o0Ignition0o](https://github.com/o0Ignition0o) and [@BlenderDude](https://github.com/BlenderDude) in https://github.com/apollographql/router/pull/3365 + +### Helm: add init containers to deployemt ([Issue #3248](https://github.com/apollographql/router/issues/3248)) + +This is a new option when starting the router, so that before starting another container runs and performs necessary tasks. + +By [@laszlorostas](https://github.com/laszlorostas) in https://github.com/apollographql/router/pull/3444 + +### Helm: exposes the lifecycle object on the router container ([Issue #3563](https://github.com/apollographql/router/issues/3563)) + +You can now set the kubernetes lifecycle object on the router container in the helm chart. + +By [@bjoernw](https://github.com/bjoernw) in https://github.com/apollographql/router/pull/3570 + +## 🐛 Fixes + +### Require the main (GraphQL) route to shutdown before other routes ([Issue #3521](https://github.com/apollographql/router/issues/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](https://github.com/garypen) in https://github.com/apollographql/router/pull/3557 + +### spelling of content_negociation corrected to content_negotiation ([Issue #3204](https://github.com/apollographql/router/issues/3204)) + +spelling mistake in content_negociation is fixed + +By [@krishna15898](https://github.com/krishna15898) in https://github.com/apollographql/router/pull/3162 + +### Fix redis reconnections ([Issue #3045](https://github.com/apollographql/router/issues/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: +- release the lock on the in memory cache while waiting for redis, to let the in memory cache serve other requests +- add a custom serializer for `SubSelectionKey`: this type is used as key in a `HashMap`, which is converted to a JSON object, and object keys must be strings, so a specific serializer is needed instead of the derived one + +By [@Geal](https://github.com/Geal) in https://github.com/apollographql/router/pull/3509 + +### Close the subscription when a new schema has been detected during hot reload ([Issue #3320](https://github.com/apollographql/router/issues/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: + + +```json +{ + "errors": [ + { + "message": "subscription has been closed due to a schema reload", + "extensions": { + "code": "SUBSCRIPTION_SCHEMA_RELOAD" + } + } + ] +} +``` + + +By [@bnjjj](https://github.com/bnjjj) in https://github.com/apollographql/router/pull/3341 + +### Redis storage: return an error instead if a non serializable value is sent. ([#3594](https://github.com/apollographql/router/issues/3594)) + +This changeset returns an error if a value couldn't be serialized before being sent to the redis storage backend. +It also logs the error in console and prompts you to open an issue (This message showing up would be a router bug!). + +By [@o0Ignition0o](https://github.com/o0Ignition0o) in https://github.com/apollographql/router/pull/3597 + +### Fix: handle ping/pong websocket messages before the Ack message is received. ([PR #3562](https://github.com/apollographql/router/pull/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](https://github.com/o0Ignition0o) in https://github.com/apollographql/router/pull/3562 + +### Fix the error count for subscription requests for apollo telemetry ([PR #3500](https://github.com/apollographql/router/pull/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](https://github.com/bnjjj) in https://github.com/apollographql/router/pull/3500 + +## 🛠 Maintenance + +### Update datadog-subgraph npm dependencies ([PR #3560](https://github.com/apollographql/router/pull/3560)) + +This changeset updates the dd-trace dependency and the nodeJS version of the example Dockerfile. + +By [@o0Ignition0o](https://github.com/o0Ignition0o) in https://github.com/apollographql/router/pull/3560 + +### Remove some panic! calls from the pq code. ([PR #3527](https://github.com/apollographql/router/pull/3527)) + +Replace a few `panic!` calls with `expect()` in the persisted query code for code clarity. + +By [@BrynCooke](https://github.com/BrynCooke) in https://github.com/apollographql/router/pull/3527 + +### Add a warning if we think istio-proxy injection is causing problems ([Issue #3533](https://github.com/apollographql/router/issues/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](https://github.com/garypen) in https://github.com/apollographql/router/pull/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](https://github.com/apollographql/router/issues/3526)) + +Since [#3477](https://github.com/apollographql/router/pull/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](https://github.com/BrynCooke) in https://github.com/apollographql/router/pull/3540 + +### Parent based sampling tests ([PR #3136](https://github.com/apollographql/router/pull/3136)) + +This adds test for OpenTelemetry sampling defined either in the configuration or in headers carried by the request + +By [@Geal](https://github.com/Geal) in https://github.com/apollographql/router/pull/3136 + +## 📚 Documentation + +### Document the Redis URL format ([Issue #3534](https://github.com/apollographql/router/issues/3534)) + +The Redis client used in the Router follows a convention on Redis server URLs to indicate TLS, cluster or sentinel usage + + +By [@Geal](https://github.com/Geal) in https://github.com/apollographql/router/pull/3556 + +### Document the request lifecycle ([PR #3391](https://github.com/apollographql/router/pull/3391)) + +This adds in-depth documentation of: +- the entire request lifecycle +- which services exist in the router +- the request and response types they use +- where plugins can attach themselves + +By [@Geal](https://github.com/Geal) [@Meschreiber](https://github.com/Meschreiber) in https://github.com/apollographql/router/pull/3391 + +### document TLS termination and subgraph override ([Issue #3100](https://github.com/apollographql/router/issues/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](https://github.com/Geal) in https://github.com/apollographql/router/pull/3436 + +### self is immutable in the Plugin trait's methods ([Issue #3539](https://github.com/apollographql/router/issues/3539)) + + +By [@Geal](https://github.com/Geal) in https://github.com/apollographql/router/pull/3555 + + + # [1.26.0] - 2023-07-28 ## 🚀 Features diff --git a/Cargo.lock b/Cargo.lock index 0a85519c89..9eb60d9afd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -271,7 +271,7 @@ dependencies = [ [[package]] name = "apollo-router" -version = "1.26.0" +version = "1.27.0" dependencies = [ "access-json", "anyhow", @@ -415,7 +415,7 @@ dependencies = [ [[package]] name = "apollo-router-benchmarks" -version = "1.26.0" +version = "1.27.0" dependencies = [ "apollo-parser 0.4.1", "apollo-router", @@ -431,7 +431,7 @@ dependencies = [ [[package]] name = "apollo-router-scaffold" -version = "1.26.0" +version = "1.27.0" dependencies = [ "anyhow", "cargo-scaffold", diff --git a/apollo-router-benchmarks/Cargo.toml b/apollo-router-benchmarks/Cargo.toml index 72c1f04ec5..396d4a8e43 100644 --- a/apollo-router-benchmarks/Cargo.toml +++ b/apollo-router-benchmarks/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "apollo-router-benchmarks" -version = "1.26.0" +version = "1.27.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 eb4772df0c..5309d75291 100644 --- a/apollo-router-scaffold/Cargo.toml +++ b/apollo-router-scaffold/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "apollo-router-scaffold" -version = "1.26.0" +version = "1.27.0" authors = ["Apollo Graph, Inc. "] edition = "2021" license = "Elastic-2.0" diff --git a/apollo-router-scaffold/templates/base/Cargo.toml b/apollo-router-scaffold/templates/base/Cargo.toml index bce7557a39..6a799b7dc8 100644 --- a/apollo-router-scaffold/templates/base/Cargo.toml +++ b/apollo-router-scaffold/templates/base/Cargo.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.26.0" +apollo-router = "1.27.0" {{/if}} {{/if}} async-trait = "0.1.52" diff --git a/apollo-router-scaffold/templates/base/xtask/Cargo.toml b/apollo-router-scaffold/templates/base/xtask/Cargo.toml index 776b8344b4..564a542555 100644 --- a/apollo-router-scaffold/templates/base/xtask/Cargo.toml +++ b/apollo-router-scaffold/templates/base/xtask/Cargo.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.26.0" } +apollo-router-scaffold = { git = "https://github.com/apollographql/router.git", tag = "v1.27.0" } {{/if}} {{/if}} anyhow = "1.0.58" diff --git a/apollo-router/Cargo.toml b/apollo-router/Cargo.toml index 3ef77f3389..427e26197b 100644 --- a/apollo-router/Cargo.toml +++ b/apollo-router/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "apollo-router" -version = "1.26.0" +version = "1.27.0" authors = ["Apollo Graph, Inc. "] repository = "https://github.com/apollographql/router/" documentation = "https://docs.rs/apollo-router" diff --git a/dockerfiles/tracing/docker-compose.datadog.yml b/dockerfiles/tracing/docker-compose.datadog.yml index 5b4ed890ec..8bffa5cdaf 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.26.0 + image: ghcr.io/apollographql/router:v1.27.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 a8c12a038c..598912d24a 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.26.0 + image: ghcr.io/apollographql/router:v1.27.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 d934d5909a..30b915e04a 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.26.0 + image: ghcr.io/apollographql/router:v1.27.0 volumes: - ./supergraph.graphql:/etc/config/supergraph.graphql - ./router/zipkin.router.yaml:/etc/config/configuration.yaml diff --git a/docs/source/containerization/docker.mdx b/docs/source/containerization/docker.mdx index 74148b20dd..2f17d88f79 100644 --- a/docs/source/containerization/docker.mdx +++ b/docs/source/containerization/docker.mdx @@ -11,7 +11,7 @@ The default behaviour of the router images is suitable for a quickstart or devel Note: The [docker documentation](https://docs.docker.com/engine/reference/run/) for the run command may be helpful when reading through the examples. -Note: The exact image version to use is your choice depending on which release you wish to use. In the following examples, replace `` with your chosen version. e.g.: `v1.26.0` +Note: The exact image version to use is your choice depending on which release you wish to use. In the following examples, replace `` with your chosen version. e.g.: `v1.27.0` ## Override the configuration diff --git a/docs/source/containerization/kubernetes.mdx b/docs/source/containerization/kubernetes.mdx index 46c4b30187..7d940ec0c4 100644 --- a/docs/source/containerization/kubernetes.mdx +++ b/docs/source/containerization/kubernetes.mdx @@ -13,7 +13,7 @@ import { Link } from 'gatsby'; [Helm](https://helm.sh) is the package manager for kubernetes. -There is a complete [helm chart definition](https://github.com/apollographql/router/tree/v1.26.0/helm/chart/router) in the repo which illustrates how to use helm to deploy the router in kubernetes. +There is a complete [helm chart definition](https://github.com/apollographql/router/tree/v1.27.0/helm/chart/router) in the repo which illustrates how to use helm to deploy the router in kubernetes. In both the following examples, we are using helm to install the router: - into namespace "router-deploy" (create namespace if it doesn't exist) @@ -64,10 +64,10 @@ kind: ServiceAccount metadata: name: release-name-router labels: - helm.sh/chart: router-1.26.0 + helm.sh/chart: router-1.27.0 app.kubernetes.io/name: router app.kubernetes.io/instance: release-name - app.kubernetes.io/version: "v1.26.0" + app.kubernetes.io/version: "v1.27.0" app.kubernetes.io/managed-by: Helm --- # Source: router/templates/secret.yaml @@ -76,10 +76,10 @@ kind: Secret metadata: name: "release-name-router" labels: - helm.sh/chart: router-1.26.0 + helm.sh/chart: router-1.27.0 app.kubernetes.io/name: router app.kubernetes.io/instance: release-name - app.kubernetes.io/version: "v1.26.0" + app.kubernetes.io/version: "v1.27.0" app.kubernetes.io/managed-by: Helm data: managedFederationApiKey: "UkVEQUNURUQ=" @@ -90,10 +90,10 @@ kind: ConfigMap metadata: name: release-name-router labels: - helm.sh/chart: router-1.26.0 + helm.sh/chart: router-1.27.0 app.kubernetes.io/name: router app.kubernetes.io/instance: release-name - app.kubernetes.io/version: "v1.26.0" + app.kubernetes.io/version: "v1.27.0" app.kubernetes.io/managed-by: Helm data: configuration.yaml: | @@ -117,10 +117,10 @@ kind: Service metadata: name: release-name-router labels: - helm.sh/chart: router-1.26.0 + helm.sh/chart: router-1.27.0 app.kubernetes.io/name: router app.kubernetes.io/instance: release-name - app.kubernetes.io/version: "v1.26.0" + app.kubernetes.io/version: "v1.27.0" app.kubernetes.io/managed-by: Helm spec: type: ClusterIP @@ -143,10 +143,10 @@ kind: Deployment metadata: name: release-name-router labels: - helm.sh/chart: router-1.26.0 + helm.sh/chart: router-1.27.0 app.kubernetes.io/name: router app.kubernetes.io/instance: release-name - app.kubernetes.io/version: "v1.26.0" + app.kubernetes.io/version: "v1.27.0" app.kubernetes.io/managed-by: Helm annotations: @@ -172,7 +172,7 @@ spec: - name: router securityContext: {} - image: "ghcr.io/apollographql/router:v1.26.0" + image: "ghcr.io/apollographql/router:v1.27.0" imagePullPolicy: IfNotPresent args: - --hot-reload @@ -194,7 +194,8 @@ spec: - name: health containerPort: 8088 protocol: TCP - + lifecycle: + {} livenessProbe: httpGet: path: "/health?live" @@ -223,10 +224,10 @@ kind: Pod metadata: name: "release-name-router-test-connection" labels: - helm.sh/chart: router-1.26.0 + helm.sh/chart: router-1.27.0 app.kubernetes.io/name: router app.kubernetes.io/instance: release-name - app.kubernetes.io/version: "v1.26.0" + app.kubernetes.io/version: "v1.27.0" app.kubernetes.io/managed-by: Helm annotations: "helm.sh/hook": test diff --git a/helm/chart/router/Chart.yaml b/helm/chart/router/Chart.yaml index a21592295d..4d097ecfd8 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.26.0 +version: 1.27.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.26.0" \ No newline at end of file +appVersion: "v1.27.0" \ No newline at end of file diff --git a/helm/chart/router/README.md b/helm/chart/router/README.md index cb193c1904..be23505bfe 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.26.0](https://img.shields.io/badge/Version-1.26.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v1.26.0](https://img.shields.io/badge/AppVersion-v1.26.0-informational?style=flat-square) +![Version: 1.27.0](https://img.shields.io/badge/Version-1.27.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v1.27.0](https://img.shields.io/badge/AppVersion-v1.27.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.26.0 +helm pull oci://ghcr.io/apollographql/helm-charts/router --version 1.27.0 ``` ## Install Chart @@ -19,7 +19,7 @@ helm pull oci://ghcr.io/apollographql/helm-charts/router --version 1.26.0 **Important:** only helm3 is supported ```console -helm upgrade --install [RELEASE_NAME] oci://ghcr.io/apollographql/helm-charts/router --version 1.26.0 --values my-values.yaml +helm upgrade --install [RELEASE_NAME] oci://ghcr.io/apollographql/helm-charts/router --version 1.27.0 --values my-values.yaml ``` _See [configuration](#configuration) below._ @@ -63,6 +63,8 @@ helm show values oci://ghcr.io/apollographql/helm-charts/router | ingress.hosts[0].paths[0].path | string | `"/"` | | | ingress.hosts[0].paths[0].pathType | string | `"ImplementationSpecific"` | | | ingress.tls | list | `[]` | | +| initContainers | list | `[]` | An array of init containers to include in the router pod Example: initContainers: - name: init-myservice image: busybox:1.28 command: ["sh"] | +| lifecycle | object | `{}` | | | managedFederation.apiKey | string | `nil` | If using managed federation, the graph API key to identify router to Studio | | managedFederation.existingSecret | string | `nil` | If using managed federation, use existing Secret which stores the graph API key instead of creating a new one. If set along `managedFederation.apiKey`, a secret with the graph API key will be created using this parameter as name | | managedFederation.graphRef | string | `""` | If using managed federation, the variant of which graph to use | diff --git a/licenses.html b/licenses.html index 6c52360144..8570ff2139 100644 --- a/licenses.html +++ b/licenses.html @@ -45,7 +45,7 @@

Third Party Licenses

Overview of licenses:

  • MIT License (95)
  • -
  • Apache License 2.0 (59)
  • +
  • Apache License 2.0 (61)
  • BSD 3-Clause "New" or "Revised" License (10)
  • ISC License (9)
  • Mozilla Public License 2.0 (3)
  • @@ -58,6 +58,203 @@

    Overview of licenses:

    All license text:

      +
    • +

      Apache License 2.0

      +

      Used by:

      + +
      +                                 Apache License
      +                           Version 2.0, January 2004
      +                        http://www.apache.org/licenses/
      +
      +   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
      +
      +   1. Definitions.
      +
      +      "License" shall mean the terms and conditions for use, reproduction,
      +      and distribution as defined by Sections 1 through 9 of this document.
      +
      +      "Licensor" shall mean the copyright owner or entity authorized by
      +      the copyright owner that is granting the License.
      +
      +      "Legal Entity" shall mean the union of the acting entity and all
      +      other entities that control, are controlled by, or are under common
      +      control with that entity. For the purposes of this definition,
      +      "control" means (i) the power, direct or indirect, to cause the
      +      direction or management of such entity, whether by contract or
      +      otherwise, or (ii) ownership of fifty percent (50%) or more of the
      +      outstanding shares, or (iii) beneficial ownership of such entity.
      +
      +      "You" (or "Your") shall mean an individual or Legal Entity
      +      exercising permissions granted by this License.
      +
      +      "Source" form shall mean the preferred form for making modifications,
      +      including but not limited to software source code, documentation
      +      source, and configuration files.
      +
      +      "Object" form shall mean any form resulting from mechanical
      +      transformation or translation of a Source form, including but
      +      not limited to compiled object code, generated documentation,
      +      and conversions to other media types.
      +
      +      "Work" shall mean the work of authorship, whether in Source or
      +      Object form, made available under the License, as indicated by a
      +      copyright notice that is included in or attached to the work
      +      (an example is provided in the Appendix below).
      +
      +      "Derivative Works" shall mean any work, whether in Source or Object
      +      form, that is based on (or derived from) the Work and for which the
      +      editorial revisions, annotations, elaborations, or other modifications
      +      represent, as a whole, an original work of authorship. For the purposes
      +      of this License, Derivative Works shall not include works that remain
      +      separable from, or merely link (or bind by name) to the interfaces of,
      +      the Work and Derivative Works thereof.
      +
      +      "Contribution" shall mean any work of authorship, including
      +      the original version of the Work and any modifications or additions
      +      to that Work or Derivative Works thereof, that is intentionally
      +      submitted to Licensor for inclusion in the Work by the copyright owner
      +      or by an individual or Legal Entity authorized to submit on behalf of
      +      the copyright owner. For the purposes of this definition, "submitted"
      +      means any form of electronic, verbal, or written communication sent
      +      to the Licensor or its representatives, including but not limited to
      +      communication on electronic mailing lists, source code control systems,
      +      and issue tracking systems that are managed by, or on behalf of, the
      +      Licensor for the purpose of discussing and improving the Work, but
      +      excluding communication that is conspicuously marked or otherwise
      +      designated in writing by the copyright owner as "Not a Contribution."
      +
      +      "Contributor" shall mean Licensor and any individual or Legal Entity
      +      on behalf of whom a Contribution has been received by Licensor and
      +      subsequently incorporated within the Work.
      +
      +   2. Grant of Copyright License. Subject to the terms and conditions of
      +      this License, each Contributor hereby grants to You a perpetual,
      +      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      +      copyright license to reproduce, prepare Derivative Works of,
      +      publicly display, publicly perform, sublicense, and distribute the
      +      Work and such Derivative Works in Source or Object form.
      +
      +   3. Grant of Patent License. Subject to the terms and conditions of
      +      this License, each Contributor hereby grants to You a perpetual,
      +      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      +      (except as stated in this section) patent license to make, have made,
      +      use, offer to sell, sell, import, and otherwise transfer the Work,
      +      where such license applies only to those patent claims licensable
      +      by such Contributor that are necessarily infringed by their
      +      Contribution(s) alone or by combination of their Contribution(s)
      +      with the Work to which such Contribution(s) was submitted. If You
      +      institute patent litigation against any entity (including a
      +      cross-claim or counterclaim in a lawsuit) alleging that the Work
      +      or a Contribution incorporated within the Work constitutes direct
      +      or contributory patent infringement, then any patent licenses
      +      granted to You under this License for that Work shall terminate
      +      as of the date such litigation is filed.
      +
      +   4. Redistribution. You may reproduce and distribute copies of the
      +      Work or Derivative Works thereof in any medium, with or without
      +      modifications, and in Source or Object form, provided that You
      +      meet the following conditions:
      +
      +      (a) You must give any other recipients of the Work or
      +          Derivative Works a copy of this License; and
      +
      +      (b) You must cause any modified files to carry prominent notices
      +          stating that You changed the files; and
      +
      +      (c) You must retain, in the Source form of any Derivative Works
      +          that You distribute, all copyright, patent, trademark, and
      +          attribution notices from the Source form of the Work,
      +          excluding those notices that do not pertain to any part of
      +          the Derivative Works; and
      +
      +      (d) If the Work includes a "NOTICE" text file as part of its
      +          distribution, then any Derivative Works that You distribute must
      +          include a readable copy of the attribution notices contained
      +          within such NOTICE file, excluding those notices that do not
      +          pertain to any part of the Derivative Works, in at least one
      +          of the following places: within a NOTICE text file distributed
      +          as part of the Derivative Works; within the Source form or
      +          documentation, if provided along with the Derivative Works; or,
      +          within a display generated by the Derivative Works, if and
      +          wherever such third-party notices normally appear. The contents
      +          of the NOTICE file are for informational purposes only and
      +          do not modify the License. You may add Your own attribution
      +          notices within Derivative Works that You distribute, alongside
      +          or as an addendum to the NOTICE text from the Work, provided
      +          that such additional attribution notices cannot be construed
      +          as modifying the License.
      +
      +      You may add Your own copyright statement to Your modifications and
      +      may provide additional or different license terms and conditions
      +      for use, reproduction, or distribution of Your modifications, or
      +      for any such Derivative Works as a whole, provided Your use,
      +      reproduction, and distribution of the Work otherwise complies with
      +      the conditions stated in this License.
      +
      +   5. Submission of Contributions. Unless You explicitly state otherwise,
      +      any Contribution intentionally submitted for inclusion in the Work
      +      by You to the Licensor shall be under the terms and conditions of
      +      this License, without any additional terms or conditions.
      +      Notwithstanding the above, nothing herein shall supersede or modify
      +      the terms of any separate license agreement you may have executed
      +      with Licensor regarding such Contributions.
      +
      +   6. Trademarks. This License does not grant permission to use the trade
      +      names, trademarks, service marks, or product names of the Licensor,
      +      except as required for reasonable and customary use in describing the
      +      origin of the Work and reproducing the content of the NOTICE file.
      +
      +   7. Disclaimer of Warranty. Unless required by applicable law or
      +      agreed to in writing, Licensor provides the Work (and each
      +      Contributor provides its Contributions) on an "AS IS" BASIS,
      +      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
      +      implied, including, without limitation, any warranties or conditions
      +      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
      +      PARTICULAR PURPOSE. You are solely responsible for determining the
      +      appropriateness of using or redistributing the Work and assume any
      +      risks associated with Your exercise of permissions under this License.
      +
      +   8. Limitation of Liability. In no event and under no legal theory,
      +      whether in tort (including negligence), contract, or otherwise,
      +      unless required by applicable law (such as deliberate and grossly
      +      negligent acts) or agreed to in writing, shall any Contributor be
      +      liable to You for damages, including any direct, indirect, special,
      +      incidental, or consequential damages of any character arising as a
      +      result of this License or out of the use or inability to use the
      +      Work (including but not limited to damages for loss of goodwill,
      +      work stoppage, computer failure or malfunction, or any and all
      +      other commercial damages or losses), even if such Contributor
      +      has been advised of the possibility of such damages.
      +
      +   9. Accepting Warranty or Additional Liability. While redistributing
      +      the Work or Derivative Works thereof, You may choose to offer,
      +      and charge a fee for, acceptance of support, warranty, indemnity,
      +      or other liability obligations and/or rights consistent with this
      +      License. However, in accepting such obligations, You may act only
      +      on Your own behalf and on Your sole responsibility, not on behalf
      +      of any other Contributor, and only if You agree to indemnify,
      +      defend, and hold each Contributor harmless for any liability
      +      incurred by, or claims asserted against, such Contributor by reason
      +      of your accepting any such warranty or additional liability.
      +
      +
    • Apache License 2.0

      Used by:

      @@ -3180,6 +3377,217 @@

      Used by:

      of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS + +
    • +
    • +

      Apache License 2.0

      +

      Used by:

      + +
                                      Apache License
      +                           Version 2.0, January 2004
      +                        http://www.apache.org/licenses/
      +
      +   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
      +
      +   1. Definitions.
      +
      +      "License" shall mean the terms and conditions for use, reproduction,
      +      and distribution as defined by Sections 1 through 9 of this document.
      +
      +      "Licensor" shall mean the copyright owner or entity authorized by
      +      the copyright owner that is granting the License.
      +
      +      "Legal Entity" shall mean the union of the acting entity and all
      +      other entities that control, are controlled by, or are under common
      +      control with that entity. For the purposes of this definition,
      +      "control" means (i) the power, direct or indirect, to cause the
      +      direction or management of such entity, whether by contract or
      +      otherwise, or (ii) ownership of fifty percent (50%) or more of the
      +      outstanding shares, or (iii) beneficial ownership of such entity.
      +
      +      "You" (or "Your") shall mean an individual or Legal Entity
      +      exercising permissions granted by this License.
      +
      +      "Source" form shall mean the preferred form for making modifications,
      +      including but not limited to software source code, documentation
      +      source, and configuration files.
      +
      +      "Object" form shall mean any form resulting from mechanical
      +      transformation or translation of a Source form, including but
      +      not limited to compiled object code, generated documentation,
      +      and conversions to other media types.
      +
      +      "Work" shall mean the work of authorship, whether in Source or
      +      Object form, made available under the License, as indicated by a
      +      copyright notice that is included in or attached to the work
      +      (an example is provided in the Appendix below).
      +
      +      "Derivative Works" shall mean any work, whether in Source or Object
      +      form, that is based on (or derived from) the Work and for which the
      +      editorial revisions, annotations, elaborations, or other modifications
      +      represent, as a whole, an original work of authorship. For the purposes
      +      of this License, Derivative Works shall not include works that remain
      +      separable from, or merely link (or bind by name) to the interfaces of,
      +      the Work and Derivative Works thereof.
      +
      +      "Contribution" shall mean any work of authorship, including
      +      the original version of the Work and any modifications or additions
      +      to that Work or Derivative Works thereof, that is intentionally
      +      submitted to Licensor for inclusion in the Work by the copyright owner
      +      or by an individual or Legal Entity authorized to submit on behalf of
      +      the copyright owner. For the purposes of this definition, "submitted"
      +      means any form of electronic, verbal, or written communication sent
      +      to the Licensor or its representatives, including but not limited to
      +      communication on electronic mailing lists, source code control systems,
      +      and issue tracking systems that are managed by, or on behalf of, the
      +      Licensor for the purpose of discussing and improving the Work, but
      +      excluding communication that is conspicuously marked or otherwise
      +      designated in writing by the copyright owner as "Not a Contribution."
      +
      +      "Contributor" shall mean Licensor and any individual or Legal Entity
      +      on behalf of whom a Contribution has been received by Licensor and
      +      subsequently incorporated within the Work.
      +
      +   2. Grant of Copyright License. Subject to the terms and conditions of
      +      this License, each Contributor hereby grants to You a perpetual,
      +      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      +      copyright license to reproduce, prepare Derivative Works of,
      +      publicly display, publicly perform, sublicense, and distribute the
      +      Work and such Derivative Works in Source or Object form.
      +
      +   3. Grant of Patent License. Subject to the terms and conditions of
      +      this License, each Contributor hereby grants to You a perpetual,
      +      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      +      (except as stated in this section) patent license to make, have made,
      +      use, offer to sell, sell, import, and otherwise transfer the Work,
      +      where such license applies only to those patent claims licensable
      +      by such Contributor that are necessarily infringed by their
      +      Contribution(s) alone or by combination of their Contribution(s)
      +      with the Work to which such Contribution(s) was submitted. If You
      +      institute patent litigation against any entity (including a
      +      cross-claim or counterclaim in a lawsuit) alleging that the Work
      +      or a Contribution incorporated within the Work constitutes direct
      +      or contributory patent infringement, then any patent licenses
      +      granted to You under this License for that Work shall terminate
      +      as of the date such litigation is filed.
      +
      +   4. Redistribution. You may reproduce and distribute copies of the
      +      Work or Derivative Works thereof in any medium, with or without
      +      modifications, and in Source or Object form, provided that You
      +      meet the following conditions:
      +
      +      (a) You must give any other recipients of the Work or
      +          Derivative Works a copy of this License; and
      +
      +      (b) You must cause any modified files to carry prominent notices
      +          stating that You changed the files; and
      +
      +      (c) You must retain, in the Source form of any Derivative Works
      +          that You distribute, all copyright, patent, trademark, and
      +          attribution notices from the Source form of the Work,
      +          excluding those notices that do not pertain to any part of
      +          the Derivative Works; and
      +
      +      (d) If the Work includes a "NOTICE" text file as part of its
      +          distribution, then any Derivative Works that You distribute must
      +          include a readable copy of the attribution notices contained
      +          within such NOTICE file, excluding those notices that do not
      +          pertain to any part of the Derivative Works, in at least one
      +          of the following places: within a NOTICE text file distributed
      +          as part of the Derivative Works; within the Source form or
      +          documentation, if provided along with the Derivative Works; or,
      +          within a display generated by the Derivative Works, if and
      +          wherever such third-party notices normally appear. The contents
      +          of the NOTICE file are for informational purposes only and
      +          do not modify the License. You may add Your own attribution
      +          notices within Derivative Works that You distribute, alongside
      +          or as an addendum to the NOTICE text from the Work, provided
      +          that such additional attribution notices cannot be construed
      +          as modifying the License.
      +
      +      You may add Your own copyright statement to Your modifications and
      +      may provide additional or different license terms and conditions
      +      for use, reproduction, or distribution of Your modifications, or
      +      for any such Derivative Works as a whole, provided Your use,
      +      reproduction, and distribution of the Work otherwise complies with
      +      the conditions stated in this License.
      +
      +   5. Submission of Contributions. Unless You explicitly state otherwise,
      +      any Contribution intentionally submitted for inclusion in the Work
      +      by You to the Licensor shall be under the terms and conditions of
      +      this License, without any additional terms or conditions.
      +      Notwithstanding the above, nothing herein shall supersede or modify
      +      the terms of any separate license agreement you may have executed
      +      with Licensor regarding such Contributions.
      +
      +   6. Trademarks. This License does not grant permission to use the trade
      +      names, trademarks, service marks, or product names of the Licensor,
      +      except as required for reasonable and customary use in describing the
      +      origin of the Work and reproducing the content of the NOTICE file.
      +
      +   7. Disclaimer of Warranty. Unless required by applicable law or
      +      agreed to in writing, Licensor provides the Work (and each
      +      Contributor provides its Contributions) on an "AS IS" BASIS,
      +      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
      +      implied, including, without limitation, any warranties or conditions
      +      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
      +      PARTICULAR PURPOSE. You are solely responsible for determining the
      +      appropriateness of using or redistributing the Work and assume any
      +      risks associated with Your exercise of permissions under this License.
      +
      +   8. Limitation of Liability. In no event and under no legal theory,
      +      whether in tort (including negligence), contract, or otherwise,
      +      unless required by applicable law (such as deliberate and grossly
      +      negligent acts) or agreed to in writing, shall any Contributor be
      +      liable to You for damages, including any direct, indirect, special,
      +      incidental, or consequential damages of any character arising as a
      +      result of this License or out of the use or inability to use the
      +      Work (including but not limited to damages for loss of goodwill,
      +      work stoppage, computer failure or malfunction, or any and all
      +      other commercial damages or losses), even if such Contributor
      +      has been advised of the possibility of such damages.
      +
      +   9. Accepting Warranty or Additional Liability. While redistributing
      +      the Work or Derivative Works thereof, You may choose to offer,
      +      and charge a fee for, acceptance of support, warranty, indemnity,
      +      or other liability obligations and/or rights consistent with this
      +      License. However, in accepting such obligations, You may act only
      +      on Your own behalf and on Your sole responsibility, not on behalf
      +      of any other Contributor, and only if You agree to indemnify,
      +      defend, and hold each Contributor harmless for any liability
      +      incurred by, or claims asserted against, such Contributor by reason
      +      of your accepting any such warranty or additional liability.
      +
      +   END OF TERMS AND CONDITIONS
      +
      +   APPENDIX: How to apply the Apache License to your work.
      +
      +      To apply the Apache License to your work, attach the following
      +      boilerplate notice, with the fields enclosed by brackets "{}"
      +      replaced with your own identifying information. (Don't include
      +      the brackets!)  The text should be enclosed in the appropriate
      +      comment syntax for the file format. We also recommend that a
      +      file or class name and description of purpose be included on the
      +      same "printed page" as the copyright notice for easier
      +      identification within third-party archives.
      +
      +   Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
      +
      +   Licensed under the Apache License, Version 2.0 (the "License");
      +   you may not use this file except in compliance with the License.
      +   You may obtain a copy of the License at
      +
      +       http://www.apache.org/licenses/LICENSE-2.0
      +
      +   Unless required by applicable law or agreed to in writing, software
      +   distributed under the License is distributed on an "AS IS" BASIS,
      +   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +   See the License for the specific language governing permissions and
      +   limitations under the License.
      +
       
    • @@ -3398,7 +3806,6 @@

      Used by:

    • directories
    • dirs
    • dirs-sys
    • -
    • dirs-sys
                                  Apache License
                             Version 2.0, January 2004
    @@ -6750,7 +7157,6 @@ 

    Used by:

  • bytes-utils
  • cc
  • cfg-if
  • -
  • ci_info
  • concurrent-queue
  • const-random
  • const-random-macro
  • @@ -6768,6 +7174,7 @@

    Used by:

  • equivalent
  • event-listener
  • fastrand
  • +
  • fastrand
  • filetime
  • fixedbitset
  • flate2
  • @@ -6796,7 +7203,6 @@

    Used by:

  • indexmap
  • indexmap
  • inventory
  • -
  • io-lifetimes
  • itertools
  • jobserver
  • js-sys
  • @@ -6806,7 +7212,6 @@

    Used by:

  • libm
  • libz-sys
  • linux-raw-sys
  • -
  • linux-raw-sys
  • lock_api
  • maplit
  • mime
  • @@ -6856,7 +7261,6 @@

    Used by:

  • rustc_version
  • rustc_version
  • rustix
  • -
  • rustix
  • rustls
  • rustls
  • rustls-native-certs
  • @@ -6878,6 +7282,7 @@

    Used by:

  • signal-hook-registry
  • smallvec
  • socket2
  • +
  • socket2
  • syn
  • tempfile
  • thread_local
  • @@ -6914,6 +7319,7 @@

    Used by:

  • wasm-bindgen-shared
  • web-sys
  • wiremock
  • +
  • xmlparser
  • yaml-rust
  • yansi
@@ -11580,9 +11986,9 @@

Used by:

-
Copyright 2021 Apollo Graph, Inc.
+                
Elastic License 2.0
 
-Elastic License 2.0
+URL: https://www.elastic.co/licensing/elastic-license
 
 ## Acceptance
 
@@ -11673,8 +12079,6 @@ 

Used by:

**use** means anything you do with the software requiring one of your licenses. **trademark** means trademarks, service marks, and similar rights. - ---------------------------------------------------------------------------------
  • diff --git a/scripts/install.sh b/scripts/install.sh index 40c1dcbf68..d96e44fcb6 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.26.0" +PACKAGE_VERSION="v1.27.0" download_binary() { downloader --check From c392507ffb1d4174dacad862d076c051464995bc Mon Sep 17 00:00:00 2001 From: Jeremy Lempereur Date: Fri, 18 Aug 2023 12:11:21 +0200 Subject: [PATCH 02/12] Update CHANGELOG.md Co-authored-by: Gary Pennington --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d898900a06..6976584307 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -35,7 +35,7 @@ By [@Geal](https://github.com/Geal) in https://github.com/apollographql/router/p ### Configure AWS sigv4 authentication for subgraph requests ([PR #3365](https://github.com/apollographql/router/pull/3365)) Secure your router to subgraph communication on AWS using [Signature Version 4](https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html) (Sigv4)! -This changeset provides you with a way to set up hardcoded credentials, as well as a default provider chain. +This changeset provides you with a way to set up hard-coded credentials, as well as a default provider chain. We recommend using the default provider chain configuration. Full use example: From 009690890e366846c05a856c5fb197ea845b5631 Mon Sep 17 00:00:00 2001 From: Jeremy Lempereur Date: Fri, 18 Aug 2023 12:11:29 +0200 Subject: [PATCH 03/12] Update CHANGELOG.md --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6976584307..3ce1332c09 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -216,6 +216,9 @@ By [@Geal](https://github.com/Geal) in https://github.com/apollographql/router/p ### self is immutable in the Plugin trait's methods ([Issue #3539](https://github.com/apollographql/router/issues/3539)) +The documentation previously displayed plugin's methods as taking a mutable reference to self, while they actually take a non mutable reference to it. + +This changeset fixes the documentation. By [@Geal](https://github.com/Geal) in https://github.com/apollographql/router/pull/3555 From 37272f8d7241f6e8212d1d957a2203c347fe530b Mon Sep 17 00:00:00 2001 From: Jeremy Lempereur Date: Fri, 18 Aug 2023 12:11:54 +0200 Subject: [PATCH 04/12] Update CHANGELOG.md Co-authored-by: Gary Pennington --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3ce1332c09..a20bbab7e6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,7 +22,7 @@ It has one attributes: coprocessor.stage: string (RouterRequest, RouterResponse, SubgraphRequest, SubgraphResponse) ``` -It is an histogram metric tracking the time spent calling into the coprocessor +It is a histogram metric tracking the time spent calling into the coprocessor By [@Geal](https://github.com/Geal) in https://github.com/apollographql/router/pull/3513 From 9ef88dc61e474adb35b5d20ac94b1960667b87a3 Mon Sep 17 00:00:00 2001 From: Jeremy Lempereur Date: Fri, 18 Aug 2023 12:12:03 +0200 Subject: [PATCH 05/12] Update CHANGELOG.md Co-authored-by: Gary Pennington --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a20bbab7e6..bfbc40cadc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -69,7 +69,7 @@ By [@o0Ignition0o](https://github.com/o0Ignition0o) and [@BlenderDude](https://g ### Helm: add init containers to deployemt ([Issue #3248](https://github.com/apollographql/router/issues/3248)) -This is a new option when starting the router, so that before starting another container runs and performs necessary tasks. +This is a new option when deploying the router, so that containers may be specified which execute before the Router container (or any extra Containers) begin executing. You can read more about [init containers](https://kubernetes.io/docs/concepts/workloads/pods/init-containers/) in the kubernetes documentation. By [@laszlorostas](https://github.com/laszlorostas) in https://github.com/apollographql/router/pull/3444 From 07a2c614e757f42dc57aeef9c28869e6f92538c3 Mon Sep 17 00:00:00 2001 From: Jeremy Lempereur Date: Fri, 18 Aug 2023 12:12:14 +0200 Subject: [PATCH 06/12] Update CHANGELOG.md Co-authored-by: Gary Pennington --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bfbc40cadc..0ccd254f80 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -75,7 +75,7 @@ By [@laszlorostas](https://github.com/laszlorostas) in https://github.com/apollo ### Helm: exposes the lifecycle object on the router container ([Issue #3563](https://github.com/apollographql/router/issues/3563)) -You can now set the kubernetes lifecycle object on the router container in the helm chart. +You can now set the [kubernetes lifecycle object](https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/) on the router container in the helm chart. By [@bjoernw](https://github.com/bjoernw) in https://github.com/apollographql/router/pull/3570 From 2fda4245c4da16081c44989fa1d78503ab03b713 Mon Sep 17 00:00:00 2001 From: Jeremy Lempereur Date: Fri, 18 Aug 2023 12:12:30 +0200 Subject: [PATCH 07/12] Update CHANGELOG.md Co-authored-by: Bryn Cooke --- CHANGELOG.md | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ccd254f80..a90cb0cba0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,7 +28,22 @@ By [@Geal](https://github.com/Geal) in https://github.com/apollographql/router/p ### Supergraph coprocessor implementation ([PR #3408](https://github.com/apollographql/router/pull/3408)) -This adds support for coprocessors at the supergraph service level. Supergraph plugins work on the request side with a parsed GraphQL request object, so the query and operation name, variables and extensions are directly accessible. On the response side, they handle GraphQL response objects, with label, data, path, errors, extensions. The supergraph response contains a stream of GraphQL responses, which can contain multiple elements if the query uses `@defer` or subscriptions. When configured to observe the responses, the coprocessor will be called for each of the deferred responses. +Coprocessors now support supergraph service interception. + +Supergraph request contains: +* query +* operation name +* variables +* extensions + +Supergraph reqponse contains: +* label +* data +* path +* errors +* extensions + +When using `@defer` or subscriptions a supergraph response may contain multiple GraphQL responses, and the coprocessor will be called for each. By [@Geal](https://github.com/Geal) in https://github.com/apollographql/router/pull/3408 From d06dff858f8a03bd7547cd4c2fbd7d1d47b789aa Mon Sep 17 00:00:00 2001 From: Jeremy Lempereur Date: Fri, 18 Aug 2023 12:12:37 +0200 Subject: [PATCH 08/12] Update CHANGELOG.md Co-authored-by: Bryn Cooke --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a90cb0cba0..a084dc1c10 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -112,7 +112,7 @@ By [@krishna15898](https://github.com/krishna15898) in https://github.com/apollo ### Fix redis reconnections ([Issue #3045](https://github.com/apollographql/router/issues/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. +Redis 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). The router will now always retry 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: - release the lock on the in memory cache while waiting for redis, to let the in memory cache serve other requests From df607777d9ebf285e93496cf139274d6db4526d9 Mon Sep 17 00:00:00 2001 From: Jeremy Lempereur Date: Fri, 18 Aug 2023 12:12:45 +0200 Subject: [PATCH 09/12] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a084dc1c10..4cbfc563a8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -142,7 +142,7 @@ This changeset allows the router to signal clients that a `SUBSCRIPTION_SCHEMA_R By [@bnjjj](https://github.com/bnjjj) in https://github.com/apollographql/router/pull/3341 -### Redis storage: return an error instead if a non serializable value is sent. ([#3594](https://github.com/apollographql/router/issues/3594)) +### Redis storage: return an error if a non serializable value is sent. ([#3594](https://github.com/apollographql/router/issues/3594)) This changeset returns an error if a value couldn't be serialized before being sent to the redis storage backend. It also logs the error in console and prompts you to open an issue (This message showing up would be a router bug!). From f5d6f330582aa64e3ebacd9e297fd87d4f0d9c52 Mon Sep 17 00:00:00 2001 From: Jeremy Lempereur Date: Fri, 18 Aug 2023 12:13:02 +0200 Subject: [PATCH 10/12] Update CHANGELOG.md Co-authored-by: Bryn Cooke --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4cbfc563a8..0e0043f474 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -98,9 +98,9 @@ By [@bjoernw](https://github.com/bjoernw) in https://github.com/apollographql/ro ### Require the main (GraphQL) route to shutdown before other routes ([Issue #3521](https://github.com/apollographql/router/issues/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. +Router shutdown sequence has been improved to ensure 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. +This was particularly undesirable when the router is executing in Kubernetes, since continuing to report live/ready checks during shutdown is a requirement. By [@garypen](https://github.com/garypen) in https://github.com/apollographql/router/pull/3557 From 00a819eb1959c6f8f6dd9bcfab662267b5b5d29b Mon Sep 17 00:00:00 2001 From: o0Ignition0o Date: Fri, 18 Aug 2023 12:13:42 +0200 Subject: [PATCH 11/12] apply bryns suggestion --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0e0043f474..ff4fc02ece 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,7 +22,9 @@ It has one attributes: coprocessor.stage: string (RouterRequest, RouterResponse, SubgraphRequest, SubgraphResponse) ``` -It is a histogram metric tracking the time spent calling into the coprocessor +It is a histogram metric tracking the time spent calling into the coprocessor. + +Note that the name of this metric may change in the future. By [@Geal](https://github.com/Geal) in https://github.com/apollographql/router/pull/3513 From de138b92757748bb5fed8409a56732c4d9165893 Mon Sep 17 00:00:00 2001 From: Jeremy Lempereur Date: Fri, 18 Aug 2023 13:46:43 +0200 Subject: [PATCH 12/12] Apply suggestions from code review Co-authored-by: Jesse Rosenberger Co-authored-by: Chandrika Srinivasan --- CHANGELOG.md | 81 ++++++++++++++++++++++++++-------------------------- 1 file changed, 41 insertions(+), 40 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ff4fc02ece..7751be5d97 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ This project adheres to [Semantic Versioning v2.0.0](https://semver.org/spec/v2. ## 🚀 Features -### add a metric tracking coprocessor latency ([Issue #2924](https://github.com/apollographql/router/issues/2924)) +### Add a metric tracking coprocessor latency ([Issue #2924](https://github.com/apollographql/router/issues/2924)) Introduces a new metric for the router: @@ -16,7 +16,7 @@ Introduces a new metric for the router: apollo.router.operations.coprocessor.duration ``` -It has one attributes: +It has one attribute: ``` coprocessor.stage: string (RouterRequest, RouterResponse, SubgraphRequest, SubgraphResponse) @@ -49,7 +49,7 @@ When using `@defer` or subscriptions a supergraph response may contain multiple By [@Geal](https://github.com/Geal) in https://github.com/apollographql/router/pull/3408 -### Configure AWS sigv4 authentication for subgraph requests ([PR #3365](https://github.com/apollographql/router/pull/3365)) +### Configure AWS SigV4 authentication for subgraph requests ([PR #3365](https://github.com/apollographql/router/pull/3365)) Secure your router to subgraph communication on AWS using [Signature Version 4](https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html) (Sigv4)! This changeset provides you with a way to set up hard-coded credentials, as well as a default provider chain. @@ -84,15 +84,15 @@ The full documentation can be found in the [router documentation](https://www.ap By [@o0Ignition0o](https://github.com/o0Ignition0o) and [@BlenderDude](https://github.com/BlenderDude) in https://github.com/apollographql/router/pull/3365 -### Helm: add init containers to deployemt ([Issue #3248](https://github.com/apollographql/router/issues/3248)) +### Helm: add init containers to deployment ([Issue #3248](https://github.com/apollographql/router/issues/3248)) -This is a new option when deploying the router, so that containers may be specified which execute before the Router container (or any extra Containers) begin executing. You can read more about [init containers](https://kubernetes.io/docs/concepts/workloads/pods/init-containers/) in the kubernetes documentation. +This is a new option when deploying the router, so that containers may be specified which execute before the Router container (or any extra Containers) begin executing. You can read more about [init containers](https://kubernetes.io/docs/concepts/workloads/pods/init-containers/) in the Kubernetes documentation. By [@laszlorostas](https://github.com/laszlorostas) in https://github.com/apollographql/router/pull/3444 -### Helm: exposes the lifecycle object on the router container ([Issue #3563](https://github.com/apollographql/router/issues/3563)) +### Helm: expose the `lifecycle` object on the router container ([Issue #3563](https://github.com/apollographql/router/issues/3563)) -You can now set the [kubernetes lifecycle object](https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/) on the router container in the helm chart. +You can now set the [Kubernetes `lifecycle` object](https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/) on the router container in the helm chart. By [@bjoernw](https://github.com/bjoernw) in https://github.com/apollographql/router/pull/3570 @@ -106,26 +106,29 @@ This was particularly undesirable when the router is executing in Kubernetes, si By [@garypen](https://github.com/garypen) in https://github.com/apollographql/router/pull/3557 -### spelling of content_negociation corrected to content_negotiation ([Issue #3204](https://github.com/apollographql/router/issues/3204)) +### Spelling of `content_negociation` corrected to `content_negotiation` ([Issue #3204](https://github.com/apollographql/router/issues/3204)) -spelling mistake in content_negociation is fixed +We had a bit of a French twist on one of our internal module names. We won't promise it won't happen again, but `content_negociation` is spelled as `content_negotiation` now. 😄 + +Thank you for this contribution! By [@krishna15898](https://github.com/krishna15898) in https://github.com/apollographql/router/pull/3162 -### Fix redis reconnections ([Issue #3045](https://github.com/apollographql/router/issues/3045)) +### Fix Redis reconnections ([Issue #3045](https://github.com/apollographql/router/issues/3045)) -Redis 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). The router will now always retry 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. +Redis 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). The router will now always retry with a maximum delay of 2 seconds, and a timeout of 1 millisecond, so that the router can continue serving requests in the meantime. This commit contains additional fixes: -- release the lock on the in memory cache while waiting for redis, to let the in memory cache serve other requests -- add a custom serializer for `SubSelectionKey`: this type is used as key in a `HashMap`, which is converted to a JSON object, and object keys must be strings, so a specific serializer is needed instead of the derived one +- Release the lock on the in-memory cache while waiting for Redis, to let the in memory cache serve other requests. +- Add a custom serializer for the `SubSelectionKey` type. This type is used as key in a `HashMap` which is converted to a JSON object. Since object keys in JSON must be strings, a specific serializer was needed instead of the derived one. By [@Geal](https://github.com/Geal) in https://github.com/apollographql/router/pull/3509 -### Close the subscription when a new schema has been detected during hot reload ([Issue #3320](https://github.com/apollographql/router/issues/3320)) +### Close the subscription when a new supergraph becomes active ([Issue #3320](https://github.com/apollographql/router/issues/3320)) + +Router schema/supergraph updates weren't resetting existing subscriptions which meant they could run with an out of date query plan. -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: +With this change, the router will signal clients that a `SUBSCRIPTION_SCHEMA_RELOAD` has occurred and close the running subscription. Clients will then subscribe again: ```json @@ -146,57 +149,55 @@ By [@bnjjj](https://github.com/bnjjj) in https://github.com/apollographql/router ### Redis storage: return an error if a non serializable value is sent. ([#3594](https://github.com/apollographql/router/issues/3594)) -This changeset returns an error if a value couldn't be serialized before being sent to the redis storage backend. -It also logs the error in console and prompts you to open an issue (This message showing up would be a router bug!). +An error will now be logged when a value is unable to be serialized before being sent to the Redis storage backend. The message suggests opening an issue since this would be a router bug that we'd need to fix! By [@o0Ignition0o](https://github.com/o0Ignition0o) in https://github.com/apollographql/router/pull/3597 -### Fix: handle ping/pong websocket messages before the Ack message is received. ([PR #3562](https://github.com/apollographql/router/pull/3562)) +### Handle ping/pong websocket messages before the Ack message is received ([PR #3562](https://github.com/apollographql/router/pull/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](https://github.com/o0Ignition0o) in https://github.com/apollographql/router/pull/3562 -### Fix the error count for subscription requests for apollo telemetry ([PR #3500](https://github.com/apollographql/router/pull/3500)) +### Subscription requests only count in telemetry if the feature is actually enabled ([PR #3500](https://github.com/apollographql/router/pull/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. +The router would previously count subscription requests regardless of whether the feature was enabled or not. This fix changes the behavior to only count subscription requests when the feature is enabled. By [@bnjjj](https://github.com/bnjjj) in https://github.com/apollographql/router/pull/3500 ## 🛠 Maintenance -### Update datadog-subgraph npm dependencies ([PR #3560](https://github.com/apollographql/router/pull/3560)) +### Update `datadog-subgraph/`'s npm dependencies ([PR #3560](https://github.com/apollographql/router/pull/3560)) -This changeset updates the dd-trace dependency and the nodeJS version of the example Dockerfile. +This changeset updates the `dd-trace` dependency and the Node.js version of the example Dockerfile. By [@o0Ignition0o](https://github.com/o0Ignition0o) in https://github.com/apollographql/router/pull/3560 -### Remove some panic! calls from the pq code. ([PR #3527](https://github.com/apollographql/router/pull/3527)) +### Remove some `panic!` calls in persisted query logic ([PR #3527](https://github.com/apollographql/router/pull/3527)) -Replace a few `panic!` calls with `expect()` in the persisted query code for code clarity. +Replace a few `panic!` calls with `expect()`s in the persisted query code to improve clarity. By [@BrynCooke](https://github.com/BrynCooke) in https://github.com/apollographql/router/pull/3527 -### Add a warning if we think istio-proxy injection is causing problems ([Issue #3533](https://github.com/apollographql/router/issues/3533)) +### Add a warning if we think `istio-proxy` injection is causing problems ([Issue #3533](https://github.com/apollographql/router/issues/3533)) -We have encountered situations where the injection of istio-proxy in a router pod (executing in Kubernetes) causes networking errors during uplink retrieval. +We have encountered situations where the injection of `istio-proxy` in a router pod (executing in Kubernetes) causes networking errors during [Apollo Uplink](https://www.apollographql.com/docs/federation/managed-federation/uplink/) communication. -The root cause is that the router is executing and attempting to retrieve uplink schemas while the istio-proxy is simultaneously modifying network configuration. +The situation isn't due to Apollo Uplink, but rather the router is executing and attempting to retrieve Apollo Uplink data while the `istio-proxy` is simultaneously modifying its 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](https://github.com/garypen) in https://github.com/apollographql/router/pull/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](https://github.com/apollographql/router/issues/3526)) +### Log when custom plugins are detected with potentially-silenced log entries ([Issue #3526](https://github.com/apollographql/router/issues/3526)) -Since [#3477](https://github.com/apollographql/router/pull/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. +Since [PR #3477](https://github.com/apollographql/router/pull/3477), users with custom plugins lost some log entries. This is because the default logging filter now restricts log entries to those that are in the `apollo` module, as originally intended. -Users that have custom plugins will need to configure the logging filter to include their modules, but they may not realise this. +Users that have custom plugins need to configure the logging filter to include their modules, but may not have realised 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. +Now, if a custom plugin is detected, a message will be logged to the console indicating that the logging filter may need to be configured. By [@BrynCooke](https://github.com/BrynCooke) in https://github.com/apollographql/router/pull/3540 @@ -208,14 +209,14 @@ By [@Geal](https://github.com/Geal) in https://github.com/apollographql/router/p ## 📚 Documentation -### Document the Redis URL format ([Issue #3534](https://github.com/apollographql/router/issues/3534)) +### Redis URL format ([Issue #3534](https://github.com/apollographql/router/issues/3534)) The Redis client used in the Router follows a convention on Redis server URLs to indicate TLS, cluster or sentinel usage By [@Geal](https://github.com/Geal) in https://github.com/apollographql/router/pull/3556 -### Document the request lifecycle ([PR #3391](https://github.com/apollographql/router/pull/3391)) +### Request lifecycle ([PR #3391](https://github.com/apollographql/router/pull/3391)) This adds in-depth documentation of: - the entire request lifecycle @@ -225,17 +226,17 @@ This adds in-depth documentation of: By [@Geal](https://github.com/Geal) [@Meschreiber](https://github.com/Meschreiber) in https://github.com/apollographql/router/pull/3391 -### document TLS termination and subgraph override ([Issue #3100](https://github.com/apollographql/router/issues/3100)) +### TLS termination and subgraph overrides ([Issue #3100](https://github.com/apollographql/router/issues/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. +TLS termination was added in [PR #2614](https://github.com/apollographql/router/pull/2614) but never documented. Subgraph certificate override was added in [PR #2008](https://github.com/apollographql/router/pull/2008) but the documentation missed some details on self-signed certificates. These have both been corrected! By [@Geal](https://github.com/Geal) in https://github.com/apollographql/router/pull/3436 -### self is immutable in the Plugin trait's methods ([Issue #3539](https://github.com/apollographql/router/issues/3539)) +### `self` is immutable in the `Plugin` trait's methods ([Issue #3539](https://github.com/apollographql/router/issues/3539)) -The documentation previously displayed plugin's methods as taking a mutable reference to self, while they actually take a non mutable reference to it. +The documentation previously displayed `Plugin`'s methods as taking a mutable reference to `self`, while they actually take an _immutable_ reference to it. -This changeset fixes the documentation. +We've fixed the documentation. By [@Geal](https://github.com/Geal) in https://github.com/apollographql/router/pull/3555