From fb9dc155f59ff6216f459d2acf26a325139b7591 Mon Sep 17 00:00:00 2001 From: JustMe Date: Mon, 19 Oct 2026 11:15:19 +0800 Subject: [PATCH] fix(ci): avoid leaking cache lock to MSBuild nodes [CI] --- ci/release-linux.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ci/release-linux.sh b/ci/release-linux.sh index 5624a45..481ed72 100644 --- a/ci/release-linux.sh +++ b/ci/release-linux.sh @@ -73,9 +73,11 @@ mkdir -p "$sqlite_cache_root/locks" # Stable cache paths let MSBuild reuse the SQLite amalgamation object between # fresh Woodpecker workspaces. Lock per RID so overlapping retries cannot write # the same object concurrently; amd64 and arm64 builds remain parallel. +# --close keeps the lock fd out of reusable MSBuild worker processes. Otherwise +# an idle node-reuse worker can inherit it and block later pipelines indefinitely. ( cd "$root/backend" - flock -w 900 "$sqlite_cache_root/locks/$rid.lock" \ + flock --close --wait 900 "$sqlite_cache_root/locks/$rid.lock" \ dotnet publish src/MoShiro.Backend \ -m:8 -c Release -r "$rid" --self-contained true \ -p:DebugType=none -p:DebugSymbols=false \