mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
push: check if versioning is supported or not during checkout on cloud versioning (#8949)Fixes https://github.com/iterative/dvc/issues/8824
* push: check if versioning is supported or not during checkout on cloud versioning * bump dvc-data to 0.38.4
This commit is contained in:
@@ -4,6 +4,7 @@ from typing import TYPE_CHECKING, Any, Dict, Iterable, Optional, Set, Tuple, Uni
|
||||
|
||||
from funcy import first
|
||||
|
||||
from dvc.exceptions import DvcException
|
||||
from dvc.fs.callbacks import Callback
|
||||
from dvc.stage.exceptions import StageUpdateError
|
||||
|
||||
@@ -144,6 +145,7 @@ def push_worktree(
|
||||
) -> int:
|
||||
from dvc.repo.index import build_data_index
|
||||
from dvc_data.index import checkout
|
||||
from dvc_data.index.checkout import VersioningNotSupported
|
||||
|
||||
pushed = 0
|
||||
stages: Set["Stage"] = set()
|
||||
@@ -176,6 +178,7 @@ def push_worktree(
|
||||
disable=total == 0,
|
||||
) as cb:
|
||||
cb.set_size(total)
|
||||
try:
|
||||
pushed += checkout(
|
||||
new_index,
|
||||
remote_obj.path,
|
||||
@@ -187,6 +190,11 @@ def push_worktree(
|
||||
jobs=jobs,
|
||||
**diff_kwargs,
|
||||
)
|
||||
except VersioningNotSupported:
|
||||
logger.exception("")
|
||||
raise DvcException(
|
||||
f"remote {remote_obj.name!r} does not support versioning"
|
||||
) from None
|
||||
|
||||
for out in view.outs:
|
||||
workspace, _key = out.index_key
|
||||
|
||||
+1
-1
@@ -53,7 +53,7 @@ dependencies = [
|
||||
"dvc-render==0.1.1",
|
||||
"dvc-task==0.1.11",
|
||||
"dvclive>=1.2.2",
|
||||
"dvc-data==0.38.3",
|
||||
"dvc-data==0.38.4",
|
||||
"dvc-http",
|
||||
"hydra-core>=1.1.0",
|
||||
"iterative-telemetry==0.0.7",
|
||||
|
||||
Reference in New Issue
Block a user