From c3b164d812f3daa05d73d9939e46deb84c36171e Mon Sep 17 00:00:00 2001 From: Pieter Noordhuis Date: Wed, 22 Apr 2026 15:29:01 +0200 Subject: [PATCH 1/8] ci: mount ReFS Dev Drive on Windows to speed up small-file I/O Acceptance tests on Windows spend most of their wall-clock on small-file writes: each terraform init copies providers into a per-test `.terraform/` under `$TEMP`, and the go build/module caches see similar churn. The default C: drive on GitHub-hosted and Databricks-protected Windows runners is backed by remote block storage (~4.3k IOPS); a ReFS Dev Drive is ~127k IOPS on comparable benchmarks. This step creates a 20GB dynamic VHDX, mounts it as Z:, formats it ReFS (with the `-DevDrive` flag where the host supports it, falling back to plain ReFS otherwise), and redirects TEMP/TMP + GOCACHE/GOMODCACHE/ GOTMPDIR onto it. Checkout stays on C: -- moving it would be invasive (acceptance test output normalization) for little further gain. Placed at the top of the composite action so it applies to every caller (test, test-exp-aitools, test-exp-ssh, test-pipelines). No-op on non-Windows runners via `runner.os == 'Windows'`. Co-authored-by: Isaac --- .../setup-build-environment/action.yml | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/.github/actions/setup-build-environment/action.yml b/.github/actions/setup-build-environment/action.yml index 62d9bd66f1..7fa6010b03 100644 --- a/.github/actions/setup-build-environment/action.yml +++ b/.github/actions/setup-build-environment/action.yml @@ -9,6 +9,35 @@ inputs: runs: using: 'composite' steps: + # Mount a ReFS Dev Drive on Windows and point TEMP/TMP + Go's cache dirs at + # it. Small-file I/O (per-test `.terraform/providers/`, go build cache, etc.) + # is roughly ~30x faster than the default C: drive on GH runners. The + # `-DevDrive` flag is Win11 22621+ / WS2025; older hosts fall back to plain + # ReFS which is still markedly faster than C:. Must run before setup-go so + # GOCACHE/GOMODCACHE are rooted on the drive. + - name: Mount ReFS Dev Drive (Windows) + if: runner.os == 'Windows' + shell: pwsh + run: | + $vhdPath = "$env:RUNNER_TEMP\devdrive.vhdx" + New-VHD -Path $vhdPath -SizeBytes 20GB -Dynamic | Out-Null + $disk = Mount-VHD -Path $vhdPath -Passthru | + Initialize-Disk -PartitionStyle GPT -Passthru + New-Partition -DiskNumber $disk.Number -UseMaximumSize -DriveLetter Z | Out-Null + try { + Format-Volume -DriveLetter Z -FileSystem ReFS -DevDrive ` + -NewFileSystemLabel DevDrive -Confirm:$false -Force | Out-Null + } catch { + Format-Volume -DriveLetter Z -FileSystem ReFS ` + -NewFileSystemLabel DevDrive -Confirm:$false -Force | Out-Null + } + New-Item -ItemType Directory -Path Z:\tmp,Z:\go-build,Z:\go-mod,Z:\go-tmp | Out-Null + "TEMP=Z:\tmp" | Out-File -Append -Encoding utf8 $env:GITHUB_ENV + "TMP=Z:\tmp" | Out-File -Append -Encoding utf8 $env:GITHUB_ENV + "GOCACHE=Z:\go-build" | Out-File -Append -Encoding utf8 $env:GITHUB_ENV + "GOMODCACHE=Z:\go-mod" | Out-File -Append -Encoding utf8 $env:GITHUB_ENV + "GOTMPDIR=Z:\go-tmp" | Out-File -Append -Encoding utf8 $env:GITHUB_ENV + - name: Checkout repository and submodules uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 From 11c5c447a32ce4523dd73389e275256b24fa8e0a Mon Sep 17 00:00:00 2001 From: Pieter Noordhuis Date: Wed, 22 Apr 2026 16:32:51 +0200 Subject: [PATCH 2/8] Drop TEMP/TMP redirect from Dev Drive step Redirecting TEMP to Z: puts `t.TempDir()` (and therefore each test's bundle cwd) on Z:, while the checkout and uv's Python package cache stay on C:. Under `bundle/python/*` tests with older databricks-bundles versions (e.g. PYDAB_VERSION=0.266.0), the Python mutator calls `os.path.commonpath([os.getcwd(), path])` which raises `ValueError: Paths don't have the same drive`. Six tests regressed: experimental-compatibility{,-both-equal}, resource-loading, unicode-support, restricted-execution, resolve-variable. Keep only GOCACHE/GOMODCACHE/GOTMPDIR on the Dev Drive -- those benefit Go compilation I/O without spanning drive boundaries at the Python level. Per-test `.terraform/` speedup is lost; recover it in a follow-up by plumbing a test-framework-specific tmpdir that callers can keep on the same drive as the checkout. Co-authored-by: Isaac --- .../actions/setup-build-environment/action.yml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/actions/setup-build-environment/action.yml b/.github/actions/setup-build-environment/action.yml index 7fa6010b03..4b36e8e744 100644 --- a/.github/actions/setup-build-environment/action.yml +++ b/.github/actions/setup-build-environment/action.yml @@ -9,12 +9,18 @@ inputs: runs: using: 'composite' steps: - # Mount a ReFS Dev Drive on Windows and point TEMP/TMP + Go's cache dirs at - # it. Small-file I/O (per-test `.terraform/providers/`, go build cache, etc.) - # is roughly ~30x faster than the default C: drive on GH runners. The + # Mount a ReFS Dev Drive on Windows and route Go's cache dirs onto it. + # The default C: drive on GH runners is ~4.3k IOPS; a Dev Drive is ~127k. + # Go build compilation is small-file-heavy and benefits most. The # `-DevDrive` flag is Win11 22621+ / WS2025; older hosts fall back to plain # ReFS which is still markedly faster than C:. Must run before setup-go so - # GOCACHE/GOMODCACHE are rooted on the drive. + # GOCACHE/GOMODCACHE save/restore lands on the drive. + # + # Note: TEMP/TMP are intentionally NOT redirected. Doing so puts + # `t.TempDir()` on Z: while the checkout and uv's Python package cache stay + # on C:, which triggers `ValueError: Paths don't have the same drive` in + # older databricks-bundles versions under `bundle/python/*` tests + # (`os.path.commonpath` can't span drives). - name: Mount ReFS Dev Drive (Windows) if: runner.os == 'Windows' shell: pwsh @@ -31,9 +37,7 @@ runs: Format-Volume -DriveLetter Z -FileSystem ReFS ` -NewFileSystemLabel DevDrive -Confirm:$false -Force | Out-Null } - New-Item -ItemType Directory -Path Z:\tmp,Z:\go-build,Z:\go-mod,Z:\go-tmp | Out-Null - "TEMP=Z:\tmp" | Out-File -Append -Encoding utf8 $env:GITHUB_ENV - "TMP=Z:\tmp" | Out-File -Append -Encoding utf8 $env:GITHUB_ENV + New-Item -ItemType Directory -Path Z:\go-build,Z:\go-mod,Z:\go-tmp | Out-Null "GOCACHE=Z:\go-build" | Out-File -Append -Encoding utf8 $env:GITHUB_ENV "GOMODCACHE=Z:\go-mod" | Out-File -Append -Encoding utf8 $env:GITHUB_ENV "GOTMPDIR=Z:\go-tmp" | Out-File -Append -Encoding utf8 $env:GITHUB_ENV From 931c8a948c64217031f6dc6180c2b11fedf60f80 Mon Sep 17 00:00:00 2001 From: Pieter Noordhuis Date: Wed, 22 Apr 2026 16:40:10 +0200 Subject: [PATCH 3/8] Junction the workspace onto the Dev Drive on Windows Rather than redirecting individual env vars (TEMP/TMP/GO*) and running into cross-drive path issues (Python mutator's `os.path.commonpath([cwd, path])` fails when cwd and the uv-cached module live on different drives), we can just relocate the entire workspace. Create a directory junction from `$GITHUB_WORKSPACE` (still on C:) to `Z:\workspace`. From every tool's point of view the path is unchanged -- it starts with `C:\` and `commonpath` works. Physically, all reads and writes go to the ReFS volume. Flow: - Mount VHDX at Z: - Wipe the workflow's prior checkout at $GITHUB_WORKSPACE - Create junction to Z:\workspace - The composite's own `actions/checkout` step re-populates the workspace via the junction (so setup-jfrog etc. find their files) No Go / TEMP env gymnastics needed. bundle/python/* tests stay happy. Co-authored-by: Isaac --- .../setup-build-environment/action.yml | 31 ++++++++++++------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/.github/actions/setup-build-environment/action.yml b/.github/actions/setup-build-environment/action.yml index 4b36e8e744..c6b00ce922 100644 --- a/.github/actions/setup-build-environment/action.yml +++ b/.github/actions/setup-build-environment/action.yml @@ -9,22 +9,25 @@ inputs: runs: using: 'composite' steps: - # Mount a ReFS Dev Drive on Windows and route Go's cache dirs onto it. + # Mount a ReFS Dev Drive on Windows and junction the workspace onto it so + # every checkout / build / test file physically lives on the fast volume. # The default C: drive on GH runners is ~4.3k IOPS; a Dev Drive is ~127k. - # Go build compilation is small-file-heavy and benefits most. The - # `-DevDrive` flag is Win11 22621+ / WS2025; older hosts fall back to plain - # ReFS which is still markedly faster than C:. Must run before setup-go so - # GOCACHE/GOMODCACHE save/restore lands on the drive. + # The `-DevDrive` flag is Win11 22621+ / WS2025; older hosts fall back to + # plain ReFS which is still markedly faster than C:. # - # Note: TEMP/TMP are intentionally NOT redirected. Doing so puts - # `t.TempDir()` on Z: while the checkout and uv's Python package cache stay - # on C:, which triggers `ValueError: Paths don't have the same drive` in - # older databricks-bundles versions under `bundle/python/*` tests - # (`os.path.commonpath` can't span drives). - - name: Mount ReFS Dev Drive (Windows) + # We use a directory junction (not a Z: cwd) so that path-inspecting tools + # -- e.g. the Python mutator's `os.path.commonpath` in older + # databricks-bundles -- still see the original C:\ path and don't trip the + # "Paths don't have the same drive" error. + # + # The junction happens before the composite's own `actions/checkout` step + # re-populates the workspace (via the junction, physically on Z:). + - name: Mount ReFS Dev Drive and junction workspace (Windows) if: runner.os == 'Windows' shell: pwsh run: | + Set-Location C:\ + $vhdPath = "$env:RUNNER_TEMP\devdrive.vhdx" New-VHD -Path $vhdPath -SizeBytes 20GB -Dynamic | Out-Null $disk = Mount-VHD -Path $vhdPath -Passthru | @@ -37,6 +40,12 @@ runs: Format-Volume -DriveLetter Z -FileSystem ReFS ` -NewFileSystemLabel DevDrive -Confirm:$false -Force | Out-Null } + + $ws = $env:GITHUB_WORKSPACE + Remove-Item -Recurse -Force -LiteralPath $ws + New-Item -ItemType Directory -Path Z:\workspace | Out-Null + New-Item -ItemType Junction -Path $ws -Target Z:\workspace | Out-Null + New-Item -ItemType Directory -Path Z:\go-build,Z:\go-mod,Z:\go-tmp | Out-Null "GOCACHE=Z:\go-build" | Out-File -Append -Encoding utf8 $env:GITHUB_ENV "GOMODCACHE=Z:\go-mod" | Out-File -Append -Encoding utf8 $env:GITHUB_ENV From 59d49a78857296f43ddc78aaf8c0f324e2caf75c Mon Sep 17 00:00:00 2001 From: Pieter Noordhuis Date: Wed, 22 Apr 2026 16:58:20 +0200 Subject: [PATCH 4/8] Revert "Junction the workspace onto the Dev Drive on Windows" This reverts commit 931c8a948c64217031f6dc6180c2b11fedf60f80. --- .../setup-build-environment/action.yml | 31 +++++++------------ 1 file changed, 11 insertions(+), 20 deletions(-) diff --git a/.github/actions/setup-build-environment/action.yml b/.github/actions/setup-build-environment/action.yml index c6b00ce922..4b36e8e744 100644 --- a/.github/actions/setup-build-environment/action.yml +++ b/.github/actions/setup-build-environment/action.yml @@ -9,25 +9,22 @@ inputs: runs: using: 'composite' steps: - # Mount a ReFS Dev Drive on Windows and junction the workspace onto it so - # every checkout / build / test file physically lives on the fast volume. + # Mount a ReFS Dev Drive on Windows and route Go's cache dirs onto it. # The default C: drive on GH runners is ~4.3k IOPS; a Dev Drive is ~127k. - # The `-DevDrive` flag is Win11 22621+ / WS2025; older hosts fall back to - # plain ReFS which is still markedly faster than C:. + # Go build compilation is small-file-heavy and benefits most. The + # `-DevDrive` flag is Win11 22621+ / WS2025; older hosts fall back to plain + # ReFS which is still markedly faster than C:. Must run before setup-go so + # GOCACHE/GOMODCACHE save/restore lands on the drive. # - # We use a directory junction (not a Z: cwd) so that path-inspecting tools - # -- e.g. the Python mutator's `os.path.commonpath` in older - # databricks-bundles -- still see the original C:\ path and don't trip the - # "Paths don't have the same drive" error. - # - # The junction happens before the composite's own `actions/checkout` step - # re-populates the workspace (via the junction, physically on Z:). - - name: Mount ReFS Dev Drive and junction workspace (Windows) + # Note: TEMP/TMP are intentionally NOT redirected. Doing so puts + # `t.TempDir()` on Z: while the checkout and uv's Python package cache stay + # on C:, which triggers `ValueError: Paths don't have the same drive` in + # older databricks-bundles versions under `bundle/python/*` tests + # (`os.path.commonpath` can't span drives). + - name: Mount ReFS Dev Drive (Windows) if: runner.os == 'Windows' shell: pwsh run: | - Set-Location C:\ - $vhdPath = "$env:RUNNER_TEMP\devdrive.vhdx" New-VHD -Path $vhdPath -SizeBytes 20GB -Dynamic | Out-Null $disk = Mount-VHD -Path $vhdPath -Passthru | @@ -40,12 +37,6 @@ runs: Format-Volume -DriveLetter Z -FileSystem ReFS ` -NewFileSystemLabel DevDrive -Confirm:$false -Force | Out-Null } - - $ws = $env:GITHUB_WORKSPACE - Remove-Item -Recurse -Force -LiteralPath $ws - New-Item -ItemType Directory -Path Z:\workspace | Out-Null - New-Item -ItemType Junction -Path $ws -Target Z:\workspace | Out-Null - New-Item -ItemType Directory -Path Z:\go-build,Z:\go-mod,Z:\go-tmp | Out-Null "GOCACHE=Z:\go-build" | Out-File -Append -Encoding utf8 $env:GITHUB_ENV "GOMODCACHE=Z:\go-mod" | Out-File -Append -Encoding utf8 $env:GITHUB_ENV From 9908fe7d184525b455258eb4b90ceae5178441ca Mon Sep 17 00:00:00 2001 From: Pieter Noordhuis Date: Wed, 22 Apr 2026 17:35:26 +0200 Subject: [PATCH 5/8] Redirect TEMP + Go caches via C:\a\_fast junction Go-caches-only on Z: left the big Windows test jobs effectively flat (windows/terraform 32m34s vs 32m33s baseline) because the dominant cost is per-test `.terraform/` churn under TEMP, not Go compilation. Moving TEMP onto the Dev Drive was the missing piece. The first TEMP-on-Z: attempt broke `bundle/python/*` tests (older databricks-bundles calls `os.path.commonpath([cwd, uv_cache_path])` and chokes when the two live on different drives). Fix: create a directory junction at `C:\a\_fast` (sibling to `C:\a\cli\cli`, not inside the repo) pointing at `Z:\fast`. Path strings stay `C:\...`, so `commonpath` is happy; I/O physically lands on Z:. Junction is outside the checkout to avoid `git status` pollution, `git clean` interactions after `actions/checkout`, and unintended traversal by repo-walking tools. Co-authored-by: Isaac --- .../setup-build-environment/action.yml | 45 ++++++++++++------- 1 file changed, 30 insertions(+), 15 deletions(-) diff --git a/.github/actions/setup-build-environment/action.yml b/.github/actions/setup-build-environment/action.yml index 4b36e8e744..34d756a18f 100644 --- a/.github/actions/setup-build-environment/action.yml +++ b/.github/actions/setup-build-environment/action.yml @@ -9,19 +9,27 @@ inputs: runs: using: 'composite' steps: - # Mount a ReFS Dev Drive on Windows and route Go's cache dirs onto it. + # Mount a ReFS Dev Drive on Windows and redirect TEMP, TMP, and the Go + # cache dirs through a `C:\a\_fast` junction that physically lives on Z:. # The default C: drive on GH runners is ~4.3k IOPS; a Dev Drive is ~127k. - # Go build compilation is small-file-heavy and benefits most. The - # `-DevDrive` flag is Win11 22621+ / WS2025; older hosts fall back to plain - # ReFS which is still markedly faster than C:. Must run before setup-go so - # GOCACHE/GOMODCACHE save/restore lands on the drive. + # Per-test `.terraform/` dirs (under TEMP via `t.TempDir()`) dominate + # `make test` wall-clock on Windows, so moving TEMP onto the fast volume + # is the key lever. # - # Note: TEMP/TMP are intentionally NOT redirected. Doing so puts - # `t.TempDir()` on Z: while the checkout and uv's Python package cache stay - # on C:, which triggers `ValueError: Paths don't have the same drive` in - # older databricks-bundles versions under `bundle/python/*` tests - # (`os.path.commonpath` can't span drives). - - name: Mount ReFS Dev Drive (Windows) + # We use a junction at `C:\a\_fast` -> `Z:\fast` (not a direct `Z:\tmp`) + # so that path strings keep the `C:\` prefix. That matters for older + # databricks-bundles (`bundle/python/*` tests with PYDAB_VERSION=0.266.0) + # which call `os.path.commonpath([cwd, uv_cache_path])`; mixing C: and Z: + # in those string paths raises `ValueError: Paths don't have the same + # drive`. The junction is transparent to path-inspecting code. + # + # The junction is placed outside the checkout (`C:\a\_fast`, sibling to + # `C:\a\cli\cli`) so it doesn't pollute `git status`, trip `git clean` + # after `actions/checkout`, or show up in repo-walking tools. + # + # The `-DevDrive` flag is Win11 22621+ / WS2025; older hosts fall through + # to plain ReFS which is still markedly faster than C:. + - name: Mount ReFS Dev Drive and redirect I/O-hot dirs (Windows) if: runner.os == 'Windows' shell: pwsh run: | @@ -37,10 +45,17 @@ runs: Format-Volume -DriveLetter Z -FileSystem ReFS ` -NewFileSystemLabel DevDrive -Confirm:$false -Force | Out-Null } - New-Item -ItemType Directory -Path Z:\go-build,Z:\go-mod,Z:\go-tmp | Out-Null - "GOCACHE=Z:\go-build" | Out-File -Append -Encoding utf8 $env:GITHUB_ENV - "GOMODCACHE=Z:\go-mod" | Out-File -Append -Encoding utf8 $env:GITHUB_ENV - "GOTMPDIR=Z:\go-tmp" | Out-File -Append -Encoding utf8 $env:GITHUB_ENV + + New-Item -ItemType Directory -Path Z:\fast | Out-Null + New-Item -ItemType Junction -Path C:\a\_fast -Target Z:\fast | Out-Null + New-Item -ItemType Directory -Path ` + C:\a\_fast\tmp, C:\a\_fast\go-build, C:\a\_fast\go-mod, C:\a\_fast\go-tmp | Out-Null + + "TEMP=C:\a\_fast\tmp" | Out-File -Append -Encoding utf8 $env:GITHUB_ENV + "TMP=C:\a\_fast\tmp" | Out-File -Append -Encoding utf8 $env:GITHUB_ENV + "GOCACHE=C:\a\_fast\go-build" | Out-File -Append -Encoding utf8 $env:GITHUB_ENV + "GOMODCACHE=C:\a\_fast\go-mod" | Out-File -Append -Encoding utf8 $env:GITHUB_ENV + "GOTMPDIR=C:\a\_fast\go-tmp" | Out-File -Append -Encoding utf8 $env:GITHUB_ENV - name: Checkout repository and submodules uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 From fce8d2d4892ddc38f98d97a8b14f019c7c320741 Mon Sep 17 00:00:00 2001 From: Pieter Noordhuis Date: Wed, 22 Apr 2026 17:51:26 +0200 Subject: [PATCH 6/8] Use directory symlink instead of junction for Dev Drive `bundle.TestRootLookup` (unit test) called `filepath.EvalSymlinks` on its `t.TempDir()` path, which landed under the `C:\a\_fast` directory junction. Go's stdlib EvalSymlinks on Windows returns "cannot find the path specified" for `IO_REPARSE_TAG_MOUNT_POINT` (junctions) rooted at a newly mounted ReFS VHDX, but handles `IO_REPARSE_TAG_SYMLINK` (directory symlinks) correctly. Switching `New-Item -ItemType Junction` to `cmd /c mklink /D` (directory symbolic link) to dodge the quirk. Symlinks require Developer Mode, which is the default on GitHub-hosted Windows runners. Co-authored-by: Isaac --- .github/actions/setup-build-environment/action.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/actions/setup-build-environment/action.yml b/.github/actions/setup-build-environment/action.yml index 34d756a18f..a05ce0ef4f 100644 --- a/.github/actions/setup-build-environment/action.yml +++ b/.github/actions/setup-build-environment/action.yml @@ -47,7 +47,12 @@ runs: } New-Item -ItemType Directory -Path Z:\fast | Out-Null - New-Item -ItemType Junction -Path C:\a\_fast -Target Z:\fast | Out-Null + # Use a directory symbolic link (not a junction). Go's + # `filepath.EvalSymlinks` handles dir symlinks correctly but returns + # "cannot find the path specified" on junctions rooted at a newly + # mounted VHDX (hits `bundle.TestRootLookup` in the unit test suite). + # Requires Developer Mode, which is enabled on GH Windows runners. + cmd /c "mklink /D C:\a\_fast Z:\fast" | Out-Null New-Item -ItemType Directory -Path ` C:\a\_fast\tmp, C:\a\_fast\go-build, C:\a\_fast\go-mod, C:\a\_fast\go-tmp | Out-Null From 8685de33b2f13d8e0ecb382b286139a6974f18a9 Mon Sep 17 00:00:00 2001 From: Pieter Noordhuis Date: Wed, 22 Apr 2026 18:27:36 +0200 Subject: [PATCH 7/8] Revert "Use directory symlink instead of junction for Dev Drive" This reverts commit fce8d2d4892ddc38f98d97a8b14f019c7c320741. --- .github/actions/setup-build-environment/action.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/actions/setup-build-environment/action.yml b/.github/actions/setup-build-environment/action.yml index a05ce0ef4f..34d756a18f 100644 --- a/.github/actions/setup-build-environment/action.yml +++ b/.github/actions/setup-build-environment/action.yml @@ -47,12 +47,7 @@ runs: } New-Item -ItemType Directory -Path Z:\fast | Out-Null - # Use a directory symbolic link (not a junction). Go's - # `filepath.EvalSymlinks` handles dir symlinks correctly but returns - # "cannot find the path specified" on junctions rooted at a newly - # mounted VHDX (hits `bundle.TestRootLookup` in the unit test suite). - # Requires Developer Mode, which is enabled on GH Windows runners. - cmd /c "mklink /D C:\a\_fast Z:\fast" | Out-Null + New-Item -ItemType Junction -Path C:\a\_fast -Target Z:\fast | Out-Null New-Item -ItemType Directory -Path ` C:\a\_fast\tmp, C:\a\_fast\go-build, C:\a\_fast\go-mod, C:\a\_fast\go-tmp | Out-Null From f5621c69899e988419742d5e7311e1313fed9491 Mon Sep 17 00:00:00 2001 From: Pieter Noordhuis Date: Wed, 22 Apr 2026 18:27:36 +0200 Subject: [PATCH 8/8] Revert "Redirect TEMP + Go caches via C:\a\_fast junction" This reverts commit 9908fe7d184525b455258eb4b90ceae5178441ca. --- .../setup-build-environment/action.yml | 45 +++++++------------ 1 file changed, 15 insertions(+), 30 deletions(-) diff --git a/.github/actions/setup-build-environment/action.yml b/.github/actions/setup-build-environment/action.yml index 34d756a18f..4b36e8e744 100644 --- a/.github/actions/setup-build-environment/action.yml +++ b/.github/actions/setup-build-environment/action.yml @@ -9,27 +9,19 @@ inputs: runs: using: 'composite' steps: - # Mount a ReFS Dev Drive on Windows and redirect TEMP, TMP, and the Go - # cache dirs through a `C:\a\_fast` junction that physically lives on Z:. + # Mount a ReFS Dev Drive on Windows and route Go's cache dirs onto it. # The default C: drive on GH runners is ~4.3k IOPS; a Dev Drive is ~127k. - # Per-test `.terraform/` dirs (under TEMP via `t.TempDir()`) dominate - # `make test` wall-clock on Windows, so moving TEMP onto the fast volume - # is the key lever. + # Go build compilation is small-file-heavy and benefits most. The + # `-DevDrive` flag is Win11 22621+ / WS2025; older hosts fall back to plain + # ReFS which is still markedly faster than C:. Must run before setup-go so + # GOCACHE/GOMODCACHE save/restore lands on the drive. # - # We use a junction at `C:\a\_fast` -> `Z:\fast` (not a direct `Z:\tmp`) - # so that path strings keep the `C:\` prefix. That matters for older - # databricks-bundles (`bundle/python/*` tests with PYDAB_VERSION=0.266.0) - # which call `os.path.commonpath([cwd, uv_cache_path])`; mixing C: and Z: - # in those string paths raises `ValueError: Paths don't have the same - # drive`. The junction is transparent to path-inspecting code. - # - # The junction is placed outside the checkout (`C:\a\_fast`, sibling to - # `C:\a\cli\cli`) so it doesn't pollute `git status`, trip `git clean` - # after `actions/checkout`, or show up in repo-walking tools. - # - # The `-DevDrive` flag is Win11 22621+ / WS2025; older hosts fall through - # to plain ReFS which is still markedly faster than C:. - - name: Mount ReFS Dev Drive and redirect I/O-hot dirs (Windows) + # Note: TEMP/TMP are intentionally NOT redirected. Doing so puts + # `t.TempDir()` on Z: while the checkout and uv's Python package cache stay + # on C:, which triggers `ValueError: Paths don't have the same drive` in + # older databricks-bundles versions under `bundle/python/*` tests + # (`os.path.commonpath` can't span drives). + - name: Mount ReFS Dev Drive (Windows) if: runner.os == 'Windows' shell: pwsh run: | @@ -45,17 +37,10 @@ runs: Format-Volume -DriveLetter Z -FileSystem ReFS ` -NewFileSystemLabel DevDrive -Confirm:$false -Force | Out-Null } - - New-Item -ItemType Directory -Path Z:\fast | Out-Null - New-Item -ItemType Junction -Path C:\a\_fast -Target Z:\fast | Out-Null - New-Item -ItemType Directory -Path ` - C:\a\_fast\tmp, C:\a\_fast\go-build, C:\a\_fast\go-mod, C:\a\_fast\go-tmp | Out-Null - - "TEMP=C:\a\_fast\tmp" | Out-File -Append -Encoding utf8 $env:GITHUB_ENV - "TMP=C:\a\_fast\tmp" | Out-File -Append -Encoding utf8 $env:GITHUB_ENV - "GOCACHE=C:\a\_fast\go-build" | Out-File -Append -Encoding utf8 $env:GITHUB_ENV - "GOMODCACHE=C:\a\_fast\go-mod" | Out-File -Append -Encoding utf8 $env:GITHUB_ENV - "GOTMPDIR=C:\a\_fast\go-tmp" | Out-File -Append -Encoding utf8 $env:GITHUB_ENV + New-Item -ItemType Directory -Path Z:\go-build,Z:\go-mod,Z:\go-tmp | Out-Null + "GOCACHE=Z:\go-build" | Out-File -Append -Encoding utf8 $env:GITHUB_ENV + "GOMODCACHE=Z:\go-mod" | Out-File -Append -Encoding utf8 $env:GITHUB_ENV + "GOTMPDIR=Z:\go-tmp" | Out-File -Append -Encoding utf8 $env:GITHUB_ENV - name: Checkout repository and submodules uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2