-
Notifications
You must be signed in to change notification settings - Fork 1.2k
refactor: consolidate tree classes #4050
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
GitPython is not threadsafe, which was causing issues when we were computing hash for a directory. Fixes iterative#4079 Related to tree generalization iterative#4050
Outputs and dependencies don't really care about the remotes, as they don't do any pushing or pulling. What they really need are the trees, so let's use them directly. Part of iterative#4050
Outputs and dependencies don't really care about the remotes, as they don't do any pushing or pulling. What they really need are the trees, so let's use them directly. Part of #4050
* dvc: remove tree-specific wrappers from remote This helps combat the remote/tree/cache confusion. * dvc: split remotes from trees Related to #4050
Working tree is really just a regular local tree and should be used by outputs when trying to compute a hash for themselves. We didn't use it previously because local tree was embeded into the local remote class. Related to iterative#4050
Working tree is really just a regular local tree and should be used by outputs when trying to compute a hash for themselves. We didn't use it previously because local tree was embeded into the local remote class. Related to iterative#4050
Working tree is really just a regular local tree and should be used by outputs when trying to compute a hash for themselves. We didn't use it previously because local tree was embeded into the local remote class. Related to #4050
Continuing iterative#4050 This issue was found in iterative#4242
Finalizes code part of iterative#4050
Ok, I think we are done for now. Core code is separated, but there might be some issues like #4244 which were there before this, but we weren't able to see them. We'll have to fix them as we go, especially since we are trying to use trees more and more and those bugs are getting more and more obvious. I didn't move the tests around for now, because they are intermixed and it doesn't seem worth it to bother with in this sprint. But it is a technical debt, so we'll have to get to them at some point in the future. Luckily, they are easy to separate when writing new tests (similar how we are doing with unit -> pytest migration). Plus, Next big thing here is to, of course, optimize dvcignore (something that is on our radar right now, has a separate ticket and PR), but , even more importantly, we will need to unify interfaces of our tree classes better. E.g. make them all raise appropriate OSErrors (or something else if we will be able to find something better) so we are able to handle them in a unified way. Same with return types, where it would be great to use type hints and use mypy to check them. |
Uh oh!
There was an error while loading. Please reload this page.
Follow up to #3882.
Currently we have tree classes that all inherit from
dvc.scm.tree.BaseTree
spread out all over the code base w/DvcTree
,RepoTree
, SCM/git related trees,BaseRemoteTree
, and all of the associated cloud remote trees. It may make more sense to group these in something likedvc.tree
anddvc.tree.cloud
. This would also allow us to simplify what is currently underdvc.remote
, since we really only need single files forRemote
andCloudCache
now. (Cloud cache code could also potentially just be moved intodvc.cache
now as well.)The text was updated successfully, but these errors were encountered: