Skip to content

fix(ci): fallback to --ignore-optional when sharp install flakes - #80

Open
TerminalGravity wants to merge 1 commit into
mainfrom
fix/ci-sharp-install-flake
Open

fix(ci): fallback to --ignore-optional when sharp install flakes#80
TerminalGravity wants to merge 1 commit into
mainfrom
fix/ci-sharp-install-flake

Conversation

@TerminalGravity

Copy link
Copy Markdown
Collaborator

Problem

CI intermittently fails on Node 20 because sharp (transitive dep from @xenova/transformers) can't download libvips — '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-optional if the initial npm ci fails. Since preflight only uses @xenova/transformers for text embeddings (not image processing), sharp is not required at runtime.

Impact

Should eliminate the most common source of flaky CI failures.

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.
@TerminalGravity

Copy link
Copy Markdown
Collaborator Author

Pragmatic fix. The || fallback unblocks CI — sharp's optional deps are a known pain point. Could pin to just sharp-related optionals later, but this works. Merging. 👍

@TerminalGravity TerminalGravity left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simple and effective fix. The --ignore-optional fallback is the right approach since sharp is genuinely optional for text-only embedding use. 👍

@TerminalGravity TerminalGravity left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good resilience fix — sharp install failures shouldn't block CI. The --ignore-optional fallback is the right approach.

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.

1 participant