mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
do not consider stage cached if checksum/cmd has changed (#3993)
This commit is contained in:
@@ -493,7 +493,11 @@ class Stage(params.StageParams):
|
||||
ret.append("changed checksum")
|
||||
|
||||
def already_cached(self):
|
||||
return self.deps_cached() and self.outs_cached()
|
||||
return (
|
||||
not self.changed_stage()
|
||||
and self.deps_cached()
|
||||
and self.outs_cached()
|
||||
)
|
||||
|
||||
def deps_cached(self):
|
||||
return all(not dep.changed() for dep in self.deps)
|
||||
|
||||
@@ -23,7 +23,7 @@ def sync_import(stage, dry=False, force=False):
|
||||
if dry:
|
||||
return
|
||||
|
||||
if not force and not stage.changed_stage() and stage.already_cached():
|
||||
if not force and stage.already_cached():
|
||||
stage.outs[0].checkout()
|
||||
else:
|
||||
stage.deps[0].download(stage.outs[0])
|
||||
|
||||
@@ -82,7 +82,6 @@ def _is_cached(stage):
|
||||
cached = (
|
||||
not stage.is_callback
|
||||
and not stage.always_changed
|
||||
and not stage.changed_stage()
|
||||
and stage.already_cached()
|
||||
)
|
||||
if cached:
|
||||
|
||||
Reference in New Issue
Block a user