Don't panic when somebody else's version index is down - #306
Merged
Conversation
CI lost an afternoon to this: unofficial-builds.nodejs.org went away for a few hours and the alpine job died with a hyper_util panic, which reads like a bug in gg. It wasn't, and three re-runs later it still wasn't. That is the same shape as the report in #272. New fetch.rs wraps the GET: fetch_text/fetch_json hand back None instead of unwrapping, and warn with the URL and the reason. Warn is the default level, so you get the real cause without knowing to pass -v. The client also has connect and request timeouts - a host that swallows packets used to leave gg spinning forever, which is worse than the panic it replaced - and error_for_status, or a 503 holding page is just a body the scrapers quietly parse zero links out of. node, go, gradle, rat, maven and azul go through it now. prep no longer panics with "Did not find any download URL!" either; it says which tool and that the list may be unreachable, with the warning above it carrying the detail. Two places were quietly turning a dead index into good news. `update` reported "All tools are up to date!" and exit 0 when it could not read a single version list, so check_tool_update now separates "could not check" from "nothing newer". And `update -u` for all tools deleted the cache dir, dropped prep's Err on the floor and printed "Successfully updated" - the single-tool path already knew better, the all-tools path did not. Still panics past this point: a 404 asset or a truncated archive dies in bloody_indiana_jones, and about eight other fetch sites are still hand-rolled and silent. Those are for later.
eirikb
enabled auto-merge (squash)
July 29, 2026 07:58
test_fetch_text_returns_the_body_on_200 got None on windows-latest. Closing a socket while the request is still sitting unread gets you an RST there, and the response we just wrote goes out with it - so the client saw a broken connection instead of the body. The other two one_shot_server tests were green, but only because they expect None either way. That test was the only one that could notice.
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.
CI lost an afternoon to this: unofficial-builds.nodejs.org went away for a few hours and the alpine job died with a hyper_util panic, which reads like a bug in gg. It wasn't, and three re-runs later it still wasn't. That is the same shape as the report in #272.
New fetch.rs wraps the GET: fetch_text/fetch_json hand back None instead of unwrapping, and warn with the URL and the reason. Warn is the default level, so you get the real cause without knowing to pass -v. The client also has connect and request timeouts - a host that swallows packets used to leave gg spinning forever, which is worse than the panic it replaced - and error_for_status, or a 503 holding page is just a body the scrapers quietly parse zero links out of.
node, go, gradle, rat, maven and azul go through it now. prep no longer panics with "Did not find any download URL!" either; it says which tool and that the list may be unreachable, with the warning above it carrying the detail.
Two places were quietly turning a dead index into good news.
updatereported "All tools are up to date!" and exit 0 when it could not read a single version list, so check_tool_update now separates "could not check" from "nothing newer". Andupdate -ufor all tools deleted the cache dir, dropped prep's Err on the floor and printed "Successfully updated" - the single-tool path already knew better, the all-tools path did not.Still panics past this point: a 404 asset or a truncated archive dies in bloody_indiana_jones, and about eight other fetch sites are still hand-rolled and silent. Those are for later.