Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add schema keywords in lockfile #2131

Merged
merged 3 commits into from
Feb 2, 2021
Merged

Add schema keywords in lockfile #2131

merged 3 commits into from
Feb 2, 2021

Conversation

skshetry
Copy link
Member

@skshetry skshetry commented Feb 1, 2021

This is a 2.0 change introduced in iterative/dvc#5222.

Though there wasn't stages keyword in dvc.lock file in 1.0 version, I found a couple of files that had them. But, schema and stages were introduced at the same time. schema is just set to 2.0 when DVC v2.0 tries to dump into the lockfile. v1.0 lockfiles are migrated at the same time if needed, to v2.0. stages just wrap the pre-existing structure of lock entries.

In 1.0

echo-hello:
  cmd: echo hello world
echo-hi:
  cmd: echo hi

In 2.0

schema: '2.0'
stages:
  echo-hello:
    cmd: echo hello world
  echo-hi:
    cmd: echo hi

You may disregard these recommendations if you used the Edit on GitHub button from dvc.org to improve a doc in place.

❗ Please read the guidelines in the Contributing to the Documentation list if you make any substantial changes to the documentation or JS engine.

🐛 Please make sure to mention Fix #issue (if applicable) in the description of the PR. This causes GitHub to close it automatically when the PR is merged.

Please choose to allow us to edit your branch when creating the PR.

Thank you for the contribution - we'll try to review it as soon as possible. 🙏

@shcheklein shcheklein temporarily deployed to dvc-landing-dvc-lock-20-l3cdwe February 1, 2021 08:12 Inactive
This is a 2.0 change introduced in iterative/dvc#5222
@shcheklein shcheklein temporarily deployed to dvc-landing-dvc-lock-20-l3cdwe February 1, 2021 08:23 Inactive
- model-uk.hdfs
- path: model-uk.hdfs
md5: 17b3d1efc339b416c4b5615b1ce1b97e
size: 2712300
Copy link
Contributor

@jorgeorpinel jorgeorpinel Feb 2, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, they are OK in the latter example but I'll remove it from here to simplify. I'll make a follow-up PR to explain the size (and nfiles?) fields in dvc.lock.

Suggested change
size: 2712300

UPDATE: See #2139

@jorgeorpinel
Copy link
Contributor

Thanks @skshetry !

@jorgeorpinel jorgeorpinel temporarily deployed to dvc-landing-dvc-lock-20-l3cdwe February 2, 2021 05:06 Inactive
@jorgeorpinel jorgeorpinel merged commit 5438a43 into master Feb 2, 2021
@jorgeorpinel
Copy link
Contributor

jorgeorpinel commented Feb 2, 2021

p.s. we may also need to follow-up with an update to all other dvc.lock samples throughout docs...

UPDATE: See #2139

jorgeorpinel added a commit that referenced this pull request Feb 2, 2021
@jorgeorpinel jorgeorpinel mentioned this pull request Feb 2, 2021
@jorgeorpinel jorgeorpinel deleted the dvc-lock-20 branch February 7, 2021 03:06
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.

3 participants