dvc icon indicating copy to clipboard operation
dvc copied to clipboard

gc: clarify behavior of cloud/remote options

Open dberenbaum opened this issue 4 years ago • 2 comments
trafficstars

Extracted from https://github.com/iterative/dvc.org/pull/2917#discussion_r747749772:

@dberenbaum What happens if you use --remote without --cloud?

@jorgeorpinel Looks like the remote is ignored and it operates locally instead. A bit confusing but this text is correct ATM.

p.s. It should probably fail or give a clearer warning at least... the warning is always the same even with -c:

WARNING: This will remove all cache except items used in the workspace of the current repo.

No mention of cloud/remotes.

Warnings should be clarified with respect to using --cloud and --remote options. Also, should --remote imply --cloud so that both aren't required?

dberenbaum avatar Nov 11 '21 20:11 dberenbaum

Yes, it is quite confusing, only after tried myself can I ascertain its behavior.

karajan1001 avatar Nov 12 '21 11:11 karajan1001

https://github.com/iterative/dvc.org/pull/2917 clarified that gc --cloud cleans up the remote in addition to the local cache. Is this intended behavior? Seems like it would be more useful to have gc --cloud be independent and not clean up the local cache.

dberenbaum avatar Sep 19 '22 16:09 dberenbaum

@daavoo Since you recently updated these options, do you recall if these issues still exist?

dberenbaum avatar May 11 '23 12:05 dberenbaum

@daavoo Since you recently updated these options, do you recall if these issues still exist?

The --remote flag only doesn't give any hints or warning if --cloud or --not-in-remote is missing. Failing should be a simple change to do.


Were you also referring to this one?:

Seems like it would be more useful to have gc --cloud be independent and not clean up the local cache.

This sounds more like a feature request / change in default behavior which would be a breaking change

daavoo avatar May 11 '23 13:05 daavoo