treeverse / treeverse/dvc

plots: more helpful error message on corrupted/invalid `dvc.yaml`

Open
#7,787 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A: plots p3-nice-to-have
Dominant language
Python
Stars
15.9k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

When dvc.yaml is either corrupted or fails validation, dvc plots show/diff output shows DVC failed to load some plots for following revisions: workspace. There are a couple issues with this:

  • It makes it seem like the issue is with one or more of the plots, when it's really about the structure of dvc.yaml and may be completely unrelated to plots.
  • It makes it seem like some plots from that revision might still be shown, which isn't true.
  • It doesn't give any indication of how to fix it. Other commands like dvc repro give output about what failed like:
'./dvc.yaml' is invalid.

While scanning a simple key, in line 24, column 1
  24 dfdf

Could not find expected ':', in line 25, column 1
  25

For dvc plots show, can we show something similar?

For dvc plots diff, this might not make sense by default since there could be many revisions. However, it still seems like we could improve the message. For example, it could say something like Failed to read dvc.yaml for the following revisions (add -v to see errors): workspace.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the dvc plots show and dvc plots diff command paths and inspect how corrupted or invalid dvc.yaml errors are converted into the current revision message. Compare their behavior with the dvc repro error output described in the issue. Done means both commands clearly identify dvc.yaml loading or validation failures and provide an appropriate message for show and diff.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, data-visualization
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.