Skip to content

merge dev#5801

Merged
lennyburdette merged 27 commits intonextfrom
lb/next/merge-dev
Aug 12, 2024
Merged

merge dev#5801
lennyburdette merged 27 commits intonextfrom
lb/next/merge-dev

Conversation

@lennyburdette
Copy link
Contributor


Checklist

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

  • Changes are compatible1
  • Documentation2 completed
  • Performance impact assessed and acceptable
  • Tests added and passing3
    • Unit Tests
    • Integration Tests
    • Manual Tests

Exceptions

Note any exceptions here

Notes

Footnotes

  1. It may be appropriate to bring upcoming changes to the attention of other (impacted) groups. Please endeavour to do this before seeking PR approval. The mechanism for doing this will vary considerably, so use your judgement as to how and when to do this.

  2. Configuration is an important part of many changes. Where applicable please try to document configuration examples.

  3. Tick whichever testing boxes are applicable. If you are adding Manual Tests, please document the manual testing (extensively) in the Exceptions.

bonnici and others added 27 commits July 31, 2024 16:41
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
Config `supergraph.query_planning.experimental_parallelism` defaults to 1, but when set to something else `BridgeQueryPlannerPool` creates that many instances of `BridgeQueryPlanner` which in turn create a JS worker each.

If config `experimental_query_planner_mode` is also set to `new` or `both` (current default is `legacy`), the each `BridgeQueryPlanner` would also unnecessarily create its own instance of the Rust `QueryPlanner` struct.

Instead, a single `QueryPlanner` is now shared with `Arc`. Unlike JS workers, `QueryPlanner` only contains read-only data and can safely be shared between threads. This should reduce memory use when both `supergraph.query_planning.experimental_parallelism` and `experimental_query_planner_mode` are configured to non-default values.
- Also, strengthened the cycle detection assertion in the add_parent function.
… call (#5599)

Co-authored-by: Coenen Benjamin <benjamin.coenen@hotmail.com>
Co-authored-by: bryn <bryn@apollographql.com>
Co-authored-by: Edward Huang <edward.huang@apollographql.com>
Co-authored-by: bryn <bryn@apollographql.com>
Fixes
* Fix handling of `SubgraphEnteringTransition` which should skip `RootTypeResolution` edges. This fixes the issue with redundantly processing same edges over and over again.
* Fix handling of `KeyResolution` which should compare whole selection sets of the conditions vs just the selections.
* Ensures consistent order of child nodes when computing new key nodes
* Add missing `self.on_modification()` when removing redundant edges
* Returns false instead of throwing an error when calculating if new requires node is useless (i.e. return false if parent relation path is `None`)
* Fix `PlanBuilder` trait to no longer swallow exceptions from query planning

Co-authored-by: Duckki Oe <duckki.dev@gmail.com>
This reduces the compiled size of the `create_plugins` function, one of our largest ones for now
…number (#5758)

Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
@lennyburdette lennyburdette requested review from a team August 12, 2024 15:03
@lennyburdette lennyburdette requested a review from a team as a code owner August 12, 2024 15:03
@router-perf
Copy link

router-perf bot commented Aug 12, 2024

CI performance tests

  • 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

@lennyburdette
Copy link
Contributor Author

@dylan-apollo
Copy link
Contributor

@lennyburdette when we cut 2.0-alpha.2, we're going to get a bunch of change notes from dev. Is that okay? Might get confusing since we won't get all change notes from the next version, as they'll eventually be deleted on dev.

Copy link
Contributor

@dylan-apollo dylan-apollo left a comment

Choose a reason for hiding this comment

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

Approved, assuming we have a plan for the @cost stuff (composition & docs about connectors support)

Comment on lines +25 to +29
pub(crate) const COST_DIRECTIVE_NAME_IN_SPEC: Name = name!("cost");
pub(crate) const COST_DIRECTIVE_NAME_DEFAULT: Name = name!("federation__cost");

pub(crate) const LIST_SIZE_DIRECTIVE_NAME_IN_SPEC: Name = name!("listSize");
pub(crate) const LIST_SIZE_DIRECTIVE_NAME_DEFAULT: Name = name!("federation__listSize");
Copy link
Contributor

Choose a reason for hiding this comment

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

This means we have to make sure we merge in composition 2.9 (and update our composition to 2.10) before the next alpha release

input_object_types: Vec<TypeInfo>,
}

fn get_original_directive_names(
Copy link
Contributor

Choose a reason for hiding this comment

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

Do the changes in this file do everything we need for expansion (i.e., we're not going to break anything)? Also, do we need to update our docs to state that we don't support these new ones?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

https://preview-docs.apollographql.com/graphos/connectors/limitations#interactions-with-graphos-router-features already mentions demand control, do you think we should be more specific about the directives?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

these changes look orthogonal, since cost/listSize are encoded specifically into the supergraph, as opposed to our general join__directive approach

@lennyburdette lennyburdette merged commit 8a23f68 into next Aug 12, 2024
@lennyburdette lennyburdette deleted the lb/next/merge-dev branch August 12, 2024 17:45
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.