Ties the ladder and the verifiers together behind a new verb: libreportal updater upgrade <app> [version] [--dry-run] Per rung, and every part is load-bearing: snapshot (fail-closed) -> set version -> pull -> up -> VERIFY -> next On failure anywhere: restore THIS rung's snapshot, put the version back, stop, and leave the app on the last version it actually verified at. The ladder never continues past a doubt. A snapshot PER RUNG rather than one at the start, because upstream migrations are usually one-way — Nextcloud 32's schema cannot be undone by putting the 31 image back. The recovery guarantee is "restore the snapshot from sixty seconds ago", which only holds if every rung has one. Two gates before anything moves. An app with no <app>_upgrade_verify is refused outright: the generic health check cannot see a half-finished migration, so laddering on it would be a guess wearing a safety label. And a ladder that cannot be computed end to end refuses rather than attempting a partial climb. `updater upgrade` is a separate verb from `apply` on purpose: apply moves you WITHIN a release line (and may be automatic), upgrade moves you BETWEEN lines and is always a deliberate act. Dry runs execute inline so the plan is instant to read. updaterSetAnchorVersion rewrites the image tag AND its version sentinel together — updating only the image would leave the sentinel advertising the old version, and the next config regeneration would silently revert the app. Tested with stubs against the real code paths: the no-verifier gate holds and changes nothing; a dry run has zero side effects; the happy path snapshots at each current version before moving; a verify failure on rung 2 of 3 stops with the app on rung 1, restored, and never touches rung 3; a failed snapshot moves no version and pulls nothing; a container that will not start is rolled back. NOT yet exercised on a live install — no app here needs a ladder. The first real run should be a dry run. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
69 lines
2.9 KiB
Bash
Executable File
69 lines
2.9 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# This file is auto-generated by generate_arrays.sh
|
|
# Do not edit manually - run './scripts/source/files/generate_arrays.sh run' to regenerate
|
|
|
|
cli_scripts=(
|
|
"cli/cli_initialize.sh"
|
|
"cli/cli_update.sh"
|
|
"cli/commands/app/cli_app_commands.sh"
|
|
"cli/commands/app/cli_app_header.sh"
|
|
"cli/commands/app/cli_app_restore.sh"
|
|
"cli/commands/app/cli_app_tool_list.sh"
|
|
"cli/commands/artifact/cli_artifact_apply.sh"
|
|
"cli/commands/artifact/cli_artifact_commands.sh"
|
|
"cli/commands/artifact/cli_artifact_header.sh"
|
|
"cli/commands/backup/cli_backup_commands.sh"
|
|
"cli/commands/backup/cli_backup_header.sh"
|
|
"cli/commands/catalog/cli_catalog_commands.sh"
|
|
"cli/commands/catalog/cli_catalog_header.sh"
|
|
"cli/commands/config/cli_config_commands.sh"
|
|
"cli/commands/config/cli_config_header.sh"
|
|
"cli/commands/debug/cli_debug_commands.sh"
|
|
"cli/commands/debug/cli_debug_header.sh"
|
|
"cli/commands/dockertype/cli_dockertype_commands.sh"
|
|
"cli/commands/dockertype/cli_dockertype_header.sh"
|
|
"cli/commands/firewall/cli_firewall_commands.sh"
|
|
"cli/commands/firewall/cli_firewall_header.sh"
|
|
"cli/commands/help/cli_help_commands.sh"
|
|
"cli/commands/help/cli_help_header.sh"
|
|
"cli/commands/install/cli_install_commands.sh"
|
|
"cli/commands/install/cli_install_header.sh"
|
|
"cli/commands/instance/cli_instance_commands.sh"
|
|
"cli/commands/instance/cli_instance_header.sh"
|
|
"cli/commands/ip/cli_ip_commands.sh"
|
|
"cli/commands/ip/cli_ip_header.sh"
|
|
"cli/commands/notify/cli_notify_commands.sh"
|
|
"cli/commands/notify/cli_notify_header.sh"
|
|
"cli/commands/peer/cli_peer_commands.sh"
|
|
"cli/commands/peer/cli_peer_header.sh"
|
|
"cli/commands/regen/cli_regen_commands.sh"
|
|
"cli/commands/regen/cli_regen_header.sh"
|
|
"cli/commands/reset/cli_reset_commands.sh"
|
|
"cli/commands/reset/cli_reset_header.sh"
|
|
"cli/commands/restore/cli_restore_commands.sh"
|
|
"cli/commands/restore/cli_restore_header.sh"
|
|
"cli/commands/setup/cli_setup_commands.sh"
|
|
"cli/commands/setup/cli_setup_header.sh"
|
|
"cli/commands/ssh/cli_ssh_commands.sh"
|
|
"cli/commands/ssh/cli_ssh_header.sh"
|
|
"cli/commands/system/cli_system_commands.sh"
|
|
"cli/commands/system/cli_system_header.sh"
|
|
"cli/commands/update/cli_update_commands.sh"
|
|
"cli/commands/update/cli_update_header.sh"
|
|
"cli/commands/updater/cli_updater_auto.sh"
|
|
"cli/commands/updater/cli_updater_commands.sh"
|
|
"cli/commands/updater/cli_updater_header.sh"
|
|
"cli/commands/updater/cli_updater_ladder.sh"
|
|
"cli/commands/updater/cli_updater_upgrade.sh"
|
|
"cli/commands/updater/cli_updater_verify.sh"
|
|
"cli/commands/validation/cli_validation_commands.sh"
|
|
"cli/commands/validation/cli_validation_header.sh"
|
|
"cli/commands/verify/cli_verify_commands.sh"
|
|
"cli/commands/verify/cli_verify_header.sh"
|
|
"cli/commands/webui/cli_webui_commands.sh"
|
|
"cli/commands/webui/cli_webui_header.sh"
|
|
"cli/task/cli_task_run.sh"
|
|
|
|
)
|