diff --git a/CHANGELOG.md b/CHANGELOG.md index 23e9a0f..006a888 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,30 @@ ## Changelog +### v0.62.0 — M18 + M19 backlog fixes (2026-06-14) + +Two verified-LIVE backlog bugs (preserved fix-plans in `felhom.eu/documentation/backlog/`), implemented +trunk-based on `main`, each with a regression test that fails on the pre-fix code. Built, deployed to demo +guest 9201, and both verified live. + +- **M19 — `deriveStackName` DB-container misattribution (correctness)** — commit `6bab68b`. + `deriveStackName` pure-suffix-stripped on `-` (postgres/db/mariadb/mysql/database/redis/cache), so a + stack whose slug *ends* in a role token (e.g. `my-cache`) was misattributed (stripped to `my`), filing + its DB dump under the wrong/nonexistent stack. Now threads the set of deployed stack names + (`m.knownStackNames()` ← `ListDeployedStacks`) into `DiscoverDatabases` and cross-references: use the + suffix-strip candidate if it's a known stack, else the container name if it IS a known stack (don't + strip), else the longest known stack that is a `-`/`_`-bounded prefix (handles `_postgres`, + `-1`), else the legacy strip. `nil`/empty known = legacy behaviour (appexport passes nil). + **Live:** romm-db → `romm-mariadb.sql` (correct). Table test incl. the `my-cache` case (fails pre-fix). +- **M18 — DB-dump validation re-run every cycle (performance)** — commit `f8afe5c`. + `ListDumpFiles` ran `ValidateDump` (line-by-line scan) for every dump on every ~5-min `RefreshCache` + cycle — wasted I/O+CPU on large customer dumps. `ListDumpFiles` now takes an optional + `cached(name,size,mod)` lookup; on a size+modtime match it reuses the prior result and skips + `ValidateDump`. `settings.DBValidationCache` gains `Size`+`ModTime`; `listAllDumpFiles` builds the + lookup from the persisted cache and writes back only fresh validations (cache miss) — so an unchanged + dump triggers neither a re-validation nor a `settings.json` write each cycle. `nil` cached = legacy + validate-always (back-compat). **Live:** the cache now persists `size`+`mod_time`. Tests: cache-hit + skips validate (sentinel), cache-miss validates, nil validates. + ### v0.61.0 — live-drive Batch 1 (+F17) fixes (2026-06-14) Controller-side fixes triaged in `LIVE-DRIVE-FIXSPEC-2026-06-14.md` from the 2026-06-14 live-drive diff --git a/controller/README.md b/controller/README.md index 371dfd8..7ea96ad 100644 --- a/controller/README.md +++ b/controller/README.md @@ -113,7 +113,7 @@ backups, monitoring and notifications. All Proxmox/disk operations are delegated | **Infra** | `internal/infra/` | Pure renderers (embedded `text/template`) for the base-infra stacks (traefik/cloudflared/filebrowser); **pinned image tags as the single source of truth** (web filebrowser sync delegates here) | | **Crypto** | `internal/crypto/` | AES-256-GCM encryption for sensitive app.yaml values (passwords, secrets), key management | | **Sync** | `internal/sync/` | Git-based app catalog sync (clone/pull, content-hash copy) | -| **AppBackup** | `internal/appbackup/` | Self-contained app-data backup primitives: DB dump discovery/execution (`DiscoverDatabases`, `DumpOne`), Docker-volume/app-data discovery (`StackDataProvider`, `DiscoverAppData`), keep-side path helpers (`AppDBDumpPath`, `AppVolumeDumpPath`, `AppDataDir`). No dependency on restic/cross-drive/drive-mount. Imported directly by `appexport` and `storage`. | +| **AppBackup** | `internal/appbackup/` | Self-contained app-data backup primitives: DB dump discovery/execution (`DiscoverDatabases`, `DumpOne`), Docker-volume/app-data discovery (`StackDataProvider`, `DiscoverAppData`), keep-side path helpers (`AppDBDumpPath`, `AppVolumeDumpPath`, `AppDataDir`). `DiscoverDatabases` takes the deployed-stack set so a DB container maps to the right stack even when a slug ends in a DB-role token (M19, v0.62.0). `ListDumpFiles` takes an optional `cached(name,size,mod)` lookup so an unchanged dump isn't re-validated (line-scan) every ~5-min cycle (M18, v0.62.0). No dependency on restic/cross-drive/drive-mount. Imported directly by `appexport` and `storage`. | | **Backup** | `internal/backup/` | Per-drive 3-layer backup: DB dumps → restic snapshots → cross-drive copies, restore. Re-exposes the `appbackup` primitives via aliases/forwarders (`appbackup_bridge.go`) for the disk/host-side code and the web/api/report consumers. | | **Storage** | `internal/storage/` | Disk scanning (`lsblk`), partitioning (`sfdisk`), formatting (`mkfs.ext4`), mounting, data migration (`rsync`) | | **System** | `internal/system/` | System info (`/proc`), CPU collector, mount points, disk usage, FS info |