dvc: support group cache mode #2298
Conversation
b03622f to
45dcddb
Compare
group cache mode group cache mode
group cache mode group cache mode
97c9659 to
e3b7bb3
Compare
|
@Suor Adjusted the patch. Please take a look 🙂 |
group cache mode group cache mode
ghost
left a comment
There was a problem hiding this comment.
@efiop , is this intended to support remote shared cache (like SSH)?
Also, the configuration is not that clear to me, you specify shared = group under the [cache] section, right? and this only chmod to 775, but the user will still need to use the setgid of the group instead of the primary one of the user.
There was a problem hiding this comment.
this implies that cache is local, right? are there any downsides of doing this? like a remote cache with ssh for example
There was a problem hiding this comment.
Not really, if remote supports dirs then it should support makedirs. So currently ssh and local support makedirs.
There was a problem hiding this comment.
🤔 a little bit confusing to use a method with the same name under the method, what do you think about using utils.makedirs? or import it differently?
There was a problem hiding this comment.
But this is makedirs and RemoteLOCAL.makedirs(or self.makedirs), so it doesn't create collisions. If we were to change this one to utils.makedirs, then we would have to change move,remove and other helpers too. Feels unnecessary.
There was a problem hiding this comment.
maybe renaming this to atomic_move? and why not moving this to fs aren't this operations related to the file system? (well, they deal with files, maybe my definition of what should be under fs is way too relaxed 😛 )
There was a problem hiding this comment.
It just replaces the old move that we already had there.
As to moving to fs, we have a separate ticket for it #2137 .
No, it is not. For now.
Do you mean that the user will need to be a part of the group that he wants to share the cache with? Yes, he has to. He can be a part of multiple groups though, so he doesn't have to use |
@efiop, for example, I'm part of two groups |
|
@MrOutis I don't think that is something dvc should deal with(e.g. git's sharedRepository doesn't deal with it too). If people are working on the same machine and want to share their files through the group, they will need to set that same group as a primary one anyway. |
|
@efiop , got it, let's not forget to add a note about it on the docs |
Suor
left a comment
There was a problem hiding this comment.
Some technical comments below.
|
@Suor Addressed. Please take a look. |
|
Oh, DS has some valid notes too. Looking into it... |
Signed-off-by: Ruslan Kuprieiev <ruslan@iterative.ai>
In this mode, dvc will set appropriate file/dir permissions to support sharing cache between different users within the same group. Fixes treeverse#2287 Signed-off-by: Ruslan Kuprieiev <ruslan@iterative.ai>
Signed-off-by: Ruslan Kuprieiev <ruslan@iterative.ai>
Signed-off-by: Ruslan Kuprieiev <ruslan@iterative.ai>
Signed-off-by: Ruslan Kuprieiev <ruslan@iterative.ai>
Signed-off-by: Ruslan Kuprieiev <ruslan@iterative.ai>
Signed-off-by: Ruslan Kuprieiev <ruslan@iterative.ai>
Signed-off-by: Ruslan Kuprieiev <ruslan@iterative.ai>
|
There is a problem with unprotecting a symlink to a shared cache file owned by another user: |
|
@DXist Thanks for reporting this bug! Working on a fix right now. Mind creating an issue for it, please? EDIT: no need now 🙂 |
|
@DXist You are using dvc from master, right? 🙂 If so, the fix is already there, please give it a try. |
|
@efiop That fixed the problem and it's a good start to the day. Thank you! |
Have you followed the guidelines in our
Contributing document?
Does your PR affect documented changes or does it add new functionality
that should be documented? If yes, have you created a PR for
dvc.org documenting it or at
least opened an issue for it? If so, please add a link to it.
treeverse/dvc.org#497
Fixes #2287