-
-
Notifications
You must be signed in to change notification settings - Fork 10.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tracking Issue: Concurrent Downloads #18278
Comments
Thanks for the write-up @reitermarkus! Makes sense to me. Please focus on getting #17756 merged ASAP.
We can't/won't do this. Things as basic as "download a release from a private GitHub repository" require this. Instead we should expect to provide suboptimal/poor/no progress reporting, graceful cancellation for these strategies. |
Thoughts so far:
|
If it's that basic, we should support it using an official download strategy. In any case, we don't want to maintain two different types of download strategies. |
@reitermarkus We historically supported many more types of download strategies that we didn't use e.g. those for private resources. Problem is: when we don't actually use and rely on them ourselves, they end up bitrotting. In general: even if we were to support them: I'd rather not break an existing, public (implicit or not) API for people for new functionality if we can just degrade to not support that functionality there instead. |
This will probably be easier to discuss with a demonstration of what exactly needs changing in download strategies that would be a breaking change. |
Worth noting that download strategies already need to support Ctrl+C |
Thanks for updates @reitermarkus. Have made some edits but feel free to discuss any down here. |
We don't need |
Yeh, that makes sense. Wondering if we'll want to have a |
I think not specifying |
Yup, I guess it just seems like a nicer interface than requiring users to figure out and specify a sensible number here before its default. Not a blocker or anything, just a nice-to-have. |
Concurrent Downloads
Implement MVP of concurrent downloads for
brew fetch
.Implemented in Implement concurrent downloads in
brew fetch
. #17756.Improve output logic.
For simplicity, the output currently only uses at most terminal height - 1 lines due to a trailing newline.Implemented in Use full terminal height for concurrent output. #19194.
Handle custom download strategies.
These may not be possible to run concurrently so let's handle them differently.
Implement graceful cancellation of downloads.
Currently, cancelling downloads can only be done by killing the whole thread pool, i.e. the sledgehammer approach. Proper cancellation based on https://ruby-concurrency.github.io/concurrent-ruby/master/Concurrent/Cancellation.html should be implemented, making it possible to neatly show successful, failed and cancelled downloads.
Replace direct
puts
output with different output formatters for serial/concurrent download output.Implement concurrent downloads for
brew install
,brew reinstall
,brew upgrade
etc. with a--concurrency
flag.Implement global concurrent downloads with a public/documented/supported
HOMEBREW_DOWNLOADS_CONCURRENCY=<int>
opt-in variable.Limit concurrent connections per host to avoid overloading smaller (i.e. non-CDN) web servers.
Enable concurrent downloads by default, i.e. change default value for
--concurrency
flag.The text was updated successfully, but these errors were encountered: