Skip to content
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

release: v1.57.0 #6169

Draft
wants to merge 49 commits into
base: main
Choose a base branch
from
Draft

release: v1.57.0 #6169

wants to merge 49 commits into from

Conversation

abernix
Copy link
Member

@abernix abernix commented Oct 17, 2024

Note
This particular PR must be true-merged to main.

  • This PR is only ready to review when it is marked as "Ready for Review". It represents the merge to the main branch of an upcoming release (version number in the title).
  • It will act as a staging branch until we are ready to finalize the release.
  • We may cut any number of alpha and release candidate (RC) versions off this branch prior to formalizing it.
  • This PR is primarily a merge commit, so reviewing every individual commit shown below is not necessary since those have been reviewed in their own PR. However, things important to review on this PR once it's marked "Ready for Review":
    • Does this PR target the right branch? (usually, main)
    • Are the appropriate version bumps and release note edits in the end of the commit list (or within the last few commits). In other words, "Did the 'release prep' PR actually land on this branch?"
    • If those things look good, this PR is good to merge!

bonnici and others added 30 commits September 9, 2024 16:46
The following is now done in `QueryAnalysisLayer` instead of in the `BridgeQueryPlanner` service:

* Finding the relevant operation in a GraphQL document based on `operationName`. Now `ParsedDocument` in context contains a reference to the parsed `apollo_compiler::executable::Operation`.
* Scan that operation’s root fields to find which are present: root `__typename`, schema intropsection, and "normal" non-meta fields. This is a preliminary step to moving introspection out of `BridgeQueryPlanner`.

As a side-effect observable to clients, the exact response for some error cases like an empty document changes slightly as the error no longer comes from JavaScript code.

