Skip to content

Confine collection errors at lower level possible #6042

@Suor

Description

@Suor

There are situations when a DVC repo may be broken, sometimes retroactively, i.e. old commits are broken by new version of DVC. In this situation DVC simply refuses to work when we try to do anything with a broken rev. For many operations, however, we don't need things to be completely correct, i.e. we may still do dvc metrics show when stage.cmd has a broken interpolation lookup like here, we can even show git tracked things in the absense of a lock file like here. This could be used to make DVC do best effort but also is especially important for handling errors in Studio.

There is a draft PR #5984, which seeks to confine this to a single revision, i.e. dvc exp show will show one line as errored out but correctly display the other ones. This is a good start, but not granular as it might be. Ideally one needs a way to stop error propagation on key level, out level, stage level and file level so that the rest of the repo will be usable. Of cause "usable" is defined by task:

  • to show params we only need params files be present,
  • to show metrics we need those metrics be referenced from dvc.yaml and hence certain keys readable (but not all of the file)
  • to show cache stored metrics we also need checksums, i.e. we need dvc.lock file

To make this error handling appropriate for each task we need to make it customizable, i.e. having an error handler on all of the aforementioned levels and provide it a way to decide how to proceed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions