Registry: Add Store class to support multiple Registry backends#379
Draft
AgentDosaku wants to merge 8 commits intodevfrom
Draft
Registry: Add Store class to support multiple Registry backends#379AgentDosaku wants to merge 8 commits intodevfrom
AgentDosaku wants to merge 8 commits intodevfrom
Conversation
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
This PR implements a new
Storeabstraction that wraps multipleRegistryinstances behind one API.What was added
StoreandStoreMountimplementation:mindtrace/registry/mindtrace/registry/core/store.pyStoreLocationNotFoundStoreKeyFormatErrorStoreAmbiguousObjectErrormindtrace.registryfor Store classes/exceptions.MINDTRACE_DIR_PATHS.STORE_DIRconfig.ini:${MINDTRACE_DIR_PATHS:ROOT}/storetests/unit/mindtrace/registry/core/test_store.pydocs/storage/store-design.mdImplemented behavior
Store()defaults to a local mount (default) backed by config-drivenSTORE_DIR.load("name")(unqualified) performs cross-mount discovery.load("location/name")(qualified) only checks the specified mount.StoreAmbiguousObjectErrorlisting locations.saveanddeleterequire qualified keys (<location>/<name>) to prevent accidental writes/deletes.Design Doc
docs/storage/store-design.mdReviewer copy/paste examples
1) Two local registries + explicit writes
2) Unqualified load discovery
3) Ambiguity handling
4) Default local Store with no mounts provided
Testing
pytest -q tests/unit/mindtrace/registry/core/test_store.pyds test --unitCloses #279