fix: guards for apply-reconcile, backup prune, restic warnings and container smoke #704
Inga granskare
Etiketter
Inga etiketter
area/backups
area/ci
area/control-panel
area/identity
area/infra
area/observability
area/payments
area/security
area/storage
area/web
blocked
needs-info
needs-triage
priority
high
priority
low
priority
medium
ready-for-implementation
type
bug
type
chore
type
docs
type
epic
type
feature
type
task
wontfix
Ingen milstolpe
Inget projekt
Inga tilldelade
1 deltagare
Notiser
Förfallodatum
Inget förfallodatum satt.
Beroenden
Inga beroenden satta
Referens
bitborg/bitborg-infra!704
Läser in…
Hänvisa till i nytt ärende
Ingen beskrivning angiven.
Ta bort grenen "fix/script-guards"
Borttagning av en gren är permanent. Även om den borttagna grenen kan fortsätta existera en kort tid innan den faktiskt tas bort, kan det INTE ångras i de flesta fall. Vill du fortsätta?
What
Four script and CI guards. Each commit has a test that fails on the bad input and passes on the good one.
apply-reconcile: a delegatedchanged: [a -> b]host counts asa. Fail when the apply log has no PLAY RECAP, or the recap reports changes but no changed task line parsed. ANSI colour is stripped before matching. Newscripts/test_apply_reconcile.py, run inci.yml.bitborg-backup.sh:rclone deletegets--max-depth 1, so the restic prefix is never walked. The backup role assertsbackup_archive_prefixesis not empty before any template is written.bitborg-backup-storage.shtreats restic exit 3 as a warning, like the hot script. It skipsforget --pruneon that run and writesbitborg_backup_storage_last_run_warnings(1 on exit 3, else 0). A newBackupStorageWarningswarning alert fires on it, with a unit test. The hot script keeps its existing warning without a gauge.bitborg-backup-verify.shbitborg-backup-verify.shaborts belowbackup_drill_min_free_gbbeforeage -dand removesbundle.tarright after the extract.backup_drill_min_free_gbmoves from the backup-drill role defaults togroup_vars/all/vars.yml(same value, 25), so both roles read it.smoke-containers.py: an unresolved image is a FAIL. Only a literallocalhost/orgit.bitborg.se/prefix may skip. Caddy is smoked through a per-role override map to the stock base image. Newscripts/test_smoke_containers.py, run inci.yml.Tests for the backup scripts are in
scripts/test_backup_guards.py(renders the templates with ansible's templar and runs them against stub commands).Checks
site.yml --syntax-check: clean.NET_BIND_SERVICE(needs podman, runs in CI).Apply
Apply tags:
backup(prune flag, assert, storage and verify scripts, moved variable) andmonitoring(new alert rule). Free space on/srv/gitborg-backupwas 149 GB when checked, so the 25 GB floor stays shared with the drill. Nothing else deploys.Closes #607
Closes #608
Closes #615
Closes #618