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

Support JSONSelection in URIs and headers #6459

Draft
wants to merge 11 commits into
base: next
Choose a base branch
from

Conversation

dylan-apollo
Copy link
Member

This very large PR (sorry 😓) does a few things:

  1. Unify the way that expressions (the { } bits) in header values and URI templates are handled. This means that headers now are adopting the same breaking changes that URIs got last release: no arrays/objects allowed, nulls are empty strings
  2. Treat those expressions as JSONSelection rather than an independent VariableReference. This also means a lot of parsing code is now gone.

As a result of those things, we lose some of the features that VariableReference were giving us. These will be handled in separate issues/PRs:

  1. Type checking at composition time to prevent arrays/objects from being used
  2. Suggestions on correct namespaces when a nonsensical one (like $foo) is used
  3. Preventing the use of $ and the automatic stuff from it

We're also currently ignoring most of the errors that come from interpolating URIs/headers now—we'll want to add those into the Sandbox debugger in the future.

# Conflicts:
#	apollo-federation/src/sources/connect/expand/mod.rs
#	apollo-federation/src/sources/connect/expand/tests/snapshots/[email protected]
#	apollo-federation/src/sources/connect/header.rs
#	apollo-federation/src/sources/connect/models.rs
#	apollo-federation/src/sources/connect/url_template.rs
#	apollo-federation/src/sources/connect/validation/graphql/strings.rs
#	apollo-federation/src/sources/connect/validation/snapshots/validation_tests@keys_and_entities__invalid__arg_is_object_but_field_is_not.graphql.snap
#	apollo-federation/src/sources/connect/variable.rs
@dylan-apollo dylan-apollo requested a review from a team as a code owner December 13, 2024 23:04
@svc-apollo-docs
Copy link
Collaborator

svc-apollo-docs commented Dec 13, 2024

✅ Docs Preview Ready

No new or changed pages found.

@router-perf
Copy link

router-perf bot commented Dec 13, 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

# Conflicts:
#	apollo-federation/src/sources/connect/header.rs
#	apollo-federation/src/sources/connect/variable.rs
#	apollo-router/src/plugins/connectors/http_json_transport.rs
@dylan-apollo dylan-apollo marked this pull request as draft December 18, 2024 21:54
@dylan-apollo
Copy link
Member Author

Converted back to draft because we shouldn't merge this until we're about ready to merge shape stuff as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants