Skip to content

fix(distributed): pass ExternalURI through NATS backend install - #9446

Merged
mudler merged 1 commit into
mudler:masterfrom
russell:distributed-custom-backends
Apr 20, 2026
Merged

mudler merged 1 commit into
mudler:masterfrom
russell:distributed-custom-backends

Conversation

@russell

@russell russell commented Apr 20, 2026

Copy link
Copy Markdown
Contributor

To support testing backends, i needed to support custom backends in distributed mode.

When installing a backend with a custom OCI URI in distributed mode, the URI was captured in ManagementOp.ExternalURI by the HTTP handler but never forwarded to workers. BackendInstallRequest had no URI field, so workers fell through to the gallery lookup and failed with "no backend found with name ".

Add URI/Name/Alias fields to BackendInstallRequest and thread them from ManagementOp through DistributedBackendManager.InstallBackend() and the RemoteUnloaderAdapter. On the worker side, route to InstallExternalBackend when URI is set instead of InstallBackendFromGallery. Update all remaining InstallBackend call sites (UpgradeBackend, reconciler pending-op drain, router auto-install) to pass empty strings for the new params.

Assisted-by: Claude Code:claude-sonnet-4-6

When installing a backend with a custom OCI URI in distributed mode,
the URI was captured in ManagementOp.ExternalURI by the HTTP handler
but never forwarded to workers. BackendInstallRequest had no URI field,
so workers fell through to the gallery lookup and failed with
"no backend found with name <custom-name>".

Add URI/Name/Alias fields to BackendInstallRequest and thread them from
ManagementOp through DistributedBackendManager.InstallBackend() and the
RemoteUnloaderAdapter. On the worker side, route to InstallExternalBackend
when URI is set instead of InstallBackendFromGallery. Update all
remaining InstallBackend call sites (UpgradeBackend, reconciler
pending-op drain, router auto-install) to pass empty strings for the
new params.

Assisted-by: Claude Code:claude-sonnet-4-6
Signed-off-by: Russell Sim <rsl@simopolis.xyz>
@russell
russell force-pushed the distributed-custom-backends branch from 8e52afc to c1b2703 Compare April 20, 2026 17:01
@mudler

mudler commented Apr 20, 2026

Copy link
Copy Markdown
Owner

we should really start to consolidate the code on the worker for installing backends with standalone mode, but I would not block this PR as it fixes the issue at hand.

@mudler
mudler merged commit 02bb715 into mudler:master Apr 20, 2026
1 check passed
mudler added a commit that referenced this pull request Apr 21, 2026
…arams (#9467)

Commit 02bb715 (#9446) added uri, name, alias parameters to
RemoteUnloaderAdapter.InstallBackend but missed the e2e test call
sites, breaking the distributed test build. Pass empty strings to
match the pattern used by the other non-URI call sites.

Assisted-by: Claude Code:claude-opus-4-7

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants