lakeFS
lakeFS copied to clipboard
API: Support copy object between repositories
Currently our API support copying objects only in the context of a single repository.
/repositories/{repository}/branches/{branch}/objects/copy
Body:
{
"src_path": "string",
"src_ref": "string",
"force": false
}
Historically this limitation was set because we were preforming a shallow copy. After the changes for GC, copy operation always performs a full copy and therefore this is not longer a limitation. Catalog already supports copy between repositories as well as the Gateway.
Suggestion
Support an optional parameter src_repo
in the request body. If the parameter doesn't exist we will fallback to the destination repository.
Backwards compatibility
Since the src_repo
is optional, it will not break our current API guarantees and will maintain backward compatibility
Note that clients such as #7447 probably do not even need an API to do this. But these comments are even more relevant here: behaviour may be unexpected in painful ways.
Note that clients such as #7447 probably do not even need an API to do this. But these comments are even more relevant here: behaviour may be unexpected in painful ways.
@arielshaqed Can you please elaborate on the pain points? We no longer support shallow copy in lakeFS The requested feature is to allow deep copy between repositories via the API - not to reintroduce shallow copy