From 01dee4dd9020d310080dd2e0164d2629807fdd5f Mon Sep 17 00:00:00 2001 From: Dave Berenbaum Date: Mon, 20 May 2024 10:41:27 -0400 Subject: [PATCH] repro --pull implies --allow-missing --- dvc/commands/repro.py | 4 ++-- dvc/repo/reproduce.py | 14 ++++++++------ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/dvc/commands/repro.py b/dvc/commands/repro.py index fb085a1fe3..409efd3e87 100644 --- a/dvc/commands/repro.py +++ b/dvc/commands/repro.py @@ -118,8 +118,8 @@ def add_arguments(repro_parser): action="store_true", default=False, help=( - "Try automatically pulling missing cache for outputs restored " - "from the run-cache." + "Try automatically pulling missing dependencies and outputs. " + "Implies --allow-missing." ), ) repro_parser.add_argument( diff --git a/dvc/repo/reproduce.py b/dvc/repo/reproduce.py index d37dc1bf60..8c89394fa5 100644 --- a/dvc/repo/reproduce.py +++ b/dvc/repo/reproduce.py @@ -233,12 +233,14 @@ def reproduce( targets_list = ensure_list(targets or PROJECT_FILE) stages = collect_stages(self, targets_list, recursive=recursive, glob=glob) - if kwargs.get("pull", False) and kwargs.get("run_cache", True): - logger.debug("Pulling run cache") - try: - self.stage_cache.pull(None) - except RunCacheNotSupported as e: - logger.warning("Failed to pull run cache: %s", e) + if kwargs.get("pull", False): + kwargs["allow_missing"] = True + if kwargs.get("run_cache", True): + logger.debug("Pulling run cache") + try: + self.stage_cache.pull(None) + except RunCacheNotSupported as e: + logger.warning("Failed to pull run cache: %s", e) graph = None steps = stages