Detect temporary download errors and retry later


One issue I find a lot is that upstream repositories of dependencies are sometimes temporarily unavailable.

This breaks builds and makes your project look unstable when in fact a simply retry a short while later would have solved it.

I expect a few regex of the most common download failed error messages from pip, wget, curl, apt, maven, sbt, gradle etc would fix 95% of these occurrences by just rescheduling the build to try again after a short while. If a handful of retries later over the next few hours don’t resolve it then fine leave it marked as failed.

Right now having to go to Travis to investigate these build failures and manually click retry to get it to pass is not something humans should really have to be dealing with, these are the sorts of things programming is invented to automate.

Currently this leaves public projects in Error or Failed state until somebody notices and goes and investigates, then click retry. I use daily cron jobs too which might succeed the next time (or they may fail again with a temporary download error or “server too busy, try again later” from an apache mirror or something), but even if the next daily cron worked, do you really want to leave you public projects with visibly broken CI builds for a day that makes the project look unstable?


Hey hey @HariSekhon! This is a great discussion of the issue with third party dependencies… it’s a tricky problem. We’re working on some improvements this summer/fall actually, so we may have some news to share. In the meantime, you might wanna try travis_retry before your mvn install/wget/etc commands (or other request for upstream dependencies) as at least Travis CI will try in-build to download things 3 times (or if there’s a successful download)


Thanks, I’ll try that!