testdrive: skip the catalog dump when the catalog store is not validated - #38704
Merged
ggevay merged 1 commit intoSep 9, 2026
Merged
Conversation
check_catalog_state fetched and parsed the whole /api/catalog/dump after every file and only then discovered, inside with_catalog_copy, that no catalog config was supplied and the comparison had to be skipped. Only a handful of compositions pass --validate-catalog-store; everywhere else the fetch was wasted, about 700 ms per file at a 109 MB dump, plus a transient allocation of a few hundred MB in environmentd. Return early before the fetch when the config is absent. Closes: QAR-160 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
ggevay
marked this pull request as ready for review
September 9, 2026 12:06
aljoscha
approved these changes
Sep 9, 2026
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.
Motivation
check_catalog_stateruns after every testdrive file at the default consistency-check level. It fetched/api/catalog/dumpfrom environmentd's internal HTTP listener and parsed the whole document, and only then calledwith_catalog_copy, which returnsNoneand skips the comparison whenever no catalog config was supplied, which is every composition that does not pass--validate-catalog-store(about 170 of 175 call sites). The dump is 109 MB at v26.41.0-rc.4, so that was about 700 ms of waste per file, plus a transient allocation of a few hundred MB in environmentd, and it is what the parallel benchmark'stestdriverow had been reporting as a regression (QAR-159, SQL-689). Closes: QAR-160Description
Return early from
check_catalog_statewhen the catalog config is absent, before the HTTP fetch. The fetched fields were only used to feedwith_catalog_copyand the on-disk comparison, so nothing else depends on them. Compositions that pass--validate-catalog-storekeep the full check.Verification
cargo check -p mz-testdriveandcargo clippy -p mz-testdrive --all-targets -- -D warningsare clean. The testdrive nightly with--validate-catalog-storestill exercises the comparison path.🤖 Generated with Claude Code