Skip to content

fix: tolerate failure on unconfigured favicon#2982

Merged
stefanv merged 2 commits into
jupyter-book:mainfrom
stefanv:fix-favicon-fetch-flakiness
Jul 1, 2026
Merged

fix: tolerate failure on unconfigured favicon#2982
stefanv merged 2 commits into
jupyter-book:mainfrom
stefanv:fix-favicon-fetch-flakiness

Conversation

@stefanv

@stefanv stefanv commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

Without a configured favicon, the theme falls back to fetching a default icon from mystmd.org. When that site is down (as recently happened on CI), it breaks the build. This PR adds an "optional" flag to a route, so that if that route cannot be fetched the static build simply continues.

We only enable that flag for the fallback favicon.ico, since it really isn't important to have it.

Also add error listeners on the binary response/write streams so a premature stream close rejects the write promise instead of hanging indefinitely.

Without a configured favicon, the theme falls back to fetching a
default icon from mystmd.org. When that site is down (as recently
happened on CI), it breaks the build. This PR adds an "optional" flag
to a route, so that if that route cannot be fetched the static build
simply continues.

We only enable that flag for the fallback favicon.ico, since it really
isn't important to have it.

Also add error listeners on the binary response/write streams so a
premature stream close rejects the write promise instead of hanging
indefinitely.
@changeset-bot

changeset-bot Bot commented Jul 1, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: f80f77a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions github-actions Bot added the bug Something isn't working label Jul 1, 2026
@stefanv

stefanv commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator Author

All PRs are currently failing CI, including mystmd, so going to merge this to get things going. Happy to revert and implement an alternative.

@stefanv stefanv merged commit aa08678 into jupyter-book:main Jul 1, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant