Skip to content

dvc.yaml: very hard to edit, can we detect and do human readable/helpful schema errors? #5371

@shcheklein

Description

@shcheklein

As we are migrating from using dvc run, dvc import-url, and other helpers when we create stages, it makes creating a proper dvc.yaml very painful. Trying to add a stage, I'm getting errors like this:

ERROR: unable to read: 'dvc.yaml', YAML file structure is corrupted: mapping values are not allowed in this context
  in "<unicode string>", line 7, column 14

or this:

ERROR: unable to read: 'dvc.yaml', YAML file structure is corrupted: while parsing a block collection
  in "<unicode string>", line 6, column 7
did not find expected '-' indicator
  in "<unicode string>", line 7, column 9

or this:

'dvc.yaml' format error: expected str @ data['stages']['prepare_genome']['deps'][0]

(from #5370)

or infamous one with size.

From my personal experience you basically have to go to docs and manually compare and experiment until it's fixed.

I wonder if we can produce some meaningful error messages, include examples if needed of the affected section?

Metadata

Metadata

Assignees

No one assigned

    Labels

    p2-mediumMedium priority, should be done, but less importantresearchuiuser interface / interaction

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions