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

fix(dual-query-planner): fixed the remaining of coercion mismatches between Rust QP and JS QP #6090

Merged
merged 4 commits into from
Oct 2, 2024

Conversation

duckki
Copy link
Contributor

@duckki duckki commented Sep 30, 2024

Summary:

  • updated the coercion check to recurse into List and Object values.
  • loosened Object value check to be a inclusion check, instead of empty check

Checklist

Complete the checklist (and note appropriate exceptions) before the PR is marked ready-for-review.

  • Changes are compatible[^1]
  • Documentation[^2] completed
  • Performance impact assessed and acceptable
  • Tests added and passing[^3]
    • Unit Tests
    • Integration Tests
    • Manual Tests

- updated vec_matches_as_set to use it.
…S QP

- updated the coercion check to recurse into List and Object values.
- loosened Object value check to be a inclusion check, instead of empty check
@duckki duckki requested review from a team as code owners September 30, 2024 23:50
Copy link
Contributor

@duckki, please consider creating a changeset entry in /.changesets/. These instructions describe the process and tooling.

@router-perf
Copy link

router-perf bot commented Sep 30, 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

fn test_query_variable_decl_list_value_coercion_empty_case() {
// Note: Rust QP expands empty list default values by filling in its default items.
let op_x = r#"query($qv1: [Int!]! = []) { x(arg1: $qv1) }"#;
let op_y = r#"query($qv1: [Int!]! = [1, 42]) { x(arg1: $qv1) }"#;
Copy link
Member

@goto-bus-stop goto-bus-stop Oct 1, 2024

Choose a reason for hiding this comment

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

This seems strange? these are not equivalent queries.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

y is expected to have additional items over x by filling in the (assumed-to-be) default value.

Copy link
Member

Choose a reason for hiding this comment

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

I'm confused about that. The default value is declared to be [] in one and [1, 42] in the other. This isn't a list that would pull in default values--it's a declaration of a default value.

Copy link
Member

Choose a reason for hiding this comment

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

For objects, default property values come from the input object definition, but that doesn't exist for lists

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, you are right. We don't have to loosen lists.

Copy link
Member

@goto-bus-stop goto-bus-stop left a comment

Choose a reason for hiding this comment

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

thanks, this all looks right to me 🥳

@duckki duckki merged commit e91a612 into dev Oct 2, 2024
13 of 14 checks passed
@duckki duckki deleted the duckki/router-753-follow-up branch October 2, 2024 14:54
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.

2 participants