Repository navigation
Add backward-compat test for HASH label table binding - #464
Merged
Merged
Conversation
Cover the backward-compatibility seam of the two intertwined transitions on HASH labels: Storage metadata removal in favor of datastore:// URIs (#410) and HashLabel removal in favor of IndexedLabel (#296, #459). Verified to fail on the pre-#459 code with exactly the datastore case. Co-Authored-By: Claude Fable 5 <[email protected]>
Co-Authored-By: Claude Fable 5 <[email protected]>
Mutate/query now go through MutationService/QueryService — the path the original incident hit — instead of calling getTableBinding directly and using the V2 graph.mutate. Add a legacy-data case: rows written through an HBaseHashLabel writer (the removed DatastoreHashLabel shape) stay readable through the V3 API, and V3 writes coexist on the same table, backing the no-migration claim of #459. Co-Authored-By: Claude Fable 5 <[email protected]>
Production runs V3 write/read and V2 write/read as separate closed paths, so cover each within itself on separate keys instead of cross-path assertions. Co-Authored-By: Claude Fable 5 <[email protected]>
get(100, 1000, ...) reads as (source, limit) but the second argument is the target — name the arguments so the point-get shape is explicit. Co-Authored-By: Claude Fable 5 <[email protected]>
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.
Summary
#459 shipped without a test that would have caught it: no unit test covered a HASH label on datastore storage reaching the V3 table binding. This adds a backward-compatibility guard for the two intertwined transitions on HASH labels — Storage metadata removal in favor of
datastore://URIs (#410) and HashLabel removal in favor of IndexedLabel (#296 for HBase, #459 for datastore).Per resolution path (bare-name Storage metadata, unregistered
datastore://URI), the test verifies: create resolves, the label materializes as an IndexedLabel (not the old HashLabel), and both production paths round-trip within themselves on separate keys — V3 write/read throughMutationService/QueryService(the path the original incident hit) and V2 write/read throughgraph.mutate/label.get. A third case writes rows through anHBaseHashLabelwriter (the shape of the removedDatastoreHashLabel) and verifies the current read path serves them and new writes extend the same table — backing the no-data-migration claim of #459. Reverting the #459 fix locally makes exactly the datastore case fail, so the test reproduces the original bug.Changes
HashLabelTableBindingTest(JUnit 5 +@ObjectSource): storage_metadata/datastore_uri parameterized V3+V2 round-trips, plus legacy-written-rows compatibility caseLabel.getcall sites inDatastoreHashLabelSpecandLabelSpec—get(100, 1000, ...)reads as (source, limit) but the second argument is the targetHow to Test
Full
:engine:testpasses locally.AI Assistance