Print download error details when using concurrency#21818
Merged
Conversation
8cd5c79 to
6e811da
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Improves the usefulness of fetch/download failures when Homebrew’s download concurrency queue is enabled by preserving relevant underlying error details (e.g., curl stderr) in the surfaced exception message.
Changes:
- Extend
CurlDownloadStrategyErrorto carry additional error “details” appended to the user-facing message. - Capture
ErrorDuringExecutionstderr inCurlDownloadStrategy#fetchand include it in the raisedCurlDownloadStrategyError. - Include explicit details for specific failure paths (e.g., insecure redirect detection, Apache mirror JSON parse failure).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
Library/Homebrew/exceptions.rb |
Modifies CurlDownloadStrategyError message construction to append error details. |
Library/Homebrew/download_strategy.rb |
Propagates underlying stderr into CurlDownloadStrategyError to improve concurrent download failure output. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
6e811da to
8177ecd
Compare
8177ecd to
a5ac7d1
Compare
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.
Right now, download errors have very limited usefulness when concurrency is enabled (the default):
The behaviour without the queue was much more useful:
So let's fix up the concurrent version to display things like this: