mirror of
https://github.com/dokku/dokku.git
synced 2026-08-29 10:08:53 +02:00
fix: split report global keys into raw and computed across plugins
The `<plugin>-global-<property>` keys in `:report` output returned the resolved value with the built-in default substituted in, so external tooling could not distinguish a property that had been set globally to the default from one that had never been set. The bare keys for caddy, haproxy, and traefik global-only properties had the same shape. The `global-<property>` keys now hold the raw stored value and are empty when nothing has been set, and a new `computed-<property>` key holds the effective value used at runtime, falling back through the per-app value (where one exists), the global value, and the built-in default. The bare global-only keys for the three proxy plugins are removed in favor of the raw/computed pair. Closes #8631.
This commit is contained in:
@@ -45,6 +45,8 @@ cmd-scheduler-docker-local-report-single() {
|
||||
local flag_map=()
|
||||
if [[ "$APP" == "--global" ]]; then
|
||||
flag_map=(
|
||||
"--scheduler-docker-local-computed-init-process: $(fn-scheduler-docker-local-computed-init-process "$APP")"
|
||||
"--scheduler-docker-local-computed-parallel-schedule-count: $(fn-scheduler-docker-local-computed-parallel-schedule-count "$APP")"
|
||||
"--scheduler-docker-local-global-init-process: $(fn-scheduler-docker-local-global-init-process "$APP")"
|
||||
"--scheduler-docker-local-global-parallel-schedule-count: $(fn-scheduler-docker-local-global-parallel-schedule-count "$APP")"
|
||||
)
|
||||
@@ -107,12 +109,15 @@ fn-scheduler-docker-local-computed-init-process() {
|
||||
if [[ -z "$value" ]]; then
|
||||
value="$(fn-scheduler-docker-local-global-init-process "$APP")"
|
||||
fi
|
||||
if [[ -z "$value" ]]; then
|
||||
value="true"
|
||||
fi
|
||||
echo "$value"
|
||||
}
|
||||
|
||||
fn-scheduler-docker-local-global-init-process() {
|
||||
declare APP="$1"
|
||||
fn-plugin-property-get-default "scheduler-docker-local" "--global" "init-process" "true"
|
||||
fn-plugin-property-get-default "scheduler-docker-local" "--global" "init-process" ""
|
||||
}
|
||||
|
||||
fn-scheduler-docker-local-parallel-schedule-count() {
|
||||
@@ -127,12 +132,15 @@ fn-scheduler-docker-local-computed-parallel-schedule-count() {
|
||||
if [[ -z "$value" ]]; then
|
||||
value="$(fn-scheduler-docker-local-global-parallel-schedule-count "$APP")"
|
||||
fi
|
||||
if [[ -z "$value" ]]; then
|
||||
value="1"
|
||||
fi
|
||||
echo "$value"
|
||||
}
|
||||
|
||||
fn-scheduler-docker-local-global-parallel-schedule-count() {
|
||||
declare APP="$1"
|
||||
fn-plugin-property-get-default "scheduler-docker-local" "--global" "parallel-schedule-count" "1"
|
||||
fn-plugin-property-get-default "scheduler-docker-local" "--global" "parallel-schedule-count" ""
|
||||
}
|
||||
|
||||
fn-scheduler-docker-local-get-checks-file-path() {
|
||||
|
||||
Reference in New Issue
Block a user