config + store: remove dead knobs and stale schema
Three drift items surfaced in review, each dead on arrival and each worth trusting a little more at v0.1.0. config: drop MetricsPollInterval. The field was parsed from TOML (metrics_poll_interval), stored on DaemonConfig, and ignored by every consumer — only StatsPollInterval drives the background poll loop. Users setting it in config.toml saw zero effect. Removed from the TOML surface, the model constant, and the config test. daemon: delete ensureDefaultImage. No callers, body was `_ = ctx; return nil`. Dead since whatever flow used to call it got removed. store: drop packages_path from the images table. The column was carried by the baseline migration but never referenced by UpsertImage (no INSERT / UPDATE mention) or any Go model field — a ghost from a build pipeline that no longer exists. Added migration id=2 (drop_dead_image_columns) with an idempotent dropColumnIfExists helper: fresh installs run baseline (creates the column) + 2 (drops it); legacy DBs where the column was never added get a no-op. Updated the direct-INSERT SQL in TestGetImageRejectsMalformedTimestamp to drop the column reference, and added a migration test covering both install paths (fresh + legacy). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
2a7f55f028
commit
129475be20
7 changed files with 159 additions and 56 deletions
|
|
@ -517,11 +517,6 @@ func (d *Daemon) backgroundLoop() {
|
|||
}
|
||||
}
|
||||
|
||||
func (d *Daemon) ensureDefaultImage(ctx context.Context) error {
|
||||
_ = ctx
|
||||
return nil
|
||||
}
|
||||
|
||||
func (d *Daemon) reconcile(ctx context.Context) error {
|
||||
op := d.beginOperation("daemon.reconcile")
|
||||
vms, err := d.store.ListVMs(ctx)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue