mirror of
https://github.com/project-zot/zot.git
synced 2026-06-17 12:58:02 +08:00
cc34a6f4efe299f5ea669e48320c33866df1e6a4
fix(meta): handle cases where repositories when substores are nested Note this is a case of bad configuration: having multiple stores in the same tree structure. Guard against it in parse.go. Fix getAllRepos to prevent duplicate repositories in metaDB when substore directories are nested under the default store root directory. The fix processes substores first, then the default store, using a map-based deduplication approach to skip repositories that have already been added. This ensures that when both the default store and substores contain repositories with the same name (e.g., when a substore is nested within the default store), only one instance is added to the repository list. Add test TestNoDuplicateReposWithSubstoresAndNestedRepoNames to verify the deduplication logic works correctly with nested substores. Also update the other tests to avoid these issues in the future this is not a vali configuration. This is not the intended use case for substores, and it may have caused: https://github.com/project-zot/zot/actions/runs/19665302669/job/56320640980 Signed-off-by: Andrei Aaron <andreifdaaron@gmail.com>
zot
zot: a production-ready vendor-neutral OCI image registry - images stored in OCI image format, distribution specification on-the-wire, that's it!
Documentation for zot is located at: https://zotregistry.dev
Code of conduct details are here.
License
Description
Languages
Go
93.6%
Shell
5.8%
Makefile
0.4%