Skip to content

tests: Make --auto-index-selects try the view only if the normal query succeeded#35908

Merged
ggevay merged 1 commit intoMaterializeInc:mainfrom
ggevay:auto-index-selects-simplify
Apr 11, 2026
Merged

tests: Make --auto-index-selects try the view only if the normal query succeeded#35908
ggevay merged 1 commit intoMaterializeInc:mainfrom
ggevay:auto-index-selects-simplify

Conversation

@ggevay
Copy link
Copy Markdown
Contributor

@ggevay ggevay commented Apr 8, 2026

When we do --auto-index-selects, if the normal query fails, then the error reporting gets quite complicated, and is currently buggy: We return InconsistentViewOutcome when the normal query fails but the view would fall under INCONSISTENT_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-selects flow.

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 )

@ggevay ggevay requested a review from a team as a code owner April 8, 2026 12:13
@ggevay ggevay added the T-testing Theme: tests or test infrastructure label Apr 8, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 8, 2026

Thanks for opening this PR! Here are a few tips to help make the review process smooth for everyone.

PR title guidelines

  • Use imperative mood: "Fix X" not "Fixed X" or "Fixes X"
  • Be specific: "Fix panic in catalog sync when controller restarts" not "Fix bug" or "Update catalog code"
  • Prefix with area if helpful: compute: , storage: , adapter: , sql:

Pre-merge checklist

  • The PR title is descriptive and will make sense in the git log.
  • This PR has adequate test coverage / QA involvement has been duly considered. (trigger-ci for additional test/nightly runs)
  • If this PR includes major user-facing behavior changes, I have pinged the relevant PM to schedule a changelog post.
  • This PR has an associated up-to-date design doc, is a design doc (template), or is sufficiently small to not require a design.
  • If this PR evolves an existing $T ⇔ Proto$T mapping (possibly in a backwards-incompatible way), then it is tagged with a T-proto label.
  • If this PR will require changes to cloud orchestration or tests, there is a companion cloud PR to account for those changes that is tagged with the release-blocker label (example).

@ggevay ggevay force-pushed the auto-index-selects-simplify branch from 27c89cd to e9c3326 Compare April 8, 2026 12:33
…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.
@ggevay ggevay force-pushed the auto-index-selects-simplify branch from e9c3326 to 44e57e8 Compare April 8, 2026 12:45
@ggevay ggevay requested a review from def- April 8, 2026 13:46
Copy link
Copy Markdown
Contributor

@def- def- left a comment

Choose a reason for hiding this comment

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

Thanks, that will make debugging easier

@ggevay ggevay merged commit f7ae038 into MaterializeInc:main Apr 11, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T-testing Theme: tests or test infrastructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants