pr-pull: fix to fetch extra-large bottles#7343
pr-pull: fix to fetch extra-large bottles#7343jonchang merged 1 commit intoHomebrew:masterfrom jonchang:pr-pull-jumbo-bottles
Conversation
MikeMcQuaid
left a comment
There was a problem hiding this comment.
Approving to unblock you once you're online. I trust you to fiddle with this given my comment. If it merges as-is because you can't find an alternative: no big deal, just give me a shout and I'll see what I can do.
We'd need to override I feel safer moving the class to I've changed this to instead pass an argument to |
|
Thanks for the review! Our bottles will fly more comfortably now. |
brew stylewith your changes locally?brew testswith your changes locally?This pull request fixes the issue seen in Homebrew/homebrew-core#52984 and other homebrew-core pull requests, where the bottle downloads are too large to be downloaded without timing out.
When retrieving artifacts from GitHub Actions, the artifact download requires an authorization token that is only valid for 1 minute, meaning the download must start within 60 seconds of retrieving that token.
However, the current two-step download strategy, which downloads a single byte to see if the server supports a range request, then resuming the download, means that large bottles often time out before the second request can occur.
This pull request adds a new download strategy,
CurlNoResumeDownloadStrategy, which doesn't check if the server supports download continuations, and merely redownloads from scratch if needed. I've confirmed with local tests that if the entire file has been downloaded successfully, curl doesn't re-download the file.