[D] Use a fallback bootstrap script provider if dlang.org is offline#910
Conversation
|
Thank you for the thorough investigation. |
|
@wilzbach who has the rights to approve this? |
|
Maybe I'm reading this wrong, but the current max timeout is not 45s, is it? It is running the I don't know the real cause of these problems, but I don't know if this change is going to add much benefit.
The real fix should come from dlang.org. Or, store a copy of D lang install script locally, and fall back to it instead. |
2f5ec6f to
8e02792
Compare
Sorry I was referring to the overall time.
To be honest me neither - it was the simplest thing that come to my mind.
Yeah I absolutely get your point, my hope was that within in a longer sleeping loop or timeout period dlang.org might be reachable again.
Unfortunately that's not within my reach ;/
That's a good idea! The script is hosted at GitHub and as their service tends to be reliable, why not use that directly as fallback? |
|
Nope! We're not going to use some random master development version of a script for all Travis-CI D users. That opens the door for potential outages and is a giant security risk. For now I'd propose we use https://nightlies.dlang.org/install.sh as fallback if https://dlang.org/install.sh fails.
No it wouldn't really help.
Yes, it does help for certain transient network issues, and exponential backoff is a common retry pattern for transient faults. |
|
Did that as a PR for your PR @wilzbach ;), wilzbach#1. |
add fallback mirror for more reliable downloads
We could have linked to the If you are worried about security, we could consider signing the
That would be quite nice. GitHub has an awesome reliability and free traffic :)
Thanks a lot! |
I do already sign all releases of the installer script. |
Releases of the installer script are independent of compiler releases, so that won't work.
It's quite high profile access tokens that might be visible in testing environments, so we should have a solid understanding of how the script could be manipulated. Relying on a github workflow to not slip any security issue opens a can of worms. |
|
There is no need for squashing, unless you want to. The commit history looks fine to me. I'll deploy to https://staging.travis-ci.org tomorrow (2016-12-13) at 14:00 UTC. |
[D] Use GitHub as fallback bootstrap script provider if dlang.org is offline
|
deployed to .org staging |
Thanks a lot - it seems to work quite well :) |
Anything else we can do to help to move this forward? |
We sometimes see timeouts in D installation that are due to connection issues to
dlang.org, which is queried to receive the newest installation script, e.g. https://travis-ci.org/dlang/dmd/jobs/177747612, https://travis-ci.org/dlang/dmd/jobs/177747323, https://travis-ci.org/dlang/dmd/jobs/169949568This PR increases the timeout from ~45s to 9.68 min
(2^9-1 +10 * 7) / 60(similar to the 10 minutes default timeout for stalled builds), which hopefully might help in some cases.However we should think about mitigating the connection issues in the first place, by e.g. using a CDN or a more stable location for the installation script.
@ Travis CI maintainers: do you maybe have same experience or advise on this problem?
CC @MartinNowak @klickverbot