Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Subscriptions: Correct v1.28.x regression allowing panic via un-named subscription operation #3738

Merged
merged 6 commits into from
Sep 4, 2023

Conversation

o0Ignition0o
Copy link
Contributor

This change allows the contexts OPERATION_NAME to be set to None.

This change allows the contexts OPERATION_NAME to be set to None.
@github-actions

This comment has been minimized.

@router-perf
Copy link

router-perf bot commented Sep 4, 2023

CI performance tests

  • step - Basic stress test that steps up the number of users over time
  • events_without_dedup - Stress test for events with a lot of users and deduplication DISABLED
  • xlarge-request - Stress test with 10 MB request payload
  • xxlarge-request - Stress test with 100 MB request payload
  • 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
  • const - Basic stress test that runs with a constant number of users
  • reload - Reload test over a long period of time at a constant rate of users
  • large-request - Stress test with a 1 MB request payload
  • events - Stress test for events with a lot of users and deduplication ENABLED
  • step-jemalloc-tuning - Clone of the basic stress test for jemalloc tuning
  • no-graphos - Basic stress test, no GraphOS.

let operation_name = request
.subgraph_request
.body()
.operation_name
Copy link
Contributor

Choose a reason for hiding this comment

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

is that really the expected behaviour here? The operation name that was set in the subgraph request is defined by query planner, so it will be different from the operation name extracted in query analysis

Copy link
Contributor

Choose a reason for hiding this comment

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

@o0Ignition0o o0Ignition0o changed the title Fix: Allow anonymous operation_name to be set in the context. Subscriptions: Correct v1.28.x regression allowing panic via un-named subscription operation Sep 4, 2023
@o0Ignition0o o0Ignition0o merged commit a55d8a4 into dev Sep 4, 2023
@o0Ignition0o o0Ignition0o deleted the igni/anonymous_operation_name_test branch September 4, 2023 16:20
abernix pushed a commit that referenced this pull request Sep 4, 2023
… subscription operation (#3738)

### Subscriptions: Correct v1.28.x regression allowing panic via un-named subscription operation

Correct a regression that was introduced in Router v1.28.0 which made a Router **panic** possible when the following _three_ conditions are _all_ met:

1. When sending an un-named (i.e., "anonymous") `subscription` operation (e.g., `subscription { ... }`); **and**;
2. The Router has a `subscription` type defined in the Supergraph schema; **and**
3. Have subscriptions enabled (they are disabled by default) in the Router's YAML configuration, either by setting `enabled: true` _or_ by setting a `mode` within the `subscriptions` object (as seen in [the subscriptions documentation]
@abernix abernix mentioned this pull request Sep 4, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants