Skip to content

Commit b324bd8

Browse files
authored
Release prep for 0.2.2 (#771)
* Release prep for 0.2.2 * Some docs fixes * Update changelog
1 parent eac9421 commit b324bd8

File tree

6 files changed

+24
-73
lines changed

6 files changed

+24
-73
lines changed

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Changelog.python.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
# Changelog
22

3+
## Python Icechunk Library 0.2.2
4+
5+
### Features
6+
7+
- Added the ability to checkout a session `as_of` a specific time. This is useful for replaying what the repo would be at a specific point in time.
8+
- Support for refreshable Google Cloud Storage credentials.
9+
10+
### Fixes
11+
12+
- Fix a bug where the clean prefix detection was hiding other errors when creating repositories.
13+
- API now correctly uses `snapshot_id` instead of `snapshot` consistently.
14+
- Only write `content-type` to metadata files if the target object store supports it.
15+
316
## Python Icechunk Library 0.2.1
417

518
### Features
109 KB
Loading

docs/docs/icechunk-python/version-control.md

Lines changed: 6 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -270,20 +270,16 @@ session2 = repo.writable_session("main")
270270

271271
root1 = zarr.group(session1.store)
272272
root2 = zarr.group(session2.store)
273-
```
274-
275-
First, we'll modify the attributes of the root group from both sessions.
276273

277-
```python
278-
root1.attrs["foo"] = "bar"
279-
root2.attrs["foo"] = "baz"
274+
root1["data"][0,0] = 1
275+
root2["data"][0,:] = 2
280276
```
281277

282278
and then try to commit the changes.
283279

284280
```python
285-
session1.commit(message="Update foo attribute on root group")
286-
session2.commit(message="Update foo attribute on root group")
281+
session1.commit(message="Update first element of data array")
282+
session2.commit(message="Update first row of data array")
287283

288284
# AE9XS2ZWXT861KD2JGHG
289285
# ---------------------------------------------------------------------------
@@ -327,65 +323,7 @@ session2.rebase(icechunk.ConflictDetector())
327323
# RebaseFailedError: Rebase failed on snapshot AE9XS2ZWXT861KD2JGHG: 1 conflicts found
328324
```
329325

330-
This however fails because both sessions modified metadata. We can use the `ConflictError` to get more information about the conflict.
331-
332-
```python
333-
try:
334-
session2.rebase(icechunk.ConflictDetector())
335-
except icechunk.RebaseFailedError as e:
336-
print(e.conflicts)
337-
338-
# [Conflict(ZarrMetadataDoubleUpdate, path=/)]
339-
```
340-
341-
This tells us that the conflict is caused by the two sessions modifying the metadata attributes of the root group (`/`). In this case we have decided that second session set the `foo` attribute to the correct value, so we can now try to rebase by instructing the `rebase` method to use the second session's changes with the [`BasicConflictSolver`](../reference/#icechunk.BasicConflictSolver).
342-
343-
```python
344-
session2.rebase(icechunk.BasicConflictSolver())
345-
```
346-
347-
Success! We can now try and commit the changes again.
348-
349-
```python
350-
session2.commit(message="Update foo attribute on root group")
351-
352-
# 'SY4WRE8A9TVYMTJPEAHG'
353-
```
354-
355-
This same process can be used to resolve conflicts with arrays. Let's try to modify the `data` array from both sessions.
356-
357-
```python
358-
session1 = repo.writable_session("main")
359-
session2 = repo.writable_session("main")
360-
361-
root1 = zarr.group(session1.store)
362-
root2 = zarr.group(session2.store)
363-
364-
root1["data"][0,0] = 1
365-
root2["data"][0,:] = 2
366-
```
367-
368-
We have now created a conflict, because the first session modified the first element of the `data` array, and the second session modified the first row of the `data` array. Let's commit the changes from the second session first, then see what conflicts are reported when we try to commit the changes from the first session.
369-
370-
```python
371-
print(session2.commit(message="Update first row of data array"))
372-
print(session1.commit(message="Update first element of data array"))
373-
374-
# ---------------------------------------------------------------------------
375-
# ConflictError Traceback (most recent call last)
376-
# Cell In[15], line 2
377-
# 1 print(session2.commit(message="Update first row of data array"))
378-
# ----> 2 print(session1.commit(message="Update first element of data array"))
379-
380-
# File ~/Developer/icechunk/icechunk-python/python/icechunk/session.py:224, in Session.commit(self, message, metadata)
381-
# 222 return self._session.commit(message, metadata)
382-
# 223 except PyConflictError as e:
383-
# --> 224 raise ConflictError(e) from None
384-
385-
# ConflictError: Failed to commit, expected parent: Some("SY4WRE8A9TVYMTJPEAHG"), actual parent: Some("5XRDGZPSG747AMMRTWT0")
386-
```
387-
388-
Okay! We have a conflict. Lets see what conflicts are reported.
326+
This however fails because both sessions modified metadata. We can use the `RebaseFailedError` to get more information about the conflict.
389327

390328
```python
391329
try:
@@ -470,4 +408,4 @@ root["data"][:,:]
470408

471409
#### Limitations
472410

473-
At the moment, the rebase functionality is limited to resolving conflicts with attributes on arrays and groups, and conflicts with chunks in arrays. Other types of conflicts are not able to be resolved by icechunk yet and must be resolved manually.
411+
At the moment, the rebase functionality is limited to resolving conflicts with chunks in arrays. Other types of conflicts are not able to be resolved by icechunk yet and must be resolved manually.

icechunk-python/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "icechunk-python"
3-
version = "0.2.1"
3+
version = "0.2.2"
44
description = "Transactional storage engine for Zarr designed for use on cloud object storage"
55
readme = "../README.md"
66
repository = "https://github.com/earth-mover/icechunk"
@@ -21,7 +21,7 @@ crate-type = ["cdylib"]
2121
bytes = "1.9.0"
2222
chrono = { version = "0.4.39" }
2323
futures = "0.3.31"
24-
icechunk = { path = "../icechunk", version = "0.2.1", features = ["logs"] }
24+
icechunk = { path = "../icechunk", version = "0.2.2", features = ["logs"] }
2525
itertools = "0.14.0"
2626
pyo3 = { version = "0.23", features = [
2727
"chrono",

icechunk/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "icechunk"
3-
version = "0.2.1"
3+
version = "0.2.2"
44
description = "Transactional storage engine for Zarr designed for use on cloud object storage"
55
readme = "../README.md"
66
repository = "https://github.com/earth-mover/icechunk"

0 commit comments

Comments
 (0)