feat: compose-stack model + backup failure exposure (PR A) #9

Merged
james merged 1 commit from feat/stack-model-and-failures into main 2026-07-28 16:17:18 +00:00
Owner

Backend foundation (PR A of 2) for reorganizing the dashboard and View Backups around compose stacks, plus the new failure visibility feature.

What's here (backend only — no UI yet)

  • Container#stack — derives the compose stack: baktainer.stack label → com.docker.compose.project → backup name. Reported per container in the node snapshot, so main can group by stack.
  • backup_history.stack column (guarded migration), threaded end to end (start_backup → complete/fail record → node event → main ingest). Historical rows keep their stack even if the container is later removed.
  • Failure exposure — failures already record error; added recent_failures + GET /api/backups/failures so the dashboard can surface why a backup failed.

Why grouping-by-container-in-stack is enough

Each db and each volume is already its own container (authentik, authentik-redis, authentik-volumes-volumes, …), so one ✓/✗ per container in a stack == per-db/per-volume — no invasive artifact-granular recording needed.

Next (PR B)

Dashboard: one row per stack, engine icons, ✓/✗ per container, failure button/modal (reads this endpoint); and the file-based per-stack View Backups.

Full suite green — 1125 examples. (Also fixed a few test doubles missing the new :stack message; one crashed a worker thread and hung the integration workflow.)

🤖 Generated with Claude Code

Backend foundation (PR A of 2) for reorganizing the dashboard and View Backups around **compose stacks**, plus the new **failure visibility** feature. ## What's here (backend only — no UI yet) - **`Container#stack`** — derives the compose stack: `baktainer.stack` label → `com.docker.compose.project` → backup name. Reported per container in the node snapshot, so main can group by stack. - **`backup_history.stack`** column (guarded migration), threaded end to end (start_backup → complete/fail record → node event → main ingest). Historical rows keep their stack even if the container is later removed. - **Failure exposure** — failures already record `error`; added `recent_failures` + **`GET /api/backups/failures`** so the dashboard can surface *why* a backup failed. ## Why grouping-by-container-in-stack is enough Each db and each volume is already its own container (`authentik`, `authentik-redis`, `authentik-volumes-volumes`, …), so one ✓/✗ per container in a stack == per-db/per-volume — no invasive artifact-granular recording needed. ## Next (PR B) Dashboard: one row per stack, engine **icons**, ✓/✗ per container, failure **button/modal** (reads this endpoint); and the file-based per-stack **View Backups**. Full suite green — **1125 examples**. (Also fixed a few test doubles missing the new `:stack` message; one crashed a worker thread and hung the integration workflow.) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
feat(cluster): PR A — compose-stack model + backup failure exposure
All checks were successful
Build, Push & Deploy / build-and-push (pull_request) Has been skipped
Build, Push & Deploy / deploy (Media) (pull_request) Has been skipped
Build, Push & Deploy / deploy (citadel) (pull_request) Has been skipped
Build, Push & Deploy / test (pull_request) Successful in 1m3s
92eb4e87e6
Backend foundation for the stack-oriented dashboard/View Backups rework.

- Container#stack: baktainer.stack label -> com.docker.compose.project -> backup
  name. Reported per container in the node snapshot.
- backup_history gains a `stack` column (guarded migration); threaded through
  start_backup(stack:) -> complete/fail records -> the reporter event -> main
  ingest -> record_backup. row_to_backup now returns stack/node_id/node_name.
- Failure exposure: failures already store `error`; add
  BackupHistoryRepository#recent_failures + GET /api/backups/failures for the
  dashboard's failure view.

No behavior change to backups themselves. Full suite green (1125 examples).
(Fixed test doubles missing the new :stack message — one caused a worker-thread
crash that hung the integration backup workflow.)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
james merged commit 918a96d172 into main 2026-07-28 16:17:18 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
james/baktainer!9
No description provided.