Also drive-by refactor: change `spec::Query` to contain a single `Operation` instead of a `Vec<Operation>`. This removes conditionals and the need to pass `operationName` around in a lot of places, notably in execution code.
jonathanrainer and others added 17 commits October 10, 2024 14:55
Add an Environment variable to the container that's deployed
so that we can easily scan if customers are deploying using
the official Helm Chart or some other way.
…e __typename selections (#6141)

- updated sibling typename optimization to only fold a plain __typename without alias/directives.
- also, fixed __typename ordering in fetch operations to put the plain __typename ahead of others.
Schema introspection now runs natively without involving JavaScript code. We have high confidence that the two implementations return matching responses based on differential testing fuzzing arbitrary queries against a large schema, and testing a corpus of customer schemas against a comprehensive query.

In Router YAML configuration:

* The `experimental_introspection_mode` key is removed, `new` is now the only behavior
* The `supergraph.query_planning.legacy_introspection_caching` key is removed, the behavior is now similar to what was `false`: introspection responses are not part of the query plan cache but instead in a separate, small, in-memory only cache.

Migrations ensure that existing configuration files will keep working.
Co-authored-by: Simon Sapin <[email protected]>
Co-authored-by: Jesse Rosenberger <[email protected]>
Updates to latest router-bridge and federation version. This federation version:
- Fixes a query planning bug where operation variables for a subgraph query wouldn't match what's used in that query.
- Fixes a query planning bug where directives applied to `__typename` may be omitted in the subgraph query.
- Fixes a query planning inefficiency where some redundant subgraph queries were not removed.
- Fixes a query planning inefficiency where some redundant inline fragments in `@key`/`@requires` selection sets were not optimized away.
- Fixes a query planning inefficiency where unnecessary subgraph jumps were being added when using `@context`/`@fromContext`.
@svc-apollo-docs
Copy link
Collaborator

svc-apollo-docs commented Oct 17, 2024

✅ Docs Preview Ready

No new or changed pages found.

@router-perf
Copy link

router-perf bot commented Oct 17, 2024

CI performance tests

  • connectors-const - Connectors stress test that runs with a constant number of users
  • const - Basic stress test that runs with a constant number of users
  • demand-control-instrumented - A copy of the step test, but with demand control monitoring and metrics enabled
  • demand-control-uninstrumented - A copy of the step test, but with demand control monitoring enabled
  • enhanced-signature - Enhanced signature enabled
  • events - Stress test for events with a lot of users and deduplication ENABLED
  • events_big_cap_high_rate - Stress test for events with a lot of users, deduplication enabled and high rate event with a big queue capacity
  • events_big_cap_high_rate_callback - Stress test for events with a lot of users, deduplication enabled and high rate event with a big queue capacity using callback mode
  • events_callback - Stress test for events with a lot of users and deduplication ENABLED in callback mode
  • events_without_dedup - Stress test for events with a lot of users and deduplication DISABLED
  • events_without_dedup_callback - Stress test for events with a lot of users and deduplication DISABLED using callback mode
  • extended-reference-mode - Extended reference mode enabled
  • large-request - Stress test with a 1 MB request payload
  • no-tracing - Basic stress test, no tracing
  • reload - Reload test over a long period of time at a constant rate of users
  • step-jemalloc-tuning - Clone of the basic stress test for jemalloc tuning
  • step-local-metrics - Field stats that are generated from the router rather than FTV1
  • step-with-prometheus - A copy of the step test with the Prometheus metrics exporter enabled
  • step - Basic stress test that steps up the number of users over time
  • xlarge-request - Stress test with 10 MB request payload
  • xxlarge-request - Stress test with 100 MB request payload

request_context: "apollo::supergraph_schema_id" # The key containing the supergraph schema id
```

It can be used in any services at any stages. This example is using selectors on event's attributes but it can also be done on spans and instruments.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
It can be used in any services at any stages. This example is using selectors on event's attributes but it can also be done on spans and instruments.
You can use the selector in any service at any stage. While this example applies to `events` attributes, the selector can also be used on spans and instruments.

@@ -0,0 +1,21 @@
### Add support of router request_context selector and add schema id in context ([PR #6160](https://github.com/apollographql/router/pull/6160))

Added a new selector `request_context` for the router service for telemetry. Now the supergraph schema id is also available through the context so if you want to access or display this schema id at the router service level you can now configure it like this:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Added a new selector `request_context` for the router service for telemetry. Now the supergraph schema id is also available through the context so if you want to access or display this schema id at the router service level you can now configure it like this:
The router supports a new `request_context` selector for telemetry that enables access to the supergraph schema ID.
You can configure the context to access the supergraph schema ID at the router service level:

@@ -0,0 +1,21 @@
### Add support of router request_context selector and add schema id in context ([PR #6160](https://github.com/apollographql/router/pull/6160))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
### Add support of router request_context selector and add schema id in context ([PR #6160](https://github.com/apollographql/router/pull/6160))
### Support new `request_context` selector for telemetry ([PR #6160](https://github.com/apollographql/router/pull/6160))

@@ -0,0 +1,20 @@
### Support to get/set URI port in Rhai ([Issue #5437](https://github.com/apollographql/router/issues/5437))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
### Support to get/set URI port in Rhai ([Issue #5437](https://github.com/apollographql/router/issues/5437))
### Support reading URI port of request in Rhai ([Issue #5437](https://github.com/apollographql/router/issues/5437))

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This still reads a bit funny to me — what about:

Suggested change
### Support to get/set URI port in Rhai ([Issue #5437](https://github.com/apollographql/router/issues/5437))
### Support reading `port` value of request URIs using Rhai ([Issue #5437](https://github.com/apollographql/router/issues/5437))

?

@@ -0,0 +1,20 @@
### Support to get/set URI port in Rhai ([Issue #5437](https://github.com/apollographql/router/issues/5437))

This adds support to read the port from the `request.uri.port`/`request.subgraph.uri.port` functions in Rhai, enabling the ability to update the full URI for subgraph fetches. For example:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This adds support to read the port from the `request.uri.port`/`request.subgraph.uri.port` functions in Rhai, enabling the ability to update the full URI for subgraph fetches. For example:
Custom Rhai scripts in the router now support the `request.uri.port` and `request.subgraph.uri.port` functions for reading URI ports. These functions enable you to update the full URI for subgraph fetches. For example:

* The `experimental_introspection_mode` key is removed, `new` is now the only behavior
* The `supergraph.query_planning.legacy_introspection_caching` key is removed, the behavior is now similar to what was `false`: introspection responses are not part of the query plan cache but instead in a separate, small, in-memory only cache.

Migrations ensure that existing configuration files will keep working.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SimonSapin does this mean the router supports existing config files with these removed keys automatically? Or do users need to do manual migration steps of removing/updating them?

Comment on lines +1 to +3
### Add uri and method properties on router request in Rhai ([PR #6114](https://github.com/apollographql/router/pull/6114))

Previously, when trying to access `request.uri` and `request.method` on a Router Request in Rhai, Router would error saying the properties are undefined.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
### Add uri and method properties on router request in Rhai ([PR #6114](https://github.com/apollographql/router/pull/6114))
Previously, when trying to access `request.uri` and `request.method` on a Router Request in Rhai, Router would error saying the properties are undefined.
### Support URI and method properties for router request in Rhai ([PR #6114](https://github.com/apollographql/router/pull/6114))
The router now supports accessing `request.uri` and `request.method` properties from custom Rhai scripts.
Previously, when trying to access `request.uri` and `request.method` on a router request in Rhai, the router would return error messages stating the properties were undefined.
An example Rhai script using these properties:


The router now correctly handles the `__typename` field used on operation root types, even when the subgraph's root type has a name that differs from the supergraph's root type.

For example, in query like this:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
For example, in query like this:
For example, given a query like this:

.changesets/maint_feature_rhaitelemetry.md Outdated Show resolved Hide resolved
.changesets/maint_feature_rhaitelemetry.md Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.