CocoaPods / cocoapods-downloader

A small library that provides downloaders for various source types (HTTP/SVN/Git/Mercurial)
MIT License
84 stars 72 forks source link

Added retry for timeouts when cloning a git repo. #44

Closed dapacheco closed 5 years ago

dapacheco commented 9 years ago

Given the current DDOS issues with github, 'pod install' command was failing due to timeouts. Added retry to mitigate against this.

orta commented 9 years ago

This is definitely something I've wanted before. Without Travis CI caching we've had a bunch of problems around this, especially when trying to do a big pod install.

To precede someone else asking, @dapacheco can you add a changelog entry please

segiddins commented 9 years ago

The retry logic probably belongs in the base downloader, as it's something we'd want to do for all downloaders. Additionally, there are probably some other errors that we'd like to retry after. Take a look at what Bundler does, and see what other logic we might want to port over.

dapacheco commented 9 years ago

@segiddins Agreed that it would make sense for this to be more generic and that it should handle a range of errors. This initial fix was limited to resolving the current issues I've been experiencing with github, but I'll look at making it more generic.

dapacheco commented 9 years ago

@segiddins I've moved the logic into base class. Having had a quick look at the Bundler code, if I'm reading it correctly, it seems to retry after any error. I had limited the retries to a timeout error but could remove this restriction.

dnkoutso commented 5 years ago

Closing as outdated (4+ year old PR)