Open
Conversation
Wraps the fetch+stream download in withRetry (3 attempts, 2-10s jittered backoff). Only retries on network errors (connection reset, body read failures), not on HTTP status errors which are deterministic. This protects all `quarto install` commands (TinyTeX, Chrome Headless Shell, VeraPDF) from transient CDN failures — both in CI and for end users on flaky connections.
Wraps TinyTeX and Chrome Headless Shell install steps in a 3-attempt retry loop with 15s delay. Uses GitHub Actions annotations (::warning:: and ::error::) for visibility. Defense-in-depth alongside the internal download retry added to downloadWithProgress.
Changes to the download logic should trigger the install integration tests since all tool installs go through downloadWithProgress.
`return fn()` inside an async try block returns the promise directly without awaiting — rejected promises bypass the catch block entirely. Changed to `return await fn()` so async failures are caught and retried. Without this fix, withRetry never retried async callbacks (including downloadWithProgress and Netlify file uploads).
Skip sleep/warning on final attempt — no retry follows. Also add src/core/retry.ts to workflow path triggers since retry behavior directly affects tool installs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Transient network failures during
quarto install(CDN timeouts,connection resets mid-download) cause hard failures. Seen in CI on
arm64 runners:
error reading a body from connectionduring ChromeHeadless Shell download.
Fix
Two layers of resilience:
Internal retry (
src/core/download.ts): WrapsdownloadWithProgressin
withRetry— 3 attempts with 2-10s jittered backoff. Only retriesnetwork errors (connection reset, body read failures), not HTTP status
errors. Protects all
quarto installcommands for all users.CI retry (
.github/workflows/test-install.yml): Bash retry loop oninstall steps as defense-in-depth. Uses
::warning::annotations forvisibility.
Fixes https://github.com/quarto-dev/quarto-cli/actions/runs/24458183539/job/71464601541