Skip to content

plots: report invalid project files when loading plot definitions - #11149

Open
yqia03 wants to merge 1 commit into
treeverse:mainfrom
yqia03:fix/plots-workspace-config-diagnostic
Open

yqia03 wants to merge 1 commit into
treeverse:mainfrom
yqia03:fix/plots-workspace-config-diagnostic

Conversation

@yqia03

@yqia03 yqia03 commented Nov 29, 2026

Copy link
Copy Markdown

Fixes #7787.

When dvc.yaml is invalid, dvc plots show currently reports only that some workspace plots failed to load. With this change, a missing colon produces the parser's line and column, and an invalid plots value reports the schema requirement. For dvc plots diff, the diagnostic identifies the affected revision and file while other revisions can still supply plot data.

The regression tests exercise both invalid YAML syntax and a schema mismatch. The comparison test checks that a valid revision still returns its data when the workspace has an error.

python -m pytest -q tests/func/plots tests/unit/command/test_plots.py tests/unit/repo/plots tests/unit/utils/test_plots.py

66 tests passed locally on macOS arm64 with Python 3.13.13. Ruff lint and formatting checks passed for both changed files. OpenAI Codex prepared the patch and regression tests and ran the local checks. The full repository suite was not run locally. No command syntax or configuration schema changed.

  • I have followed the Contributing to DVC checklist.
  • If documentation updates are required, I have opened and linked a separate documentation issue or PR.

@github-project-automation github-project-automation Bot moved this to Backlog in DVC Nov 29, 2026
@CLAassistant

CLAassistant commented Nov 29, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@codecov

codecov Bot commented Nov 29, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.65217% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 90.98%. Comparing base (2431ec6) to head (6cb05f4).
⚠️ Report is 221 commits behind head on main.

Files with missing lines Patch % Lines
dvc/repo/plots/__init__.py 91.66% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #11149      +/-   ##
==========================================
+ Coverage   90.68%   90.98%   +0.30%     
==========================================
  Files         504      505       +1     
  Lines       39795    41194    +1399     
  Branches     3141     3267     +126     
==========================================
+ Hits        36087    37482    +1395     
- Misses       3042     3072      +30     
+ Partials      666      640      -26     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

2 participants