autonomic-bot 270c8404ce
All checks were successful
cc-ci/testme cc-ci: success
fix: make restore correct under a live app (CI restore + custom tiers)
Three independent bugs made `abra app restore` leave the stack broken:

1. ClickHouse: schema_migrations is a TinyLog table and clickhouse-backup
   can only FREEZE MergeTree data - it backed up the table schema but
   not its rows, so a restore emptied the migration ledger. The next app
   boot re-ran every IngestRepo migration against the fully-built tables
   and crash-looped (DUPLICATE_COLUMN: utm_medium) - the post-restore 502
   in CI build 237. Fix: export the ledger to TSV into the backup dir
   (rides in the snapshotted backup/events path) in the backup pre-hook,
   reload it in the restore post-hook.

2. App restart policy: condition was on-failure, but when postgres is
   disrupted under the app the BEAM supervision tree escalates and Erlang
   exits GRACEFULLY (status 0) - swarm marks the task Complete and never
   restarts it (reproduced: app stranded at 0/1). Fix: condition any.

3. pg_restore: --clean without --if-exists exits 1 when a dropped object
   is absent ("errors ignored"), killing the && chain and leaving the
   dump behind. Fix: --if-exists, plus pg_terminate_backend afterwards so
   the app pooled connections reconnect against the recreated objects.

Validated on a dev deploy: marker + truncated ClickHouse events both
return on restore, migration ledger intact (17 rows), post-restore event
ingestion for a new site works, and an app reboot after restore migrates
cleanly. Known cosmetic caveat: until the app is restarted, its Postgrex
type cache holds stale OIDs and background Oban jobs log "cache lookup
failed for type" - ingestion and serving are unaffected; an operator
restart after a restore clears it.
2026-06-09 23:01:24 +00:00
2023-11-09 20:35:00 +00:00
2025-01-08 10:09:13 -08:00
2023-08-11 12:15:23 +02:00
2021-09-28 00:55:27 +02:00
2021-09-28 00:55:27 +02:00
2026-06-09 15:46:28 +00:00

plausible

Status: Work in progress

  • Category: Apps
  • Status: 1, alpha
  • Image: plausible/analytics, 4, upstream
  • Healthcheck:
  • Backups: Yes
  • Email: No
  • Tests:
  • SSO: No

Basic usage

  1. Set up Docker Swarm and abra
  2. Deploy coop-cloud/traefik
  3. abra app new ${REPO_NAME} --secrets (optionally with --pass if you'd like to save secrets in pass)
  4. abra app config YOURAPPDOMAIN - be sure to change $DOMAIN to something that resolves to your Docker swarm box
  5. abra app deploy YOURAPPDOMAIN
  6. Open the configured domain in your browser to finish set-up
Description
cc-ci private mirror of coop-cloud/plausible (recipe CI)
Readme 87 KiB
Languages
Shell 85.3%
Roff 14.7%