Skip to content

Commit

Permalink
improve error message for 1.0 lockfile format
Browse files Browse the repository at this point in the history
  • Loading branch information
skshetry committed Jul 11, 2023
1 parent 1b2291c commit b6de85f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dvc/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,10 @@
StageParams.PARAM_OUTS: [DATA_SCHEMA],
}

NO_SCHEMA_MSG = "This is a 1.0 lockfile format which is unsupported in dvc>=3.0"
LOCKFILE_STAGES_SCHEMA = {str: LOCK_FILE_STAGE_SCHEMA}
LOCKFILE_SCHEMA = {
Required("schema"): Equal("2.0", "invalid schema version"),
Required("schema", NO_SCHEMA_MSG): Equal("2.0", "invalid schema version"),
STAGES: LOCKFILE_STAGES_SCHEMA,
}

Expand Down

0 comments on commit b6de85f

Please sign in to comment.