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:
Ruslan Kuprieiev
2020-04-30 16:21:14 +03:00
committed by GitHub
parent af12f0d06c
commit d998c0a536
+2 -3
View File
@@ -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: