Add --lock-wait to retry deploy lock acquisition#1844
Open
matthewbjones wants to merge 1 commit intobasecamp:mainfrom
Open
Add --lock-wait to retry deploy lock acquisition#1844matthewbjones wants to merge 1 commit intobasecamp:mainfrom
--lock-wait to retry deploy lock acquisition#1844matthewbjones wants to merge 1 commit intobasecamp:mainfrom
Conversation
Multiple CI workflows targeting the same Kamal deployment race on the deploy lock; only the first wins and the rest abort. `--lock-wait` polls the lock instead of failing immediately, with `--lock-wait-timeout` and `--lock-wait-interval` controlling behavior (defaults: 15 minutes, 15 seconds).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Multiple CI workflows targeting the same Kamal deployment race on the deploy lock — only the first wins and the rest abort with
LockError.--lock-waitmakes lock-acquiring commands (deploy,redeploy,rollback,app boot, etc.) poll for the lock instead of failing immediately, useful for shared CI environments.The retry target is the same atomic
mkdirthat backslock acquire, so wait-then-acquire is race-free without a separate check phase. On timeout, the existing lock holder's details are printed andKamal::Cli::LockErroris raised.Defaults: 15 minute timeout, 15 second poll interval. Both configurable.
Heartbeat output during the wait: