From 63311f0741d543093e083b9c6004aef6bf2a8421 Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 1 Dec 2026 12:51:55 +0000 Subject: enstate: refused submissions, visible A submission the switch refuses is moved to STATE/refused/NAME with NAME.json next to it: when, and why ("refused" if nothing more). The check's message names the waiting submission's path. --status lists what waits in the incoming directory, planned against the running generation (one the check refused stays waiting, and refuses switches while it does), and what was refused, with the reasons (and --json as data); it exits with 1 if something needs attention: a refused submission, a waiting one the running generation would refuse, an unfilled required slot, so that a deployment running it notices. --forget NAME removes a waiting or refused submission. After hrm's review. --- share/bash-completion/completions/enstate | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'share/bash-completion/completions') diff --git a/share/bash-completion/completions/enstate b/share/bash-completion/completions/enstate index dc90101..3774be5 100644 --- a/share/bash-completion/completions/enstate +++ b/share/bash-completion/completions/enstate @@ -4,7 +4,7 @@ _enstate() { local cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]} - local commands="--plan --apply --stage --status --materialize --migrate --pack" + local commands="--plan --apply --stage --status --materialize --migrate --pack --forget" # the settings, and those each command uses local general="--config --unset --print-config" local settings="$general --state-dir --run-dir --schema --sandbox --unit" @@ -19,7 +19,7 @@ _enstate() { for ((i = 1; i < COMP_CWORD; i++)); do w=${COMP_WORDS[i]} case $w in - --plan | --apply | --stage | --status | --materialize | --migrate | --pack) + --plan | --apply | --stage | --status | --materialize | --migrate | --pack | --forget) cmd=${w#--} ;; --out | --config | --unset | --state-dir | --run-dir | --schema | --sandbox | --unit) used="$used$w " @@ -42,6 +42,7 @@ _enstate() { plan | stage) options="--json $store --sandbox" ;; apply) options="--json $store --sandbox --unit" ;; status) options="--json $store" ;; + forget) options="$general --state-dir" ;; materialize) options="--json $store --sandbox" ;; migrate) options="--json --dry-run $store --sandbox" ;; pack) -- cgit v1.3.1