The R version is resolved in determineVersion() with a single GET to api.r-hub.io/rversions/resolve/... via getJSON(), which is a bare fetch with no retry:
|
let os: string = OS != "linux" ? OS : await getLinuxPlatform(); |
|
let url: string = |
|
"https://api.r-hub.io/rversions/resolve/" + version + "/" + os; |
|
if (ARCH) { |
|
url = url + "/" + ARCH; |
|
} |
|
var tags = await getJSON<IRVersion>(url); |
|
async function getJSON<T>(url: string): Promise<T | undefined> { |
|
const response = await fetch(url, { |
|
headers: { "User-Agent": "setup-r" }, |
|
}); |
|
if (!response.ok) return undefined; |
|
return (await response.json()) as T; |
|
} |
A transient timeout resolving the version therefore fails the job (Error: Request timeout: /rversions/resolve/release/linux-ubuntu-24.04/x86_64).
I realise retry has been raised and declined before (#189, #755); this is narrower — just that one resolve GET. Would a small retry-with-backoff (3–5 attempts) around it be worth considering? Happy to open a PR if so.
The R version is resolved in
determineVersion()with a single GET toapi.r-hub.io/rversions/resolve/...viagetJSON(), which is a barefetchwith no retry:actions/setup-r/src/installer.ts
Lines 808 to 814 in 0d1fbb4
actions/setup-r/src/installer.ts
Lines 772 to 778 in 0d1fbb4
A transient timeout resolving the version therefore fails the job (
Error: Request timeout: /rversions/resolve/release/linux-ubuntu-24.04/x86_64).I realise retry has been raised and declined before (#189, #755); this is narrower — just that one resolve GET. Would a small retry-with-backoff (3–5 attempts) around it be worth considering? Happy to open a PR if so.