fix: make plugin sync safe for concurrent replica starts #12

Merged
benvin merged 1 commits from benvin/fix-plugin-sync-race into main 2026-09-13 18:57:11 +10:00

1 Commits

Author SHA1 Message Date
unkin-agent e0a195179b fix: make plugin sync safe for concurrent replica starts
ci/woodpecker/pr/build Pipeline was successful
Two replicas starting together on the shared /config volume race the
unconditional rm+cp, so one dies with a permission error or a plugin
UnauthorizedAccessException. Skip the sync once the correct version
is already present, stage new/changed versions and move them into
place with an atomic rename, and treat a lost rename race or an
already-removed stale version as success rather than failure.
2026-09-13 18:49:52 +10:00