LocalAI/core/cli
Ettore Di Giacinto 1f43762655 fix(distributed): detect backend upgrades across worker nodes
Before this change `DistributedBackendManager.CheckUpgrades` delegated to the
local manager, which read backends from the frontend filesystem. In
distributed deployments the frontend has no backends installed locally —
they live on workers — so the upgrade-detection loop never ran and the UI
silently never surfaced upgrades even when the gallery advertised newer
versions or digests.

Worker-side: NATS backend.list reply now carries Version, URI and Digest
for each installed backend (read from metadata.json).

Frontend-side: DistributedBackendManager.ListBackends aggregates per-node
refs (name, status, version, digest) instead of deduping, and CheckUpgrades
feeds that aggregation into gallery.CheckUpgradesAgainst — a new entrypoint
factored out of CheckBackendUpgrades so both paths share the same core
logic.

Cluster drift policy: when per-node version/digest tuples disagree, the
backend is flagged upgradeable regardless of whether any single node
matches the gallery, and UpgradeInfo.NodeDrift enumerates the outliers so
operators can see *why* it is out of sync. The next upgrade-all realigns
the cluster.

Tests cover: drift detection, unanimous-match (no upgrade), and the
empty-installed-version path that the old distributed code silently
missed.
2026-04-19 08:03:20 +00:00
..
context feat: Merge repeated log lines in the terminal (#9141) 2026-03-26 22:16:13 +01:00
worker feat(mlx-distributed): add new MLX-distributed backend (#8801) 2026-03-09 17:29:32 +01:00
workerregistry feat: add distributed mode (#9124) 2026-03-30 00:47:27 +02:00
agent.go feat: add distributed mode (#9124) 2026-03-30 00:47:27 +02:00
agent_test.go feat: add node reconciler, allow to schedule to group of nodes, min/max autoscaler (#9186) 2026-03-31 08:28:56 +02:00
agent_worker.go feat: add distributed mode (#9124) 2026-03-30 00:47:27 +02:00
backends.go feat: backend versioning, upgrade detection and auto-upgrade (#9315) 2026-04-11 22:31:15 +02:00
cli.go feat: add distributed mode (#9124) 2026-03-30 00:47:27 +02:00
cli_suite_test.go feat: add node reconciler, allow to schedule to group of nodes, min/max autoscaler (#9186) 2026-03-31 08:28:56 +02:00
completion.go feat: add distributed mode (#9124) 2026-03-30 00:47:27 +02:00
completion_test.go feat: add node reconciler, allow to schedule to group of nodes, min/max autoscaler (#9186) 2026-03-31 08:28:56 +02:00
deprecations.go chore: Standardize CLI flag naming to kebab-case (M12) (#8912) 2026-03-09 22:15:39 +01:00
explorer.go chore(refactor): move logging to common package based on slog (#7668) 2025-12-21 19:33:13 +01:00
federated.go chore: Standardize CLI flag naming to kebab-case (M12) (#8912) 2026-03-09 22:15:39 +01:00
models.go feat: add distributed mode (#9124) 2026-03-30 00:47:27 +02:00
run.go feat(ux): backend management enhancement (#9325) 2026-04-12 00:35:22 +02:00
soundgeneration.go fix: Remove debug print statement from soundgeneration.go (C2) (#8843) 2026-03-08 08:49:29 +01:00
transcript.go feat: add distributed mode (#9124) 2026-03-30 00:47:27 +02:00
tts.go chore(refactor): move logging to common package based on slog (#7668) 2025-12-21 19:33:13 +01:00
util.go chore: Standardize CLI flag naming to kebab-case (M12) (#8912) 2026-03-09 22:15:39 +01:00
worker.go fix(distributed): detect backend upgrades across worker nodes 2026-04-19 08:03:20 +00:00
worker_addr_test.go feat: add node reconciler, allow to schedule to group of nodes, min/max autoscaler (#9186) 2026-03-31 08:28:56 +02:00