Make the setup-state push report whether it worked
It was documented 'Always returns 0', so the offboard's new 'Phase flags pushed' check was testing a constant and ticking regardless.
This commit is contained in:
@@ -264,7 +264,12 @@ write_onboard_phase() {
|
||||
local state_file="$(platform_setup_db_path)"
|
||||
[[ "$DRY_RUN" == true ]] && { warn "DRY RUN — would write ${key}=true"; return 0; }
|
||||
set_state_var "$state_file" "$key" "true"
|
||||
platform_push_setup_state
|
||||
# The push now reports failure, so it is warned about rather than returned. This function's
|
||||
# contract is "the phase is recorded here" — the flag is on local disk either way, and an
|
||||
# unreachable partner must not make a completed phase look like it did not happen.
|
||||
platform_push_setup_state \
|
||||
|| warn "Phase flag ${key} written locally but not delivered to the partner"
|
||||
return 0
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user