From 6ae2ac4697c82a9574bc187cc949a29c1d3bd346 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Tue, 26 May 2026 10:15:45 +0000 Subject: [PATCH] prevent windows backend tests from running out of disk space (#9325) --- .github/workflows/backend-test-windows.yml | 36 +++++++++++++++++++--- 1 file changed, 31 insertions(+), 5 deletions(-) diff --git a/.github/workflows/backend-test-windows.yml b/.github/workflows/backend-test-windows.yml index 96b2719737..f7c49654d1 100644 --- a/.github/workflows/backend-test-windows.yml +++ b/.github/workflows/backend-test-windows.yml @@ -98,6 +98,21 @@ jobs: vcpkg.exe install openssl:x64-windows-static vcpkg.exe integrate install + - name: Free disk space (post-vcpkg) + shell: pwsh + run: | + # vcpkg leaves multi-GB of buildtrees/downloads after installing openssl; + # we only need the installed/ dir for linking. + $vcpkgRoot = $env:VCPKG_INSTALLATION_ROOT + foreach ($sub in @("buildtrees", "downloads", "packages")) { + $path = Join-Path $vcpkgRoot $sub + if (Test-Path $path) { + Write-Host "Removing $path" + Remove-Item -Recurse -Force -ErrorAction SilentlyContinue $path + } + } + Get-PSDrive C | Select-Object Used,Free | Format-Table -AutoSize + - name: Get runtime paths id: runtime-paths shell: pwsh @@ -119,6 +134,10 @@ jobs: cargo build --release -p windmill_duckdb_ffi_internal New-Item -ItemType Directory -Path ..\target\debug -Force Copy-Item target\release\windmill_duckdb_ffi_internal.dll ..\target\debug\ + # duckdb is bundled (~2GB of build artifacts); the DLL is the only + # thing we need from this excluded-crate target dir. + Remove-Item -Recurse -Force -ErrorAction SilentlyContinue target + Get-PSDrive C | Select-Object Used,Free | Format-Table -AutoSize - name: Print runtime versions and env shell: pwsh @@ -136,6 +155,10 @@ jobs: echo "USERPROFILE=$env:USERPROFILE" echo "HOME=$env:HOME" + - name: Disk space before cargo test + shell: pwsh + run: Get-PSDrive C | Select-Object Used,Free | Format-Table -AutoSize + - name: cargo test working-directory: backend timeout-minutes: 60 @@ -144,13 +167,16 @@ jobs: RUST_LOG: "off" RUST_LOG_STYLE: never CARGO_NET_GIT_FETCH_WITH_CLI: true - CARGO_BUILD_JOBS: 12 + # 16-vcpu runners with disabled PDB still hit LNK1180 ("insufficient + # disk space") at link time with 12 parallel link jobs: each test + # binary link spikes several hundred MB of transient I/O. Capping at + # 8 trades ~25% wall time for headroom on the ~75GB runner disk. + CARGO_BUILD_JOBS: 8 # backend/Cargo.toml sets split-debuginfo = "unpacked", which on # windows-msvc is coerced to "packed": every test-binary link spawns - # the mspdbsrv.exe PDB type server and writes a large .pdb. With 12 - # parallel link jobs this races the type-server cap (LNK1318 "LIMIT - # (12)") and exhausts the runner disk (LNK1180). CI needs no debug - # info, so disable PDB generation for the dev/test profiles here. + # the mspdbsrv.exe PDB type server and writes a large .pdb. CI needs + # no debug info, so disable PDB generation for the dev/test profiles + # here (avoids both LNK1318 type-server limit and PDB disk usage). CARGO_PROFILE_DEV_SPLIT_DEBUGINFO: "off" CARGO_PROFILE_TEST_SPLIT_DEBUGINFO: "off" # Tests' poll-time stack frames (deep nested async fn chains in