Repository navigation
fix(proxies): rewrite GOPROXY's fallback list, not just single URLs - #209
Merged
Merged
Conversation
#208 rewrote the advertised host for every URL-valued proxy var — except the one that matters most on a Go codebase. GOPROXY is not a URL, it is a fallback LIST: Go accepts elements separated by "," or "|" mixed with the literals "direct" and "off". Production emits GOPROXY=http://10.88.0.1:8082|direct and url.Parse on that whole string yields no usable authority, so the single-URL rewrite passed it through untouched. Read off mfl-mac-arm64 minutes after rolling v0.2.17: GOPROXY=http://10.88.0.1:8082|direct <- NOT rewritten RUSTUP_DIST_SERVER=http://192.168.64.1:8083/rustup <- ok GHREL_PROXY=http://192.168.64.1:8087 <- ok COMPOSER_REPO_PACKAGIST=http://192.168.64.1:8088 <- ok Three of four correct, and the log line said "cache proxies advertised to jobs on the VM-visible host address" — success by every signal except the one that counts. Go kept pointing at an unreachable address. Why the tests missed it: the fixture used a bare GOPROXY=http://host:port, an input invented rather than observed. It is now copied verbatim from the live node, with a comment not to tidy it. Also fixes the probe: EnvHostPorts parsed the whole value, so it never saw the Go proxy's address and would have advertised a host it never checked — defeating the gate's purpose. Separators and literals are preserved exactly: "a|direct", "a,direct", multiple proxies, "off", and a trailing separator all round-trip. Revert-verified: restoring the single-URL call fails both the fleet-env test and the new list table.
|
ePHPm Preview — removed Preview deployment has been torn down. |
This branch was successfully deployed
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.
#208 rewrote the advertised host for every URL-valued proxy var — except the one that matters most in a Go codebase.
GOPROXYis not a URL, it is a fallback list: Go accepts elements separated by,or|, mixed with the literalsdirectandoff. Production emitshttp://10.88.0.1:8082|direct, andurl.Parseon that whole string yields no usable authority — so the single-URL rewrite passed it straight through.Caught by reading the live node, minutes after rolling v0.2.17
Three of four correct, and the daemon logged
cache proxies advertised to jobs on the VM-visible host address host=192.168.64.1. Success by every available signal except the bytes — Go kept pointing at an address that does not exist.Why the tests missed it
The fixture was
GOPROXY=http://host:port— an input I invented rather than observed. It is now copied verbatim offmfl-mac-arm64, with a comment telling the next person not to tidy it. Same failure as the ghrel fake upstream that ignoredAccept: a test that models what you assume, not what the system emits.Also fixed: the probe was blind too
EnvHostPortsparsed the whole value, so it never saw the Go proxy's address — meaning the reachability gate would advertise a host it had never checked. That defeats the entire point of the gate.Behaviour
Separators and literals round-trip exactly:
a|direct,a,direct, multiple proxies,off,directalone, and a trailing separator.Revert-verified — restoring the single-URL call fails both the fleet-env test and the new list table. Cross-builds and vets clean for linux, darwin, windows.