In ci.eclipse.org/wildwebdeveloper, we've started to see very frequent java.net.UnknownHostException: raw.githubusercontent.com for build steps that have been always successful for a while. Anything we can do here?
I just found that raw.githubusercontent.com has a rate limit of about 5000 requests/hour/IP (https://github.com/github/docs/issues/8031#issuecomment-881427112). I know that java.net.UnknownHostException: raw.githubusercontent.com seems unrelated, but maybe we are getting the wrong exception for this cause? I mention that because a DNS resolution issue on EF's infra side would manifest on many domains and for a longer period of time. Here, we see the issue for raw.githubusercontent.com and only from time to time...
If the rate limit is the issue and as all Jenkins instances retrieve artifacts from raw.githubusercontent.com from the same public IP address, so there is not much we can do from the EF infra side unfortunately.
Does it mean, if we move all of the platform projects to github (https://bugs.eclipse.org/bugs/show_bug.cgi?id=577322), jenkins builds will be like a Russian roulette (which is what we see now with SDK builds)?
Some of my Oomph builds builds have been failing with this problem a few times last week and again last night. This seems like a new problem that started happening first last week...
One option is to avoid using raw.githubusercontent.com and get the file content from an authenticated API call. Authenticated API calls are still rate limited. However, as all projects have their own bot, each one can use its own bot's credentials and the rate limit will thus be specific to their project and won't depend on others anymore.
See below an example (note that $BOT and $BOTTOKEN would need to be injected via withCredentials Jenkins directive. If you don't know what this means, we can help).
$ curl -sSL -u $BOT:$BOTTOKEN \ -H "Accept: application/vnd.github.v3+json" \ https://api.github.com/repos/eclipse/xtext-lib/contents/gradle/versions.gradle | jq -r '.content' | base64 -d/* * Base project version and versions of common dependencies. */version = '2.26.0-SNAPSHOT'ext.versions = [ 'xtext_bootstrap': '2.26.0.M3', 'xtext_gradle_plugin': '3.0.1', 'gwt': '2.8.2']
It's most probably due to the fact that more and more projects are moving to Github ( Eclipse Platform et al.) and using raw.githubusercontent.com to fetch some artifacts from there.
Frederic Gurrchanged title from Frequest "java.net.UnknownHostException: raw.githubusercontent.com" on Wild Web Developer CI to Frequent "java.net.UnknownHostException: raw.githubusercontent.com" on Wild Web Developer CI
changed title from Frequest "java.net.UnknownHostException: raw.githubusercontent.com" on Wild Web Developer CI to Frequent "java.net.UnknownHostException: raw.githubusercontent.com" on Wild Web Developer CI
In our case, https://ci.eclipse.org/lsp4mp/job/lsp4mp/job/PR-283/ , Tycho fetches from a .target file that contains <location type="Target" uri="https://raw.githubusercontent.com/eclipse/eclipse.jdt.ls/master/org.eclipse.jdt.ls.target/org.eclipse.jdt.ls.tp.target"/> .
I don't think there's a way (yet) to tell Tycho to include certain headers (eg. Authorization) in all its requests.
Update : In our case, we just realized we also deploy the target file to repo.eclipse.org, so we can use that directly for now.
If this is not possible with configuration of simple authentication files somewhere,
Then one alternative is to create a proxy that does add the header (eg https://stackoverflow.com/questions/154441/set-up-an-http-proxy-to-insert-a-header ) and configure Tycho/Maven/p2/... to use this proxy instead of raw.githubusercontent.com.