Add experimental_query_planner_mode: both_best_effort config#5790
Merged
SimonSapin merged 2 commits intodevfrom Aug 9, 2024
Merged
Add experimental_query_planner_mode: both_best_effort config#5790SimonSapin merged 2 commits intodevfrom
experimental_query_planner_mode: both_best_effort config#5790SimonSapin merged 2 commits intodevfrom
Conversation
Contributor
|
@SimonSapin, please consider creating a changeset entry in |
|
CI performance tests
|
SimonSapin
commented
Aug 8, 2024
Comment on lines
+162
to
+165
| QueryPlannerMode::BothBestEffort => match Self::rust(schema, configuration) { | ||
| Ok(planner) => Ok(Some(planner)), | ||
| Err(_) => Ok(None), | ||
| }, |
Contributor
Author
There was a problem hiding this comment.
This makes fallback completely silent. Should we log a warning instead?
Member
There was a problem hiding this comment.
I think it'd be nice to warn for fed 1 (since it's a future compatibility issue), but maybe not for Rust QP bugs or missing features
Contributor
There was a problem hiding this comment.
It seems unlike that constructing the Rust QP would fail in places that the JS QP doesn't. If we were to log errors here, what would we want to log?
Contributor
Author
There was a problem hiding this comment.
Added a tracing::warn! call and a test for it
TylerBloom
approved these changes
Aug 9, 2024
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Some supergraph schemas supported by current Router versions (notably those using Apollo Federation 1) are not supported by the new Rust query planner. When a user explicitly configures
experimental_query_planner_mode: neworexperimental_query_planner_mode: both, we want unsupported schemas to cause an error at Router startup in order to make the issue very visible.This adds
experimental_query_planner_mode: both_best_effortwhich is likebothwhenever possible, and silently falls back tolegacyotherwise. This behavior makes it suitable to potentially become the new default config.Fixes ROUTER-601
Checklist
Complete the checklist (and note appropriate exceptions) before the PR is marked ready-for-review.
Exceptions
Note any exceptions here
Notes
Footnotes
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. ↩
Configuration is an important part of many changes. Where applicable please try to document configuration examples. ↩
Tick whichever testing boxes are applicable. If you are adding Manual Tests, please document the manual testing (extensively) in the Exceptions. ↩