Skip to content

Commit

Permalink
set retry limit and make retries visible logs (#170)
Browse files Browse the repository at this point in the history
  • Loading branch information
IanButterworth authored Nov 21, 2023
1 parent 84c4368 commit 8a5ee44
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions lib/installer.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions src/installer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`)
}
})

Expand Down Expand Up @@ -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}`)
}
})

Expand Down

0 comments on commit 8a5ee44

Please sign in to comment.