mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
serialize: use checksums that are already saved (#3708)
`get_checksum()` recomputes the checksum which might not match the pre-recorded one. `checksum` is the one that was `save()`ed during run and it is the one that should be used in the lockfile.
This commit is contained in:
+2
-3
@@ -89,11 +89,10 @@ def to_lockfile(stage: "PipelineStage") -> dict:
|
||||
res = {"cmd": stage.cmd}
|
||||
params, deps = get_params_deps(stage)
|
||||
deps = [
|
||||
{"path": dep.def_path, dep.checksum_type: dep.get_checksum()}
|
||||
for dep in deps
|
||||
{"path": dep.def_path, dep.checksum_type: dep.checksum} for dep in deps
|
||||
]
|
||||
outs = [
|
||||
{"path": out.def_path, out.checksum_type: out.get_checksum()}
|
||||
{"path": out.def_path, out.checksum_type: out.checksum}
|
||||
for out in stage.outs
|
||||
]
|
||||
if deps:
|
||||
|
||||
Reference in New Issue
Block a user