Skip to content

remote: separate remote/cache/tree into distinct concepts #3882

@pmrowla

Description

@pmrowla

Currently, Remote classes can contain methods that fall into three categories:

  • remote operations - indexing/gc/etc
  • cache operations - save/checkout/link/etc
  • tree operations - exists/isfile/isdir/upload/download/etc

Having all of these methods grouped into a single Remote class causes issues when we are dealing with paths that can come from different namespaces (trees). In particular, LocalRemote was originally written with the assumption that all paths for local remote or local cache operations are always filesystem paths, which is no longer the case given that we now need to support GitTree objects (via brancher and erepos).

Ex. LocalRemote.exists(path) is used in different places as a replacement for os.path.exists() to test if path exists in a local remote, if path exists in the local cache directory, and if path exists in a DVC repo, even though these are distinct operations.

Tasks:

Metadata

Metadata

Assignees

Labels

enhancementEnhances DVCp1-importantImportant, aka current backlog of things to dorefactoringFactoring and re-factoring

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions