mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-01 23:08:43 +01:00
output: suppress cloud.pull errors on cache collection
Fixes https://github.com/iterative/studio/issues/5261
This commit is contained in:
+3
-1
@@ -2,6 +2,7 @@ import logging
|
||||
import os
|
||||
import posixpath
|
||||
from collections import defaultdict
|
||||
from contextlib import suppress
|
||||
from operator import itemgetter
|
||||
from typing import TYPE_CHECKING, Dict, List, Optional, Set, Tuple, Type
|
||||
from urllib.parse import urlparse
|
||||
@@ -1017,7 +1018,8 @@ class Output:
|
||||
except FileNotFoundError:
|
||||
if self.remote:
|
||||
kwargs["remote"] = self.remote
|
||||
self.repo.cloud.pull([obj.hash_info], **kwargs)
|
||||
with suppress(Exception):
|
||||
self.repo.cloud.pull([obj.hash_info], **kwargs)
|
||||
|
||||
if self.obj:
|
||||
return self.obj
|
||||
|
||||
@@ -116,7 +116,7 @@ def test_remote_missing_dependency_on_dir_pull(tmp_dir, scm, dvc, mocker):
|
||||
remove(dvc.cache.local.path)
|
||||
|
||||
mocker.patch(
|
||||
"dvc.data_cloud.DataCloud.get_remote_odb",
|
||||
"dvc.data_cloud.DataCloud.get_remote",
|
||||
side_effect=RemoteMissingDepsError(dvc.fs, "azure", "azure://", []),
|
||||
)
|
||||
with pytest.raises(RemoteMissingDepsError):
|
||||
|
||||
Reference in New Issue
Block a user