Skip to content

fix(fonts): stop retrying font downloads that cannot succeed - #822

Merged
pamburus merged 1 commit into
mainfrom
fix/font-download-retry
Nov 5, 2026
Merged

pamburus merged 1 commit into
mainfrom
fix/font-download-retry

Conversation

@pamburus

@pamburus pamburus commented Nov 5, 2026

Copy link
Copy Markdown
Owner

Font downloads are now retried only for temporary failures. Errors that can never succeed on retry, such as an invalid or unsupported URL, fail immediately with a clear message.

Closes #813

Verification

  • Reproduced with the config from the issue (files = ['C:\fonts\Iosevka.ttf']) on macOS
  • Covered by unit tests for the error classification and for an invalid URL failing immediately
  • just lint passes
  • just uncovered reports nothing

Before

DEBUG termframe::font] Retry in 1.19s due to Http(http::Error(InvalidUri(InvalidUriChar)))
DEBUG termframe::font] Retry in 2.48s due to Http(http::Error(InvalidUri(InvalidUriChar)))
DEBUG termframe::font] Retry in 4.72s due to Http(http::Error(InvalidUri(InvalidUriChar)))
...

After

INFO  termframe] resized terminal to 80x24
error: failed to load font C:\fonts\Iosevka.ttf: http: invalid uri character

Retrying of temporary failures was not exercised against a live failing server; it is covered by the unit tests only.

@pamburus
pamburus force-pushed the fix/font-download-retry branch from bd22bfc to 03b4280 Compare November 5, 2026 03:14
@pamburus pamburus changed the title fix(fonts): fail immediately on font download errors that retrying cannot fix fix(fonts): stop retrying font downloads that cannot succeed Nov 5, 2026
@codecov

codecov Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.69%. Comparing base (5778648) to head (30c7d52).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #822      +/-   ##
==========================================
+ Coverage   84.64%   84.69%   +0.05%     
==========================================
  Files          32       32              
  Lines        4727     4732       +5     
==========================================
+ Hits         4001     4008       +7     
+ Misses        726      724       -2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

* **Invalid or unsupported font URLs** now fail right away with a clear error instead of retrying for more than a minute
* Only temporary failures, such as network errors, timeouts and `429`, `500`, `502`, `503` or `504` responses, are retried

Refs: #813
@pamburus
pamburus force-pushed the fix/font-download-retry branch from 03b4280 to 30c7d52 Compare November 5, 2026 03:20
@pamburus
pamburus enabled auto-merge (squash) November 5, 2026 03:23
@pamburus
pamburus merged commit cff165c into main Nov 5, 2026
19 checks passed
@pamburus
pamburus deleted the fix/font-download-retry branch November 5, 2026 03:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Font download retries errors that can never succeed

1 participant