fix(ci): avoid leaking cache lock to MSBuild nodes [CI]
ci/woodpecker/push/web-build Pipeline was successful
ci/woodpecker/push/verify Pipeline was successful
ci/woodpecker/push/dev-image Pipeline was successful

This commit is contained in:
justme committed 2026-10-19 11:15:19 +08:00
1 parent 5594d1cc86
commit fb9dc155f5
1 file changed
+3 -1
+3 -1
View File
@@ -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 \