diff --git a/pyproject.toml b/pyproject.toml index 3872450d3..7bbe94a78 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,7 +53,7 @@ dependencies = [ "dvc-render==0.0.17", "dvc-task==0.1.11", "dvclive>=1.2.2", - "dvc-data==0.32.0", + "dvc-data==0.33.0", "dvc-http", "hydra-core>=1.1.0", "iterative-telemetry==0.0.6", diff --git a/tests/func/test_gc.py b/tests/func/test_gc.py index f9f4bfd0a..03e4d458d 100644 --- a/tests/func/test_gc.py +++ b/tests/func/test_gc.py @@ -218,12 +218,21 @@ def test_gc_cloud_remove_order(tmp_dir, scm, dvc, tmp_path_factory, mocker): LocalFileSystem, "remove", autospec=True ) dvc.gc(workspace=True, cloud=True) - assert len(mocked_remove.mock_calls) == 8 - # dir (and unpacked dir) should be first 4 checksums removed from - # the remote - for args in mocked_remove.call_args_list[:4]: + assert len(mocked_remove.mock_calls) == 4 + # Unpacked dir should be the first removed + for args in mocked_remove.call_args_list[:2]: checksum = str(args[0][1]) - assert checksum.endswith(".dir") or checksum.endswith(".dir.unpacked") + assert checksum.endswith(".dir.unpacked") + # Then, bulk remove should be applied + + # First to `.dir` + checksums = mocked_remove.call_args_list[2][0][1] + assert isinstance(checksums, list) + assert all(x.endswith(".dir") for x in checksums) + # And later to individual files + checksums = mocked_remove.call_args_list[3][0][1] + assert isinstance(checksums, list) + assert not any(x.endswith(".dir") for x in checksums) def test_gc_not_collect_pipeline_tracked_files(tmp_dir, dvc, run_copy):