From ab6259a36363dccd314f505060b2f5e362f1ff5b Mon Sep 17 00:00:00 2001 From: "denis.bilenko" Date: Thu, 19 Nov 2026 12:03:02 +0000 Subject: [PATCH] integration: isolate uv Python installs in setup-local provision test `uv python install` re-creates the minor-version links of every managed Python in its install dir. On Windows that is a non-atomic junction delete and recreate, so the acceptance harness's concurrent `uv build` of the databricks-bundles wheel intermittently fails to import stdlib modules. Co-authored-by: Isaac --- integration/cmd/environments/setup_local_test.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/integration/cmd/environments/setup_local_test.go b/integration/cmd/environments/setup_local_test.go index 3d5f83bbd4b..3d5457654ae 100644 --- a/integration/cmd/environments/setup_local_test.go +++ b/integration/cmd/environments/setup_local_test.go @@ -41,6 +41,15 @@ func TestSetupLocalServerlessProvision(t *testing.T) { t.Skipf("uv not found on PATH (%v)", err) } + // Give `uv python install` its own install dir: it rewrites the minor-version + // links of every managed Python in the dir, which on Windows means deleting and + // recreating junctions. Concurrent uv users of the shared dir (the acceptance + // harness builds its wheel at the same time) then fail to import the stdlib. + pythonDir := t.TempDir() + t.Setenv("UV_PYTHON_INSTALL_DIR", filepath.Join(pythonDir, "installs")) + t.Setenv("UV_PYTHON_BIN_DIR", filepath.Join(pythonDir, "bin")) + t.Setenv("UV_PYTHON_INSTALL_REGISTRY", "0") + stdout, _ := testcli.RequireSuccessfulRun(t, ctx, "environments", "setup-local", "--serverless-version", testServerlessVersion,