fix(ci): fallback to --ignore-optional when sharp install flakes - #80
Open
TerminalGravity wants to merge 1 commit into
Open
fix(ci): fallback to --ignore-optional when sharp install flakes#80TerminalGravity wants to merge 1 commit into
TerminalGravity wants to merge 1 commit into
Conversation
sharp (transitive dep from @xenova/transformers) frequently fails to install in CI due to network issues downloading libvips. Since preflight only uses text embeddings (not image processing), sharp is not required at runtime. This adds a fallback so CI doesn't fail on transient network errors.
Collaborator
Author
|
Pragmatic fix. The |
TerminalGravity
commented
Mar 4, 2026
TerminalGravity
left a comment
Collaborator
Author
There was a problem hiding this comment.
Simple and effective fix. The --ignore-optional fallback is the right approach since sharp is genuinely optional for text-only embedding use. 👍
TerminalGravity
commented
Mar 5, 2026
TerminalGravity
left a comment
Collaborator
Author
There was a problem hiding this comment.
Good resilience fix — sharp install failures shouldn't block CI. The --ignore-optional fallback is the right approach.
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.
Problem
CI intermittently fails on Node 20 because
sharp(transitive dep from@xenova/transformers) can't downloadlibvips— 'socket hang up' errors. This has been causing spurious CI failures on otherwise-green PRs (e.g. #79).Fix
Falls back to
npm ci --ignore-optionalif the initialnpm cifails. Since preflight only uses@xenova/transformersfor text embeddings (not image processing),sharpis not required at runtime.Impact
Should eliminate the most common source of flaky CI failures.