Skip to content

Commit 164569b

Browse files
committed
Revert "Redirect TEMP + Go caches via C:\a\_fast junction"
This reverts commit 9908fe7.
1 parent 942125d commit 164569b

1 file changed

Lines changed: 15 additions & 30 deletions

File tree

.github/actions/setup-build-environment/action.yml

Lines changed: 15 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,19 @@ inputs:
99
runs:
1010
using: 'composite'
1111
steps:
12-
# Mount a ReFS Dev Drive on Windows and redirect TEMP, TMP, and the Go
13-
# cache dirs through a `C:\a\_fast` junction that physically lives on Z:.
12+
# Mount a ReFS Dev Drive on Windows and route Go's cache dirs onto it.
1413
# The default C: drive on GH runners is ~4.3k IOPS; a Dev Drive is ~127k.
15-
# Per-test `.terraform/` dirs (under TEMP via `t.TempDir()`) dominate
16-
# `make test` wall-clock on Windows, so moving TEMP onto the fast volume
17-
# is the key lever.
14+
# Go build compilation is small-file-heavy and benefits most. The
15+
# `-DevDrive` flag is Win11 22621+ / WS2025; older hosts fall back to plain
16+
# ReFS which is still markedly faster than C:. Must run before setup-go so
17+
# GOCACHE/GOMODCACHE save/restore lands on the drive.
1818
#
19-
# We use a junction at `C:\a\_fast` -> `Z:\fast` (not a direct `Z:\tmp`)
20-
# so that path strings keep the `C:\` prefix. That matters for older
21-
# databricks-bundles (`bundle/python/*` tests with PYDAB_VERSION=0.266.0)
22-
# which call `os.path.commonpath([cwd, uv_cache_path])`; mixing C: and Z:
23-
# in those string paths raises `ValueError: Paths don't have the same
24-
# drive`. The junction is transparent to path-inspecting code.
25-
#
26-
# The junction is placed outside the checkout (`C:\a\_fast`, sibling to
27-
# `C:\a\cli\cli`) so it doesn't pollute `git status`, trip `git clean`
28-
# after `actions/checkout`, or show up in repo-walking tools.
29-
#
30-
# The `-DevDrive` flag is Win11 22621+ / WS2025; older hosts fall through
31-
# to plain ReFS which is still markedly faster than C:.
32-
- name: Mount ReFS Dev Drive and redirect I/O-hot dirs (Windows)
19+
# Note: TEMP/TMP are intentionally NOT redirected. Doing so puts
20+
# `t.TempDir()` on Z: while the checkout and uv's Python package cache stay
21+
# on C:, which triggers `ValueError: Paths don't have the same drive` in
22+
# older databricks-bundles versions under `bundle/python/*` tests
23+
# (`os.path.commonpath` can't span drives).
24+
- name: Mount ReFS Dev Drive (Windows)
3325
if: runner.os == 'Windows'
3426
shell: pwsh
3527
run: |
@@ -45,17 +37,10 @@ runs:
4537
Format-Volume -DriveLetter Z -FileSystem ReFS `
4638
-NewFileSystemLabel DevDrive -Confirm:$false -Force | Out-Null
4739
}
48-
49-
New-Item -ItemType Directory -Path Z:\fast | Out-Null
50-
New-Item -ItemType Junction -Path C:\a\_fast -Target Z:\fast | Out-Null
51-
New-Item -ItemType Directory -Path `
52-
C:\a\_fast\tmp, C:\a\_fast\go-build, C:\a\_fast\go-mod, C:\a\_fast\go-tmp | Out-Null
53-
54-
"TEMP=C:\a\_fast\tmp" | Out-File -Append -Encoding utf8 $env:GITHUB_ENV
55-
"TMP=C:\a\_fast\tmp" | Out-File -Append -Encoding utf8 $env:GITHUB_ENV
56-
"GOCACHE=C:\a\_fast\go-build" | Out-File -Append -Encoding utf8 $env:GITHUB_ENV
57-
"GOMODCACHE=C:\a\_fast\go-mod" | Out-File -Append -Encoding utf8 $env:GITHUB_ENV
58-
"GOTMPDIR=C:\a\_fast\go-tmp" | Out-File -Append -Encoding utf8 $env:GITHUB_ENV
40+
New-Item -ItemType Directory -Path Z:\go-build,Z:\go-mod,Z:\go-tmp | Out-Null
41+
"GOCACHE=Z:\go-build" | Out-File -Append -Encoding utf8 $env:GITHUB_ENV
42+
"GOMODCACHE=Z:\go-mod" | Out-File -Append -Encoding utf8 $env:GITHUB_ENV
43+
"GOTMPDIR=Z:\go-tmp" | Out-File -Append -Encoding utf8 $env:GITHUB_ENV
5944
6045
- name: Checkout repository and submodules
6146
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

0 commit comments

Comments
 (0)