mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-01 23:08:43 +01:00
repro --pull: always pull deps (#10187)
* repro --pull: always pull deps * drop unused allow_missing args
This commit is contained in:
@@ -613,7 +613,7 @@ class Stage(params.StageParams):
|
||||
) or self.is_partial_import:
|
||||
self._sync_import(dry, force, kwargs.get("jobs", None), no_download)
|
||||
elif not self.frozen and self.cmd:
|
||||
self._run_stage(dry, force, allow_missing=allow_missing, **kwargs)
|
||||
self._run_stage(dry, force, **kwargs)
|
||||
elif kwargs.get("pull"):
|
||||
logger.info("Pulling data for %s", self)
|
||||
self.repo.pull(self.addressing, jobs=kwargs.get("jobs", None))
|
||||
|
||||
+1
-2
@@ -124,11 +124,10 @@ def run_stage(
|
||||
dry=False,
|
||||
force=False,
|
||||
run_env=None,
|
||||
allow_missing: bool = False,
|
||||
**kwargs,
|
||||
):
|
||||
if not force:
|
||||
if allow_missing and kwargs.get("pull") and not dry:
|
||||
if kwargs.get("pull") and not dry:
|
||||
_pull_missing_deps(stage)
|
||||
|
||||
from .cache import RunCacheNotFoundError
|
||||
|
||||
@@ -56,3 +56,15 @@ def test_repro_skip_pull_if_no_run_cache_is_passed(tmp_dir, dvc, mocker, local_r
|
||||
|
||||
assert dvc.reproduce(pull=True, run_cache=False)
|
||||
assert not spy_pull.called
|
||||
|
||||
|
||||
def test_repro_skip_pull_if_single_item_is_passed(tmp_dir, dvc, mocker, local_remote):
|
||||
(foo,) = tmp_dir.dvc_gen("foo", "foo")
|
||||
|
||||
dvc.push()
|
||||
|
||||
dvc.stage.add(name="copy-foo", cmd="cp foo bar", deps=["foo"], outs=["bar"])
|
||||
remove("foo")
|
||||
remove(foo.outs[0].cache_path)
|
||||
|
||||
assert dvc.reproduce(pull=True, single_item=True)
|
||||
|
||||
Reference in New Issue
Block a user