developmentseed / developmentseed/zarrista
Can't write to icechunk store
- Dominant language
- Python
- Stars
- 45
- Forks
- 2
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 7
Description
Here's a reproducible example.
```python
# /// script
# requires-python = ">=3.12"
# dependencies = [
# "icechunk>=2",
# "numpy",
# "zarrista==0.1.0",
# ]
# ///
import asyncio
import tempfile
from pathlib import Path
import icechunk
import numpy as np
from zarrista import ArrayBuilder, ChunkGrid, DataType, FillValue
async def main() -> None:
root = Path(tempfile.mkdtemp()) / "repo"
storage = icechunk.local_filesystem_storage(str(root))
session = icechunk.Repository.create(storage).writable_session("main")
data = np.arange(256 * 1024, dtype="int32").reshape(512, 512)
builder = ArrayBuilder(
ChunkGrid.regular(data.shape, chunk_shape=data.shape),
DataType.from_string("int32"),
FillValue(np.zeros((), dtype=data.dtype).tobytes()),
)
array = await builder.create_async(session, "/arr")
await array.store_array_subset(Ellipsis, data)
# following raises icechunk.SessionStateError
session.commit("zarrista write")
asyncio.run(main())
```
Stacktrace is
```
Traceback (most recent call last):
File "/Users/tom/workspace/memray-array/examples/zarrista_icechunk_write_mre.py", line 38, in
asyncio.run(main())
~~~~~~~~~~~^^^^^^^^
File "/Users/tom/.local/share/uv/python/cpython-3.14.2-macos-aarch64-none/lib/python3.14/asyncio/runners.py", line 204, in run
return runner.run(main)
~~~~~~~~~~^^^^^^
File "/Users/tom/.local/share/uv/python/cpython-3.14.2-macos-aarch64-none/lib/python3.14/asyncio/runners.py", line 127, in run
return self._loop.run_until_complete(task)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
File "/Users/tom/.local/share/uv/python/cpython-3.14.2-macos-aarch64-none/lib/python3.14/asyncio/base_events.py", line 719, in run_until_complete
return future.result()
~~~~~~~~~~~~~^^
File "/Users/tom/workspace/memray-array/examples/zarrista_icechunk_write_mre.py", line 36, in main
session.commit("zarrista write")
~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
File "/Users/tom/.cache/uv/environments-v2/zarrista-icechunk-write-mre-6d9278fab165d75f/lib/python3.14/site-packages/icechunk/session.py", line 452, in commit
return self._session.commit(
~~~~~~~~~~~~~~~~~~~~^
message,
^^^^^^^^
...<3 lines>...
allow_empty=allow_empty,
^^^^^^^^^^^^^^^^^^^^^^^^
)
^
icechunk.SessionStateError: session error: cannot commit, no changes made to the session (use `allow_empty=true` to commit anyway)
context:
0: icechunk::session::commit_inner
with zarrista write max_concurrent_nodes=1 rewrite_manifests=false commit_method=NewCommit allow_empty=false
at icechunk/src/session.rs:1699
× session error: cannot commit, no changes made to the session (use `allow_empty=true` to commit anyway)
│
│ context:
│ 0: icechunk::session::commit_inner
│ with zarrista write max_concurrent_nodes=1 rewrite_manifests=false commit_method=NewCommit allow_empty=false
│ at icechunk/src/session.rs:1699
│
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the provided zarrista_icechunk_write_mre.py reproduction and trace ArrayBuilder.create_async, array.store_array_subset, and session.commit, using the icechunk session.py commit path shown in the traceback. Done means the reproduced write produces a commit rather than SessionStateError and the stored array can be confirmed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, rust
- Domain
- data
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 65/100