Repository navigation
fix: validate consolidated metadata listing keys and hierarchy - #4701
Open
barlowa124 wants to merge 5 commits into
Open
barlowa124 wants to merge 5 commits into
barlowa124 wants to merge 5 commits into
Conversation
This branch has not been deployed
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.
Supersedes #4485, which GitHub auto-closed when the branch history was rewritten to remove tooling attribution.
Summary
Second item of #4453.
ConsolidatedMetadata.from_dict(andGroupMetadata.from_dict, which delegates to it) accepted listingsthe spec rules out, two of which broke reads.
Listing keys are node paths, so keys with an empty segment (
"",a//b) are now rejected withMetadataValidationError. Keys carryinga reserved segment emit
a
ZarrDeprecationWarningnaming the key and advising a rename,avoiding breakage of stores that work today.
Every non-root key also needs its ancestors present as group entries:
{"a/b": GROUP}used to surface asGroupNotFoundErroron open,making the root unopenable from one entry. It now fails with a clear
MetadataValidationError, as does a listing nested under an array.v2 listings skip the name checks entirely. The remaining #4453 items
are untouched.
For reviewers
The reserved-name path moved from rejection to deprecation after
review, since stores written today with
__-prefixed names still openon main. It becomes a hard error once #4484 stops those names being
written. The empty-segment rule stays strict because consolidated keys
are node paths and node names cannot be empty. If #4484 lands first,
this can reuse its helper for the reserved-name part.
Author attestation
TODO
Done:
docs/user-guide/*.mdOutstanding:
changes/