From ea02a18b23e2baebe8f38e0144c0d90fec3065c2 Mon Sep 17 00:00:00 2001 From: skshetry <18718008+skshetry@users.noreply.github.com> Date: Thu, 5 Jun 2025 09:21:44 +0545 Subject: [PATCH] tests(bench): remove allow_anonymous_login config use from dvc<3.59.3 (#10762) --- .../benchmarks/cli/stories/use_cases/test_sharing.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/dvc/testing/benchmarks/cli/stories/use_cases/test_sharing.py b/dvc/testing/benchmarks/cli/stories/use_cases/test_sharing.py index ab19a23f3..ba90724e4 100644 --- a/dvc/testing/benchmarks/cli/stories/use_cases/test_sharing.py +++ b/dvc/testing/benchmarks/cli/stories/use_cases/test_sharing.py @@ -1,7 +1,15 @@ import shutil +from packaging import version + + +def test_sharing(bench_dvc, tmp_dir, dvc, make_dataset, remote, dvc_rev): + is_gs = dvc.config["remote"]["upstream"]["url"].startswith("gs://") + if is_gs and version.Version(dvc_rev) < version.Version("3.59.3"): + # support for allow_anonymous_login in gs was introduced in dvc==3.59.3 + with dvc.config.edit() as d: + d["remote"]["upstream"].pop("allow_anonymous_login", None) -def test_sharing(bench_dvc, tmp_dir, dvc, make_dataset, remote): dataset = make_dataset(cache=True, dvcfile=True) bench_dvc("push")