From 2407ea40068a888c09454ccbe84af3ffd1cc97e7 Mon Sep 17 00:00:00 2001 From: o0Ignition0o Date: Fri, 11 Aug 2023 13:38:19 +0200 Subject: [PATCH 1/2] prep release: v1.27.0-alpha.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 - .../feat_geal_coprocessor_latency_metric.md | 17 - .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 - ...x_igni_subscriptions_subgraph_ping_pong.md | 5 - .changesets/fix_porch_pulse_bloody_receipt.md | 21 - .../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 | 194 ++++++++ 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 | 28 +- helm/chart/router/Chart.yaml | 4 +- helm/chart/router/README.md | 7 +- licenses.html | 417 +++++++++++++++++- scripts/install.sh | 2 +- 33 files changed, 639 insertions(+), 200 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_geal_coprocessor_latency_metric.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_subscriptions_subgraph_ping_pong.md delete mode 100644 .changesets/fix_porch_pulse_bloody_receipt.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_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_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_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/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..4d49493d7c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,200 @@ 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-alpha.0] - 2023-08-11 + +## 🚀 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 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 + +### 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 + +## 🐛 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 + +### 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 + +### 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)) + +The [Native customizations section of the docs](https://www.apollographql.com/docs/router/customizations/native/) was wrongly portraying Plugin services taking `&mut self` while they take `&self`. +The doc is now up to date. + +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 056968aec5..a5b69d575e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -271,7 +271,7 @@ dependencies = [ [[package]] name = "apollo-router" -version = "1.26.0" +version = "1.27.0-alpha.0" dependencies = [ "access-json", "anyhow", @@ -415,7 +415,7 @@ dependencies = [ [[package]] name = "apollo-router-benchmarks" -version = "1.26.0" +version = "1.27.0-alpha.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-alpha.0" dependencies = [ "anyhow", "cargo-scaffold", diff --git a/apollo-router-benchmarks/Cargo.toml b/apollo-router-benchmarks/Cargo.toml index 72c1f04ec5..eb3de04b3e 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-alpha.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 b710b3b903..a49fe91bd6 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-alpha.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..b2bf1e37ae 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-alpha.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..b7f702fb8c 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-alpha.0" } {{/if}} {{/if}} anyhow = "1.0.58" diff --git a/apollo-router/Cargo.toml b/apollo-router/Cargo.toml index 13f90ce337..738b1e680a 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-alpha.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..963c09474a 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-alpha.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..6beda9e879 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-alpha.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 0d1ffed92d..508d5de642 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-alpha.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..8a20c18f18 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-alpha.0` ## Override the configuration diff --git a/docs/source/containerization/kubernetes.mdx b/docs/source/containerization/kubernetes.mdx index 46c4b30187..eeb2782355 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-alpha.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-alpha.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-alpha.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-alpha.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-alpha.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-alpha.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-alpha.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-alpha.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-alpha.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-alpha.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-alpha.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-alpha.0" imagePullPolicy: IfNotPresent args: - --hot-reload @@ -223,10 +223,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-alpha.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-alpha.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..6cf45720cb 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-alpha.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-alpha.0" \ No newline at end of file diff --git a/helm/chart/router/README.md b/helm/chart/router/README.md index cb193c1904..71422daeed 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-alpha.0](https://img.shields.io/badge/Version-1.27.0--alpha.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v1.27.0-alpha.0](https://img.shields.io/badge/AppVersion-v1.27.0--alpha.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-alpha.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-alpha.0 --values my-values.yaml ``` _See [configuration](#configuration) below._ @@ -63,6 +63,7 @@ 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"] | | 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..d4dd3253d9 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.
      +
       
    • @@ -6914,6 +7322,7 @@

      Used by:

    • wasm-bindgen-shared
    • web-sys
    • wiremock
    • +
    • xmlparser
    • yaml-rust
    • yansi
    @@ -11580,9 +11989,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 +12082,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..6caf38b070 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-alpha.0" download_binary() { downloader --check From 58651ecc6c4f0bc75a5900127dddf0f40c0df578 Mon Sep 17 00:00:00 2001 From: o0Ignition0o Date: Fri, 11 Aug 2023 13:49:19 +0200 Subject: [PATCH 2/2] revert changelog changes. those will happen when we cut the actual release. this_release.md is valuable though. --- .../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 + .../feat_geal_coprocessor_latency_metric.md | 17 ++ .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 + ...x_igni_subscriptions_subgraph_ping_pong.md | 5 + .changesets/fix_porch_pulse_bloody_receipt.md | 21 ++ .../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 | 194 ------------------ 18 files changed, 163 insertions(+), 194 deletions(-) create mode 100644 .changesets/docs_geal_document_request_lifecycle.md create mode 100644 .changesets/docs_geal_document_tls.md create mode 100644 .changesets/docs_geal_plugin_doc_fix.md create mode 100644 .changesets/docs_geal_redis_connection_schemes.md create mode 100644 .changesets/feat_add_helm_init_containers.md create mode 100644 .changesets/feat_geal_coprocessor_latency_metric.md create mode 100644 .changesets/feat_igni_subgraph_auth.md create mode 100644 .changesets/fix_bnjjj_fix_subscription_metrics.md create mode 100644 .changesets/fix_garypen_3521_keep_listening.md create mode 100644 .changesets/fix_geal_redis_fixes.md create mode 100644 .changesets/fix_igni_subscriptions_subgraph_ping_pong.md create mode 100644 .changesets/fix_porch_pulse_bloody_receipt.md create mode 100644 .changesets/maint_contract_fiancee_ark_grey.md create mode 100644 .changesets/maint_garypen_3533_istio_warn.md create mode 100644 .changesets/maint_geal_parent_based_sampling_test.md create mode 100644 .changesets/maint_igni_dockerfiles_datadog_dependencies.md create 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 new file mode 100644 index 0000000000..c6e6ba536a --- /dev/null +++ b/.changesets/docs_geal_document_request_lifecycle.md @@ -0,0 +1,9 @@ +### 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 new file mode 100644 index 0000000000..a25dabc585 --- /dev/null +++ b/.changesets/docs_geal_document_tls.md @@ -0,0 +1,5 @@ +### 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 new file mode 100644 index 0000000000..46552bb5b6 --- /dev/null +++ b/.changesets/docs_geal_plugin_doc_fix.md @@ -0,0 +1,4 @@ +### 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 new file mode 100644 index 0000000000..b6cf9b8ee3 --- /dev/null +++ b/.changesets/docs_geal_redis_connection_schemes.md @@ -0,0 +1,6 @@ +### 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 new file mode 100644 index 0000000000..e5d42b65f0 --- /dev/null +++ b/.changesets/feat_add_helm_init_containers.md @@ -0,0 +1,5 @@ +### 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_geal_coprocessor_latency_metric.md b/.changesets/feat_geal_coprocessor_latency_metric.md new file mode 100644 index 0000000000..3b46315643 --- /dev/null +++ b/.changesets/feat_geal_coprocessor_latency_metric.md @@ -0,0 +1,17 @@ +### 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_igni_subgraph_auth.md b/.changesets/feat_igni_subgraph_auth.md new file mode 100644 index 0000000000..d4f4898df7 --- /dev/null +++ b/.changesets/feat_igni_subgraph_auth.md @@ -0,0 +1,34 @@ +### 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 new file mode 100644 index 0000000000..b955f53dbd --- /dev/null +++ b/.changesets/fix_bnjjj_fix_subscription_metrics.md @@ -0,0 +1,7 @@ +### 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 new file mode 100644 index 0000000000..2a796ef96c --- /dev/null +++ b/.changesets/fix_garypen_3521_keep_listening.md @@ -0,0 +1,7 @@ +### 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 new file mode 100644 index 0000000000..abb955e25c --- /dev/null +++ b/.changesets/fix_geal_redis_fixes.md @@ -0,0 +1,9 @@ +### 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_subscriptions_subgraph_ping_pong.md b/.changesets/fix_igni_subscriptions_subgraph_ping_pong.md new file mode 100644 index 0000000000..dd8397d770 --- /dev/null +++ b/.changesets/fix_igni_subscriptions_subgraph_ping_pong.md @@ -0,0 +1,5 @@ +### 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 new file mode 100644 index 0000000000..2f1d4b84b1 --- /dev/null +++ b/.changesets/fix_porch_pulse_bloody_receipt.md @@ -0,0 +1,21 @@ +### 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/maint_contract_fiancee_ark_grey.md b/.changesets/maint_contract_fiancee_ark_grey.md new file mode 100644 index 0000000000..cd812be36b --- /dev/null +++ b/.changesets/maint_contract_fiancee_ark_grey.md @@ -0,0 +1,5 @@ +### 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 new file mode 100644 index 0000000000..916457ce2d --- /dev/null +++ b/.changesets/maint_garypen_3533_istio_warn.md @@ -0,0 +1,9 @@ +### 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 new file mode 100644 index 0000000000..bf006ba94b --- /dev/null +++ b/.changesets/maint_geal_parent_based_sampling_test.md @@ -0,0 +1,5 @@ +### 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 new file mode 100644 index 0000000000..e6a106f19b --- /dev/null +++ b/.changesets/maint_igni_dockerfiles_datadog_dependencies.md @@ -0,0 +1,5 @@ +### 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 new file mode 100644 index 0000000000..ed2af63f9e --- /dev/null +++ b/.changesets/maint_rhubarb_waterfront_notebook.md @@ -0,0 +1,10 @@ +### 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 4d49493d7c..7f0da82a0a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,200 +4,6 @@ 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-alpha.0] - 2023-08-11 - -## 🚀 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 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 - -### 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 - -## 🐛 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 - -### 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 - -### 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)) - -The [Native customizations section of the docs](https://www.apollographql.com/docs/router/customizations/native/) was wrongly portraying Plugin services taking `&mut self` while they take `&self`. -The doc is now up to date. - -By [@Geal](https://github.com/Geal) in https://github.com/apollographql/router/pull/3555 - - - # [1.26.0] - 2023-07-28 ## 🚀 Features