mirror of
https://github.com/mudler/LocalAI
synced 2026-04-21 13:27:21 +00:00
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. |
||
|---|---|---|
| .. | ||
| context | ||
| worker | ||
| workerregistry | ||
| agent.go | ||
| agent_test.go | ||
| agent_worker.go | ||
| backends.go | ||
| cli.go | ||
| cli_suite_test.go | ||
| completion.go | ||
| completion_test.go | ||
| deprecations.go | ||
| explorer.go | ||
| federated.go | ||
| models.go | ||
| run.go | ||
| soundgeneration.go | ||
| transcript.go | ||
| tts.go | ||
| util.go | ||
| worker.go | ||
| worker_addr_test.go | ||