From bee5332178e9b5bb6e8f45e1ab0e25389702a7a6 Mon Sep 17 00:00:00 2001 From: Spencer Bryngelson Date: Tue, 28 Apr 2026 09:36:43 -0400 Subject: [PATCH] ci: redirect uv cache to node-local TMPDIR on GitHub Actions self-hosted runners --- toolchain/bootstrap/python.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/toolchain/bootstrap/python.sh b/toolchain/bootstrap/python.sh index df485d6065..ddbdb94749 100644 --- a/toolchain/bootstrap/python.sh +++ b/toolchain/bootstrap/python.sh @@ -180,6 +180,14 @@ if ! cmp "$(pwd)/toolchain/pyproject.toml" "$(pwd)/build/pyproject.toml" > /dev/ if [ "$USE_UV" = "1" ]; then # UV_LINK_MODE=copy avoids slow hardlink failures on cross-filesystem installs (common on HPC) export UV_LINK_MODE=copy + # On GitHub Actions self-hosted runners, the default uv cache (~/.cache/uv) + # often lives on a shared NFS $HOME (e.g. OLCF /ccs/home), where uv's + # file-lock implementation hits "os error 524" when concurrent runners on + # different nodes contend for the same .lock. Redirect to node-local + # storage in CI only, so non-CI users keep their normal reusable cache. + if [ "${GITHUB_ACTIONS:-}" = "true" ] && [ -w "${TMPDIR:-/tmp}" ]; then + export UV_CACHE_DIR="${TMPDIR:-/tmp}/uv-cache-${USER:-$(id -un)}" + fi log "(venv) Using$MAGENTA uv$COLOR_RESET for fast installation..." if [ "$verbose" = "1" ]; then