Skip to content

Fix for nested store path in ZarrParser - #913

Merged
TomNicholas merged 14 commits into
zarr-developers:mainfrom
TomNicholas:fix/nested-store-path
Mar 10, 2026
Merged

TomNicholas merged 14 commits into
zarr-developers:mainfrom
TomNicholas:fix/nested-store-path

Conversation

@TomNicholas

@TomNicholas TomNicholas commented Mar 9, 2026 •

Copy link
Copy Markdown
Member

Note this requires an unreleased change to zarr-python to work, so should only be merged once zarr-python=>3.1.6 is released, and we should pin to greater than that as part of this PR.

Acceptance criteria:

@TomNicholas
TomNicholas requested a review from maxrjones March 9, 2026 20:23
@TomNicholas TomNicholas added the zarr-python Relevant to zarr-python upstream label Mar 9, 2026
@codecov

codecov Bot commented Mar 9, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 85.71429% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 88.69%. Comparing base (4ec5c9f) to head (32a0c7b).
⚠️ Report is 62 commits behind head on main.

Files with missing lines Patch % Lines
virtualizarr/parsers/zarr.py 85.71% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #913      +/-   ##
==========================================
- Coverage   89.20%   88.69%   -0.51%     
==========================================
  Files          33       33              
  Lines        2047     2052       +5     
==========================================
- Hits         1826     1820       -6     
- Misses        221      232      +11     
Files with missing lines Coverage Δ
virtualizarr/parsers/zarr.py 89.76% <85.71%> (-5.00%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

ZarrParser.__call__ was discarding the store-relative path from
registry.resolve(), causing two bugs with nested stores:
1. open_group_async couldn't find the zarr group within the store
2. Chunk manifest paths were doubled (e.g. subdir/data.zarr/subdir/data.zarr/temp/0.0)

Now correctly uses the store-relative path for group opening and the
store root URI for chunk path construction.

Note: also requires zarr-developers/zarr-python#3657 (on zarr main,
not yet released) which fixes ObjectStore.list_dir corrupting directory
names.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@TomNicholas

Copy link
Copy Markdown
Member Author

Very weird lithops-related error in the CI here @chuckwondo

@chuckwondo

chuckwondo commented Mar 10, 2026 •

Copy link
Copy Markdown
Collaborator

Very weird lithops-related error in the CI here @chuckwondo

I suspect it may be a transient error since the py311 build passed. I kicked off a rerun of the failed build. If it fails again, I'll dig into it.

Either way, I will submit a PR (probably today) that rips out those recent lithops changes I made because the upstream PR I made to fix the issue in lithops itself was already merged and released in lithops 3.6.4 this past weekend. This means I can rip out my workaround and pin lithops in the dev dependencies to be >=3.6.4.

@chuckwondo

Copy link
Copy Markdown
Collaborator

Ah, indeed, the failure appears to have been a transient issue. The 2nd run succeeded. Again, I'll submit a PR to upgrade lithops though, and rip out the workaround, which I believe may reduce the likelihood of this type of error occurring again, since it failed in relation to the code I will end up ripping back out. The fix in lithops itself is simpler and likely more robust than the workaround, so I think it should avoid this in the future.

@TomNicholas

Copy link
Copy Markdown
Member Author

Thank you @chuckwondo !!

@TomNicholas

Copy link
Copy Markdown
Member Author

Now the CI seems to be hanging... But this fix is right anyway, and @jbusecke needs it, so I'm going to merge.

@TomNicholas
TomNicholas merged commit 333070f into zarr-developers:main Mar 10, 2026
12 of 13 checks passed
@TomNicholas
TomNicholas deleted the fix/nested-store-path branch March 10, 2026 15:58
@chuckwondo

Copy link
Copy Markdown
Collaborator

Now the CI seems to be hanging... But this fix is right anyway, and @jbusecke needs it, so I'm going to merge.

Yeah, I've seen this locally using act, but it's not consistent, and it doesn't always hang at the same spot, so I suspect there are occasional race conditions leading to some sort of deadlock since we run tests on multiple threads.

I canceled the workflow so it wouldn't run forever.

maxrjones pushed a commit to maxrjones/VirtualiZarr that referenced this pull request Mar 10, 2026
* add empty release notes

* Fix ZarrParser when zarr store is nested inside object store root

ZarrParser.__call__ was discarding the store-relative path from
registry.resolve(), causing two bugs with nested stores:
1. open_group_async couldn't find the zarr group within the store
2. Chunk manifest paths were doubled (e.g. subdir/data.zarr/subdir/data.zarr/temp/0.0)

Now correctly uses the store-relative path for group opening and the
store root URI for chunk path construction.

Note: also requires zarr-developers/zarr-python#3657 (on zarr main,
not yet released) which fixes ObjectStore.list_dir corrupting directory
names.

Co-Authored-By: Claude Opus 4.6 <[email protected]>

* Add release note for nested store path fix (zarr-developers#913)

Co-Authored-By: Claude Opus 4.6 <[email protected]>

---------

Co-authored-by: Claude Opus 4.6 <[email protected]>

This branch was previously deployed

1 inactive deployment
test-release — 32a0c7b6 Deployed Mar 10, 2026 by TomNicholas via test-built-dist #2140
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

zarr-python Relevant to zarr-python upstream

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ZarrParser fails when zarr store is nested inside object store root

2 participants