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
|
|
@ -50,7 +50,6 @@ ssh_key_path = "/tmp/custom-key"
|
|||
default_image_name = "void"
|
||||
auto_stop_stale_after = "1h"
|
||||
stats_poll_interval = "15s"
|
||||
metrics_poll_interval = "30s"
|
||||
bridge_name = "br-test"
|
||||
bridge_ip = "10.0.0.1"
|
||||
cidr = "25"
|
||||
|
|
@ -84,9 +83,6 @@ default_dns = "9.9.9.9"
|
|||
if cfg.StatsPollInterval != 15*time.Second {
|
||||
t.Fatalf("StatsPollInterval = %s", cfg.StatsPollInterval)
|
||||
}
|
||||
if cfg.MetricsPollInterval != 30*time.Second {
|
||||
t.Fatalf("MetricsPollInterval = %s", cfg.MetricsPollInterval)
|
||||
}
|
||||
if cfg.BridgeName != "br-test" || cfg.BridgeIP != "10.0.0.1" || cfg.CIDR != "25" {
|
||||
t.Fatalf("bridge config = %+v", cfg)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue