set retry limit and make retries visible logs (#170)

This commit is contained in:
Ian Butterworth
2023-11-20 23:05:49 -05:00
committed by GitHub
parent 84c4368e8a
commit 8a5ee44838
2 changed files with 8 additions and 4 deletions

View File

@@ -54,8 +54,9 @@ export async function getJuliaVersionInfo(): Promise<object> {
const versionsFile = await retry(async (bail: Function) => {
return await tc.downloadTool('https://julialang-s3.julialang.org/bin/versions.json')
}, {
retries: 5,
onRetry: (err: Error) => {
core.debug(`Download of versions.json failed, trying again. Error: ${err}`)
core.info(`Download of versions.json failed, trying again. Error: ${err}`)
}
})
@@ -208,8 +209,9 @@ export async function installJulia(versionInfo, version: string, arch: string):
const juliaDownloadPath = await retry(async (bail: Function) => {
return await tc.downloadTool(downloadURL)
}, {
retries: 5,
onRetry: (err: Error) => {
core.debug(`Download of ${downloadURL} failed, trying again. Error: ${err}`)
core.info(`Download of ${downloadURL} failed, trying again. Error: ${err}`)
}
})