gc: make it safer by only activating by use of certain flags#3363
Merged
Conversation
7f0b07c to
60ee6b3
Compare
skshetry
commented
Feb 19, 2020
Suor
suggested changes
Feb 19, 2020
Contributor
There was a problem hiding this comment.
A general thought, not about this PR, - we should stop automatically making command line options into boolean kwargs, e.g. using set() would be more appropriate here.
6408c82 to
3ff044f
Compare
Previous plain `gc` is now not supported. The same behavior can be trigger by
`gc -w` or `gc --workspace`. When `--all-{tags, commits, branches}` are
specified, it will work as if `-w` is also specified (same as before).
3ff044f to
1f1cc11
Compare
efiop
reviewed
Feb 20, 2020
Comment on lines
+10
to
+11
| class InvalidArgumentError(ValueError, DvcException): | ||
| """Thrown if arguments are invalid.""" |
Contributor
There was a problem hiding this comment.
Nice one! Should we use it in otherplaces like dvc/repo/__init__.py and dvc/repo/reproduce.py too?
Collaborator
Author
There was a problem hiding this comment.
I'd opt for it on a different PR. 🙂
Contributor
There was a problem hiding this comment.
@skshetry Sure, let's not forget about it though 🙂
efiop
approved these changes
Feb 21, 2020
Contributor
|
@skshetry Let's not forget about docs, please :) |
Collaborator
Author
|
@efiop, I have created an issue in treeverse/dvc.org#1013 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previous plain
gcis now not supported. The same behavior can be trigger bygc -worgc --workspace. When--all-{tags, commits, branches}arespecified, it will work as if
-wis also specified (same as before).❗ Have you followed the guidelines in the Contributing to DVC list?
📖 Check this box if this PR does not require documentation updates, or if it does and you have created a separate PR in dvc.org with such updates (or at least opened an issue about it in that repo). Please link below to your PR (or issue) in the dvc.org repo.
treeverse/dvc.org#1013
Thank you for the contribution - we'll try to review it as soon as possible. 🙏
Related to #2325