Skip to content

Add ability to skip "dirty" commits during dvc gc #5037

@courentin

Description

@courentin

Following #3885, I'd like to add the ability to skip commits that generate errors during dvc gc.

To sum-up, running dvc gc in a codebase that contains a commit where dvc is in a dirty state (eg. the dvc.yaml is badly formatted, one of the output is dvcignored, etc.) make it failing.

Thus, if feel assuming that every commits are clean and let dvc in a usable state is a bit too optimistic. Except if you have a very rigorous process with dvc, it is almost impossible.

Thus, I'd suggest 2 things.
First adding a log to explain where (which branch/commit) the error has been raised.
Second, adding an option to gc: dvc gc --skip-failing-collect. Not sure of the naming but the behaviour would be to skip the collection of branches/commits that produce DvcException.

What do think?
I've started an implementation that I'll link to this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A: gcRelated go garbage collectionfeature requestRequesting a new feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions