catalog v82->v83: normalize live Role rows still in pre-v81 byte form#36534
catalog v82->v83: normalize live Role rows still in pre-v81 byte form#36534DAlperin wants to merge 4 commits into
Conversation
def-
left a comment
There was a problem hiding this comment.
lgtm from a testing perspective: https://buildkite.com/materialize/nightly/builds/16425 with #36525 rebased on top of this
|
@claude /review |
|
Claude finished @def-'s task in 2m 19s —— View job Code Review
OverviewThis PR adds Pass 2 to the CorrectnessThe two-pass structure is sound: Pass 1 correctness (unchanged logic): Correctly tracks which stale
Pass 2 correctness: The guard chain is correct and in the right order:
The Tricky edge: stale row whose bytes equal the dangling row's bytes. In a fully consolidated snapshot, Tricky edge: canonical form of a Pass-1-emitted row. The dangling row ( Test CoverageThe new tests are comprehensive and cover exactly the cases identified in the LLM review:
Minor Notes
VerdictThe implementation is correct and the test suite covers the important edge cases. The LLM review's concern is properly addressed. LGTM. |
|
|
||
| #[mz_ore::test] | ||
| #[cfg_attr(miri, ignore)] // can't call foreign function `decContextDefault` on OS `linux` | ||
| fn multiple_stale_byte_forms_no_dangling_collapse_to_one_canonical() { |
There was a problem hiding this comment.
A function name James Joyce would be proud of!
|
One thing popped up based on the QA LLM review:
|
|
I think @def- ia right. To preserve the spirit of the original migration, we need to apply the same logic that decided for frontegg or None. Otherwise this looks very good. Basically, in the normalization function apply the logic because the normalized form is dynamic, if that makes sense. |
|
Now we need to put this in a new migration before merging, right? Discussed here |
Because all cloud environments have already ran this migration, we need to copy changes from the old migration to a new one. - 1:1 Copies over old migration into a new file - Reverts changes in the old migration
This is the case the original heuristic missed because it only accepted Managed while some cloud customers have mz_system as an unmanaged cluster
From @def- LLM review:
This fix recanonicalizes Roles in v83 format if they are different. I added point tests but dennis will also rebase on this.