build: stabilize image optimization against EAGAIN/EPIPE failures#1112
Open
RaminNietzsche wants to merge 1 commit into
Open
build: stabilize image optimization against EAGAIN/EPIPE failures#1112RaminNietzsche wants to merge 1 commit into
RaminNietzsche wants to merge 1 commit into
Conversation
Process images in bounded batches with per-file fallback so npm start and npm run build no longer crash when pngquant/mozjpeg spawn limits are hit. Run assets before the dev server and after the parallel site/css/js build to reduce concurrent process pressure. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
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.
Summary
Fixes intermittent
npm startandnpm run buildfailures caused byimageminspawning too manypngquant/mozjpegchild processes atonce (
EAGAINon macOS,EPIPEon some JPEGs).Problem
scripts/images.jsoptimized all ~1400 images in a singleimagemin()call and wrote outputs with un-awaited
forEach(async …)npm run devranassetsin parallel with Eleventy, CSS, and Rollup,increasing process spawn pressure
EPIPE; the whole buildexited with code 1
Changes
scripts/images.jsdist/(with warning)fs/promisesandpath.join(no undeclaredmake-dir/graceful-fs)package.jsondev: runassetsbefore--serve(not in parallel with Eleventy)build: runassetsafter parallelsite css jsRelated PRs
Overlaps with open #994 (imagemin EPIPE), but this change is scoped to
the asset pipeline only — no footer / Twitter icon changes.