-
Notifications
You must be signed in to change notification settings - Fork 272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
prep release: v1.16.0 #3032
Merged
Merged
prep release: v1.16.0 #3032
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Geal
reviewed
May 3, 2023
abernix
commented
May 3, 2023
Co-authored-by: Geoffroy Couprie <apollo@geoffroycouprie.com>
garypen
reviewed
May 3, 2023
Geal
approved these changes
May 3, 2023
Co-authored-by: Gary Pennington <gary@apollographql.com>
Co-authored-by: Gary Pennington <gary@apollographql.com>
garypen
approved these changes
May 3, 2023
This was referenced May 3, 2023
Merged
abernix
added a commit
that referenced
this pull request
May 4, 2023
Merely merges `main` into `dev` after the v1.16.0 release in #3032
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🚀 Features
Add ability to transmit un-redacted errors from federated traces to Apollo Studio
When using subgraphs which are enabled with Apollo Federated Tracing, the error messages within those traces will be redacted by default.
New configuration (
tracing.apollo.errors.subgraph.all.redact
, which defaults totrue
) enables or disables the redaction mechanism. Similar configuration (tracing.apollo.errors.subgraph.all.send
, which also defaults totrue
) enables or disables the entire transmission of the error to Studio.The error messages returned to the clients are not changed or redacted from their previous behavior.
To enable sending subgraph's federated trace error messages to Studio without redaction, you can set the following configuration:
It is also possible to configure this per-subgraph using a
subgraphs
map at the same level asall
in the configuration, much like other sections of the configuration which have subgraph-specific capabilities:By @bnjjj in #3011
Introduce
response.is_primary
Rhai helper for working with deferred responses (Issue #2935) (Issue #2936)A new Rhai
response.is_primary()
helper has been introduced that returnsfalse
when the current chunk being processed is a deferred response chunk. Put another way, it will befalse
if the chunk is a follow-up response to the initial primary response, during the fulfillment of a@defer
'd fragment in a larger operation. The initial response will beis_primary() == true
. This aims to provide the right primitives so users can write more defensible error checking. The introduction of this relates to a bug fix noted in the Fixes section below.By @garypen in #2945
Time-based forced hot-reload for "chaos" testing
For testing purposes, the Router can now artificially be forced to hot-reload (as if the configuration or schema had changed) at a configured time interval. This can help reproduce issues like reload-related memory leaks. We don't recommend using this in any production environment. (If you are compelled to use it in production, please let us know about your use case!)
The new configuration section for this "chaos" testing is (and will likely remain) marked as "experimental":
By @SimonSapin in #2988
Provide helpful console output when using "preview" features, just like "experimental" features
This expands on the existing mechanism that was originally introduced in #2242, which supports the notion of an "experimental" feature, and make it compatible with the notion of "preview" features.
When preview or experimental features are used, an
INFO
-level log is emitted during startup to notify of which features are used and shows URLs to their GitHub discussions, for feedback. Additionally,router config experimental
androuter config preview
CLI sub-commands list all such features in the current Router version, regardless of which are used in a given configuration file.For more information about launch stages, please see the documentation here: https://www.apollographql.com/docs/resources/product-launch-stages/
By @o0ignition0o, @abernix, and @SimonSapin in #2960
Report
operationCountByType
counts to Apollo Studio (PR #2979)This adds the ability for Studio to track operation counts broken down by type of operations (e.g.,
query
vsmutation
). Previously, we only reported total operation count.By @bnjjj in #2979
🐛 Fixes
Update to Federation v2.4.2
This update to Federation v2.4.2 fixes a potential bug when an
@interfaceObject
type has a@requires
. This might be encountered when an@interfaceObject
type has a field with a@requires
and the query requests that field only for some specific implementations of the corresponding interface. In this case, the generated query plan was sometimes invalid and could result in an invalid query to a subgraph. In the case that the subgraph was an Apollo Server implementation, this lead the subgraph producing an"The _entities resolver tried to load an entity for type X, but no object or interface type of that name was found in the schema"
error.By @abernix in #2910
Fix handling of deferred response errors from Rhai scripts (Issue #2935) (Issue #2936)
If a Rhai script was to error while processing a deferred response (i.e., an operation which uses
@defer
) the Router was ignoring the error and returningNone
in the stream of results. This had two unfortunate aspects:With this fix we now capture the error and still propagate the response to the client. This fix also adds support for the
is_primary()
method which may be invoked on bothsupergraph_service()
andexecution_service()
responses. It may be used to avoid implementing exception handling for header interactions and to determine if a responseis_primary()
(i.e., first) or not.e.g.:
vs
By @garypen in #2945
Fix incorrectly placed "message" in Rhai JSON-formatted logging (Issue #2777)
This fixes a bug where Rhai logging was incorrectly putting the message of the log into the
out
attribute, when serialized as JSON. Previously, themessage
field was showingrhai_{{level}}
(i.e.,rhai_info
), despite there being a separatelevel
field in the JSON structure.The impact of this fix can be seen in this example where we call
log_info()
in a Rhai script:log_info("this is info");
Previously, this would result in a log as follows, with the text of the message set within
out
, rather thanmessage
.After the change, the message is correctly within
message
. The level continues to be available atlevel
. We've also additionally added atarget
property which shows the file which produced the error:By @garypen in #2975
Deferred responses now utilize compression, when requested (Issue #1572)
We previously had to disable compression on deferred responses due to an upstream library bug. To fix this, we've replaced
tower-http
'sCompressionLayer
with a custom stream transformation. This is necessary becausetower-http
usesasync-compression
under the hood, which buffers data until the end of the stream, analyzes it, then writes it, ensuring a better compression. However, this is wholly-incompatible with a core concept of the multipart protocol for@defer
, which requires chunks to be sent as soon as possible. To support that, we need to compress chunks independently.This extracts parts of the
codec
module ofasync-compression
, which so far is not public, and makes a streaming wrapper above it that flushes the compressed data on every response within the stream.By @Geal in #2986
Update the
h2
dependency to fix a potential Denial-of-Service (DoS) vulnerabilityProactively addresses the advisory in https://rustsec.org/advisories/RUSTSEC-2023-0034, though we have no evidence that suggests it has been exploited on any Router deployment.
By @Geal in #2982
Rate limit errors emitted from OpenTelemetry (Issue #2953)
When a batch span exporter is unable to send accept a span because the buffer is full it will emit an error. These errors can be very frequent and could potentially impact performance. To mitigate this, OpenTelemetry errors are now rate limited to one every ten seconds, per error type.
By @bryncooke in #2954
Improved messaging when a request is received without an operation (Issue #2941)
The message that is displayed when a request has been sent to the Router without an operation has been improved. This materializes as a developer experience improvement since users (especially those using GraphqL for the first time) might send a request to the Router using a tool that isn't GraphQL-aware, or might just have their API tool of choice misconfigured.
Previously, the message stated "missing query string", but now more helpfully suggests sending either a POST or GET request and specifying the desired operation as the
query
parameter (i.e., either in the POST data or in the query string parameters for GET queries).By @kushal-93 in #2955
Traffic shaping configuration fix for global
experimental_enable_http2
We've resolved a case where the
experimental_enable_http2
feature wouldn't properly apply when configured with a global configuration.Huge thanks to @westhechiang, @leggomuhgreggo, @vecchp and @davidvasandani for discovering the issue and finding a reproducible testcase!
By @o0Ignition0o in #2976
Limit the memory usage of the
apollo
OpenTelemetry exporter (PR #3006)We've added a new LRU cache in place of a
Vec
for sub-span data to avoid keeping all events for a span in memory, since we don't need it for our computations.By @bnjjj in #3006