A binding answered on this very node still carries an address
Two sibling branches resolve a provision answered by the consumer's own machine. The one for a node-scoped provider falls back to loopback when the machine is on no private network, with a comment saying why and a test holding it. The one for a mesh-scoped provider passed node.At straight through, and nothing noticed because nothing had yet composed a host out of it. The mesh's own artifact store is mesh-scoped and sits on the same machine as the builder that pushes to it. Give the builder the address from its binding and it gets MESH_REGISTRY=:5000 — a name with no host, written into its environment without complaint. It surfaces much later as ":5000/mesh-tools/build" is not a valid repository/tag which is a message about a tag for a fault in how a binding was resolved, on a machine several steps from the decision. A machine off the private network still reaches itself, which is what the neighbouring branch already said. The test fails without the fix, showing the empty address rather than only the symptom. Claude-Session: https://claude.ai/code/session_01D6qtiYU3P9jk3pnAXyAFyx
This commit is contained in:
@@ -287,8 +287,19 @@ func Resolve(catalogue map[string]Manifest, assigned []string, node Node, world
|
||||
if satisfied[want] && !isModule(catalogue, want) {
|
||||
if brokered[want] {
|
||||
// Answered here, and still a need: the provider is this node.
|
||||
//
|
||||
// **The same loopback fallback as the branch below, and it was missing here.** A
|
||||
// machine with no private network has no `at`, and this branch passed that through
|
||||
// — so a consumer whose file says `${bound:<provision>:at}:${bound:...:port}` was
|
||||
// handed `:5000`, a name with no host, written into its environment without
|
||||
// complaint. The sibling case a few lines down had the fallback and the reasoning
|
||||
// for it; only this one did not. A machine off the network still reaches itself.
|
||||
at := node.At
|
||||
if at == "" {
|
||||
at = "127.0.0.1"
|
||||
}
|
||||
needs = append(needs, Needed{
|
||||
Name: want, From: node.Name, At: node.At,
|
||||
Name: want, From: node.Name, At: at,
|
||||
Serves: servedHere(catalogue, chosen, want), For: because[want]})
|
||||
} else if served := servedHere(catalogue, chosen, want); len(served) > 0 {
|
||||
// Answered here with no credential to mint, but the provider serves facts the
|
||||
|
||||
Reference in New Issue
Block a user