You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor: Take all rpaths as resource names only in transactions
Proof of concept for a single repo-and-branch-scoped transaction.
This ties a transaction to a single repo and branch by taking all file and
directory names by resource only instead of a full URI.
Naturally, this has the subtle side effect that given full URIs are silently
understood as nested paths, and uploaded to the transaction branch without
loud errors or warnings. A section was added to the transaction docs that
details this behavior, but it might be safer to check the input path against
existing repos and branches.
@@ -35,6 +35,13 @@ The full list of supported lakeFS versioning operations (by default, these opera
35
35
*[`rev_parse`](../reference/lakefs_spec/transaction.md#lakefs_spec.transaction.LakeFSTransaction.rev_parse), for parsing revisions like branch/tag names and SHA fragments into full commit SHAs.
36
36
*[`tag`](../reference/lakefs_spec/transaction.md#lakefs_spec.transaction.LakeFSTransaction.tag), for creating a tag pointing to a commit.
37
37
38
+
## Limitations of transactions
39
+
40
+
Transactions are scoped to a single repository and branch only, equal to those given to the `fs.transaction()` context manager.
41
+
When uploading files in a transaction via `fs.put()` or `fs.put_file()`, you **must** give all remote paths as file names.
42
+
If you use a fully qualified URI, leading repository and branch names will be interpreted as subdirectories, which will be created on upload.
43
+
No warnings or errors will be thrown, so be sure to double-check your paths in all transaction scopes.
44
+
38
45
## Lifecycle of ephemeral transaction branches
39
46
40
47
You can control the lifecycle for a transaction branch with the `delete` argument:
@@ -56,7 +63,7 @@ from lakefs_spec import LakeFSFileSystem
56
63
fs = LakeFSFileSystem()
57
64
58
65
with fs.transaction("repo", "main", delete="onsuccess") as tx:
0 commit comments