[WIP] remote: use explicit tree parameter for cache operations#3973
[WIP] remote: use explicit tree parameter for cache operations#3973pmrowla wants to merge 3 commits into
Conversation
* makes RemoteTree and RepoTree consistent with regard to checksum calculation
* when tree is remote.tree, save will be a move + link operation (same as default existing behavior) * when saving path from a different tree, save will be a copy operation
There was a problem hiding this comment.
So we still don't have a cache/remote separation?
There was a problem hiding this comment.
@efiop Not yet. I'm still thinking about the best way to go about that particular separation.
The "remote" functions like push/pull/status (which are currently in LocalRemote) are really functions for syncing the contents of two caches. So I've been wondering if they should just be abstracted into functions for syncing from "this/self" cache to/from any other cache, and then moved into BaseRemote?
And then the remote classes could still be renamed to Cache or RemoteCache (or something else along those lines), but there wouldn't be any further separation into new classes (other than the tree methods).
There was a problem hiding this comment.
I know that we would still have the external output/dependency use case to consider, but it seems like in practice, that is still just a situation where we would have two "s3 caches"
- one which is used as the typical "dvc remote" for syncing local cache <-> s3
- and the second which is used as the s3 external out cache
ed0b8e7 to
0466227
Compare
|
closed in favor of #4019 |
❗ I have followed the Contributing to DVC checklist.
📖 If this PR requires documentation updates, I have created a separate PR (or issue, at least) in dvc.org and linked it here. If the CLI API is changed, I have updated tab completion scripts.
❌ I will check DeepSource, CodeClimate, and other sanity checks below. (We consider them recommendatory and don't expect everything to be addressed. Please fix things that actually improve code or fix bugs.)
Thank you for the contribution - we'll try to review it as soon as possible. 🙏
remote.save()now takes an explicittreeparametertreeisremote.tree, save is done viamove()+link()treeintoremote.tree