Repository navigation
Conversation
The page fetch used Node's fetch, which ignores HTTPS_PROXY and NO_PROXY unless NODE_USE_ENV_PROXY is set when Node starts. The installer and update downloads use @actions/http-client, which follows these settings. So behind a proxy, the downloads worked, the page fetch failed, and the action installed SQL Server without the cumulative update. Fetch the page with @actions/http-client again. Its readBody() never settles when the connection closes before the end of the body, so read the response stream instead, which then fails, and limit the body to 30 seconds. Retry every failure. When a proxy applies, say so in the log, and say in the failure reason how to fetch the page directly with NO_PROXY. Name the proxy by its host only when its URL has no credentials. Microsoft has refused @actions/http-client requests for these pages before. It sent HTTP 403 for every request from GitHub runners, but it accepted Node's fetch from the same runners. So when the page request gets a 403 and no proxy applies, try the page once with Node's fetch in the same attempt. The README describes the proxy settings. Tests fetch a page through a real local proxy, also when the connection closes early, and a test checks that only the update pages use www.microsoft.com, as the README says. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
The cumulative update page fetch used Node's
fetch, which ignoresHTTPS_PROXYandNO_PROXYunlessNODE_USE_ENV_PROXYis set when Node starts. The installer and update downloads use@actions/http-client, which follows these settings. Behind a proxy, the downloads worked, the page fetch failed, and the action installed SQL Server without the cumulative update, with only a warning.@actions/http-clientagain, like the downloads. When a proxy applies, the action says so in the log. It names the proxy host only when the proxy URL has no credentials. If the page still can't be fetched, the error says how to fetch it directly withNO_PROXY. A new README section describes this: setNO_PROXY: www.microsoft.comon the setup-sqlserver step. Only the update pages use that host, so the downloads still go through the proxy, and a test checks that only the update pages use it.HttpClientResponse.readBody()in@actions/http-client4.0.1 never settles when the connection closes or stalls before the end of the body, so the step would exit with code 0 without installing SQL Server. The action reads the response stream instead, which then fails, and limits the body to 30 seconds. The failure then goes to the normal retry and warning.fetchin fix: fetch cumulative update pages with native fetch to avoid 403s #258, because Microsoft refused every@actions/http-clientrequest for these pages from GitHub runners with a 403 for some days in July, while it acceptedfetch. That block is gone: a probe fromwindows-2022andwindows-2025runners on 21 November got a 200 from@actions/http-client4.0.1 on all four update pages. In case it comes back, when the page request gets a 403 and no proxy applies, the action tries the page once withfetchin the same attempt. It doesn't tryfetchthrough a proxy, becausefetchdoesn't use it.@actions/http-client, with responses that are real streams. A new test file fetches pages through a real CONNECT proxy on the loopback address, with no mocked HTTP. It covers a successful fetch, anhttps://page throughHTTPS_PROXY, a 407 from the proxy with itsNO_PROXYhint, and a connection that closes before the end of the page.I considered keeping
fetchand passing it the proxy dispatcher from@actions/http-client. That mixes undici 6 with the undici 7 that is built into Node 24, and it breaks on Node 26, which bundles undici 8. This PR uses one HTTP client for the page and the downloads instead.Part of #331. The cache key item follows in a separate PR.
🤖 Generated with Claude Code