clusterd-test-driver: parse s/u/t-prefixed global ids in specs#37880
Open
antiguru wants to merge 1 commit into
Open
clusterd-test-driver: parse s/u/t-prefixed global ids in specs#37880antiguru wants to merge 1 commit into
antiguru wants to merge 1 commit into
Conversation
Script ids were raw u64s always mapped to GlobalId::User, so a spec could not target the system or transient namespaces. Parse ids the same way GlobalId's own Display does: a bare number defaults to the user namespace, while an explicit s/si/u/t prefix (s42, u1000, t7) selects the namespace directly. Spec and Command fields now carry GlobalId end to end instead of wrapping a u64 at each call site. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
antiguru
marked this pull request as ready for review
July 24, 2026 22:03
antiguru
added a commit
to antiguru/materialize
that referenced
this pull request
Jul 24, 2026
Stacking on MaterializeInc#37880 (typed s/u/t-prefixed global ids in specs) makes the bare `transient` export flag moot: an export id parses to `GlobalId::Transient` directly from a `t` prefix. Drop the flag and its driver-side machinery (taken from MaterializeInc#37880's rewrite of script.rs/text.rs), and mark the interactive query dataflow's output `t4000` in two_runtime_query_dataflow.spec so the multiplexer still routes it to the interactive runtime. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CY7GHdrTBfAG4tgvSgPGJ9
This was referenced Jul 24, 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
clusterd-test-driverspec/text-format ids were rawu64s always mapped toGlobalId::User, so a script had no way to target the system or transientGlobalIdnamespaces. Some driver behavior can depend on the id's namespace,so specs need to be able to select it explicitly.
Description
Ids now parse the same way
GlobalId's ownDisplayrenders them: a barenumber (
1000) defaults to the user namespace (unchanged, so every existing.specfixture keeps working as-is), and an explicits/si/u/tprefix(
s42,u1000,t7) selects the namespace directly, via a newparse_idhelper in
text.rs.All
Commandand*Specid fields (ImportSpec,BuildSpec,ExportSpec,and the various
Commandvariants) now carryGlobalIdend to end instead ofa
u64that got wrapped inGlobalId::Userat each call site inscript.rs.ScriptState'sindexes/mv_outputsmaps are keyed byGlobalIdfor thesame reason.
Verification
Extended
text.rs's unit tests withparses_prefixed_ids, covering the bare,u,t, andsforms plus a parse error for a garbage id. Updated theexisting tests' expectations from bare integer literals to
GlobalId::User(..).Ran
cargo test -p mz-clusterd-test-driver(25/25 pass),cargo check,cargo clippy, andbin/fmt.