Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] readonly kwarg not respected #404

Open
TomNicholas opened this issue Nov 21, 2024 · 2 comments
Open

[Bug] readonly kwarg not respected #404

TomNicholas opened this issue Nov 21, 2024 · 2 comments

Comments

@TomNicholas
Copy link
Contributor

from @abarciauskas-bgse in zarr-developers/VirtualiZarr#272 (comment)

It doesn't look like the read_only property is working as I would expect it to in the latest released version of icechunk (0.1.0a4):

from icechunk import IcechunkStore, StorageConfig
config = StorageConfig.filesystem("local")

store = IcechunkStore.create(storage=config, read_only=False)
print(store.mode)
# AccessMode(str='w', readonly=False, overwrite=True, create=True, update=False)

store = IcechunkStore.open_existing(storage=config)
print(store.mode) 
# AccessMode(str='r', readonly=True, overwrite=False, create=False, update=False)

store = IcechunkStore.open_existing(storage=config, read_only=False) 
print(store.mode)
# AccessMode(str='r', readonly=True, overwrite=False, create=False, update=False)

store = IcechunkStore.open_existing(storage=config, mode="a")
print(store.mode)
# AccessMode(str='a', readonly=False, overwrite=False, create=True, update=True)

store = IcechunkStore.open_existing(storage=config, mode="w")
print(store.mode)
# AccessMode(str=w', readonly=False, overwrite=True, create=True, update=False)

store = IcechunkStore.open_existing(storage=config, update=True)
print(store.mode)
# AccessMode(str='r', readonly=True, overwrite=False, create=False, update=False)

I note from the above that the only way to open the icechunk store in append mode is still using mode="a"

@mpiannucci
Copy link
Contributor

The latest version of icechunk still uses mode. The main branch uses read_only. We are not releasing the next version until #357 is merged.

@mpiannucci
Copy link
Contributor

mpiannucci commented Nov 26, 2024

This should be fixed with version a5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants