tests: Make --auto-index-selects try the view only if the normal query succeeded#35908
Merged
ggevay merged 1 commit intoMaterializeInc:mainfrom Apr 11, 2026
Merged
Conversation
Contributor
|
Thanks for opening this PR! Here are a few tips to help make the review process smooth for everyone. PR title guidelines
Pre-merge checklist
|
27c89cd to
e9c3326
Compare
…y succeeded. Previously, when a direct query had an OutputFailure, the view comparison would still run and could produce a confusing InconsistentViewOutcome wrapping the real failure. Now we skip the view path entirely when the direct query didn't succeed, so the actual failure is reported cleanly. Also simplify the discriminant comparisons to simple `.success()` checks, which are equivalent given the new guard, and simplify `should_warn` accordingly.
e9c3326 to
44e57e8
Compare
def-
approved these changes
Apr 11, 2026
Contributor
def-
left a comment
There was a problem hiding this comment.
Thanks, that will make debugging easier
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.
When we do
--auto-index-selects, if the normal query fails, then the error reporting gets quite complicated, and is currently buggy: We returnInconsistentViewOutcomewhen the normal query fails but the view would fall underINCONSISTENT_VIEW_OUTCOME_WARNING_REGEXPS, making the error msg quite misleading. Slack thread.So, this PR simplifies
--auto-index-selects, by making it try the view only if the normal query succeeded. The rationale is that if the normal query failed, then we don't want to involve the whole complicated--auto-index-selectsflow.This also allowed simplifying some more code.
(Test run from before #35906 was merged to main, showing the new error: https://buildkite.com/materialize/test/builds/120200#019d6d16-44c4-4480-a7f3-1b6edaf8b084 )