mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +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 os
|
||||||
import posixpath
|
import posixpath
|
||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
|
from contextlib import suppress
|
||||||
from operator import itemgetter
|
from operator import itemgetter
|
||||||
from typing import TYPE_CHECKING, Dict, List, Optional, Set, Tuple, Type
|
from typing import TYPE_CHECKING, Dict, List, Optional, Set, Tuple, Type
|
||||||
from urllib.parse import urlparse
|
from urllib.parse import urlparse
|
||||||
@@ -1017,7 +1018,8 @@ class Output:
|
|||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
if self.remote:
|
if self.remote:
|
||||||
kwargs["remote"] = 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:
|
if self.obj:
|
||||||
return 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)
|
remove(dvc.cache.local.path)
|
||||||
|
|
||||||
mocker.patch(
|
mocker.patch(
|
||||||
"dvc.data_cloud.DataCloud.get_remote_odb",
|
"dvc.data_cloud.DataCloud.get_remote",
|
||||||
side_effect=RemoteMissingDepsError(dvc.fs, "azure", "azure://", []),
|
side_effect=RemoteMissingDepsError(dvc.fs, "azure", "azure://", []),
|
||||||
)
|
)
|
||||||
with pytest.raises(RemoteMissingDepsError):
|
with pytest.raises(RemoteMissingDepsError):
|
||||||
|
|||||||
Reference in New Issue
Block a user