Repository navigation
Conversation
AGENTFLOW_SESSION_GATEWAY hands a native install's sandboxes a host.docker.internal URL, but --add-host host.docker.internal:host-gateway was only added for conversation and runner-login containers, so git credential fill in an SOP run sandbox failed with "lookup host.docker.internal ... no such host" and the MR node had to rediscover the docker bridge gateway on every run. Add the mapping to all sandboxes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
On a native Linux install (
bash scripts/dev.sh), an SOP run sandbox cannot reach the session gateway. Every sandbox receivesAGENTFLOW_SESSION_GATEWAYas ahost.docker.internalURL (conversationDockerAccesspicks that host when the platform itself is not containerized,internal/runtime/conversation_network.go), but the--add-host host.docker.internal:host-gatewaymapping was only appended for conversation and runner-login containers (ConversationRoot != "" || RunnerLoginRelay,internal/runtime/sandbox_docker.go). Linux daemons do not resolvehost.docker.internalwithout that mapping, so inside an SOP run sandbox:In practice the 发起 MR node's agent had to rediscover the docker bridge gateway on every run (read
/proc/net/route, probe the gateway port, overrideAGENTFLOW_SESSION_GATEWAYwith the bridge IP) beforegit credential fillreturnedx-access-token.Resulting behavior
docker createfor every sandbox now carries--add-host host.docker.internal:host-gateway, matching the URL a native install already advertises.git credential fillresolves the gateway directly; conversation and runner-login containers are unchanged (they already had the mapping). No engine/repository/handler boundary change and no schema or runner-protocol compatibility change.Validation
internal/runtime/docker_cases_test.go: the relay-network test previously asserted SOP sandboxes do not receive the mapping (the codified bug); it now asserts every case (SOP, SOP with private home, conversation, runner-login relay) receives it.git credential fillfailed with the DNS error above inside an SOP run sandbox; after rebuilding, credential fill resolveshost.docker.internaland returns the injected token.go vet, the chatbot build and the public browser suites (no Linux toolchain on the author machine); relying on this repository'score/browser/first-runjobs for those.