-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 versioning scheme in the dvc.lock #5128
Conversation
7e5d817
to
7bfa99f
Compare
Could you please elaborate on using meta for version instead of putting it at the top level? |
To major releases or to minor ones too? What if it stabilizes and dvc v101 will generate the same schema s dvc v2?
So far we've been implicitly treating lock files as strict, and when unknown fields are found - we are deeming the whole lockfile corrupted. So strict version might continue the trend, but informative (+ warnings about unknown fields) is definitely friendlier (people were complaining about nfiles/size fields additions recently).
Could you elaborate on variables, please? Not sure I understand. |
Better to not break compatibility on minor releases. But, no strong opinion with
The only thing that makes v1 -> v2 incompatible is the parametrization syntax ( But, we could make them compatible if we consider uppercased single-word inside Or, we could just break compatibility (how many users will be using Making the
No reason, just wanted to house all possible meta fields there. |
2d54fcd
to
3b3ac71
Compare
For the record: accidental merge, but still need to review post-merge 🙂 |
@@ -49,7 +52,8 @@ def test_stage_overwrites_if_already_exists(tmp_dir, dvc): | |||
stage = PipelineStage(name="s2", repo=dvc, path="path", cmd="command3") | |||
lockfile.dump(stage) | |||
assert lockfile.load() == { | |||
"s2": {"cmd": "command3"}, | |||
"stages": {"s2": {"cmd": "command3"}}, | |||
"meta": {"version": "2.0"}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe let's just have top-level schema: 2.0
? Meta is confusing with meta
from dvc.yaml and version
is confusing with dvc version.
return data | ||
|
||
@property | ||
def meta(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will definitely get confused with stage meta :(
My only concern is with |
dvc.lock
stages
keyword.meta
keyword hasversion
identifier. We could add more metadata there in the future.v1.0
v2.0
❗ I have followed the Contributing to DVC checklist.
📖 If this PR requires documentation updates, I have created a separate PR (or issue, at least) in dvc.org and linked it here.
Thank you for the contribution - we'll try to review it as soon as possible. 🙏