feat(backup-drill): count keycloak realm roles and credentials #652

Sammanfogat
supernaut sammanfogade 1 incheckning från ops/keycloak-backup-drill in i main 2026-10-11 09:21:43 +00:00
Ägare

Refs #572.

The Keycloak restore drill now also counts realm roles and credentials.

  • restore-on-scratch.sh.j2 counts keycloak_role (realm roles only) and credential, logs them and emits them as metrics.
  • New metrics bitborg_backup_drill_keycloak_realm_roles and bitborg_backup_drill_keycloak_credentials.
  • The status metric needs all five counts.
  • Runbook "Keycloak restore drill" lists the two new metrics.

Staging check, by hand, because the backup role is prod-only. It used the role's pg_dump --format=custom flags, restored into a scratch DB, then dropped it. Live and restored counts matched: users 15, groups 7, clients 21, realm roles 14, credentials 14. Restore took 2 s.

Not yet proven: the scripted drill end to end with image start and /health/ready. That comes from the first prod weekly drill after cutover.

Checked: scripts/check-metric-names.py, scripts/ruff.sh, scripts/shellcheck.sh, ansible-playbook --syntax-check site.yml, pre-push hooks.

Refs #572. The Keycloak restore drill now also counts realm roles and credentials. - `restore-on-scratch.sh.j2` counts `keycloak_role` (realm roles only) and `credential`, logs them and emits them as metrics. - New metrics `bitborg_backup_drill_keycloak_realm_roles` and `bitborg_backup_drill_keycloak_credentials`. - The status metric needs all five counts. - Runbook "Keycloak restore drill" lists the two new metrics. Staging check, by hand, because the backup role is prod-only. It used the role's `pg_dump --format=custom` flags, restored into a scratch DB, then dropped it. Live and restored counts matched: users 15, groups 7, clients 21, realm roles 14, credentials 14. Restore took 2 s. Not yet proven: the scripted drill end to end with image start and `/health/ready`. That comes from the first prod weekly drill after cutover. Checked: `scripts/check-metric-names.py`, `scripts/ruff.sh`, `scripts/shellcheck.sh`, `ansible-playbook --syntax-check site.yml`, pre-push hooks.
supernaut lade till 1 incheckning 2026-10-11 09:19:26 +00:00
feat(backup-drill): count keycloak realm roles and credentials
Alla kontroller lyckades
ci / ci (pull_request) Successful in 1m41s
bc920b3797
supernaut schemalade den här ändringsförfrågan för automatisk sammanfogning när alla kontroller lyckas 2026-10-11 09:19:35 +00:00
supernaut sammanfogade incheckning cacfcab54f till main 2026-10-11 09:21:43 +00:00
supernaut tog bort grenen ops/keycloak-backup-drill 2026-10-11 09:21:43 +00:00
Logga in för att delta i denna konversation.
Inga granskare
Ingen milstolpe
Inget projekt
Inga tilldelade
1 deltagare
Notiser
Förfallodatum
Förfallodatumet är ogiltigt eller utanför gränserna. Använd formatet "åååå-mm-dd".

Inget förfallodatum satt.

Beroenden

Inga beroenden satta

Referens
bitborg/bitborg-infra!652
Ingen beskrivning angiven.