fix: serialize concurrent property updates
Concurrent commands for the same app could each read a setting, change it, and write it back, so all of them exited successfully while silently dropping changes made by the others. Updates to app settings are now serialized so every change is kept, and readers never see a partially written value.
This commit is contained in:
42 files changed
+1698
-642
No files matched your search
@@ -12,7 +12,12 @@ cmd-checks-enable() {
|
||||
|
||||
verify_app_name "$APP"
|
||||
local PROCTYPES="${2:-_all_}"
|
||||
fn-plugin-property-lock "checks" "$APP" fn-checks-enable "$APP" "$PROCTYPES"
|
||||
}
|
||||
|
||||
fn-checks-enable() {
|
||||
declare desc="enables zero-downtime checks for app/proctypes, expecting the caller to hold the checks property lock"
|
||||
declare APP="$1" PROCTYPES="$2"
|
||||
local DOKKU_CHECKS_DISABLED=$(fn-plugin-property-get-default "checks" "$APP" "disabled" "")
|
||||
local DOKKU_CHECKS_SKIPPED=$(fn-plugin-property-get-default "checks" "$APP" "skipped" "")
|
||||
|
||||
|
||||
Reference in new issue
Block a user