Baoyuantop opened a new pull request, #2005:
URL: https://github.com/apache/apisix-website/pull/2005

   ## Summary
   
   - Replace `child_process.exec()` with `child_process.spawn()` for build 
steps in `generate-website.js` to eliminate `stdout maxBuffer length exceeded` 
errors.
   
   ## Problem
   
   After #2002 changed `onBrokenLinks` from `'ignore'` to `'log'`, the `doc` 
workspace build now outputs ~33,000 lines of broken link warnings to stdout. 
Since `generate-website.js` uses `exec()` (which buffers all output in memory), 
this exceeds Node.js's default `maxBuffer` limit (1MB), causing the `doc` build 
to be marked as failed even though Docusaurus compilation itself succeeds.
   
   **Failed CI run**: 
https://github.com/apache/apisix-website/actions/runs/22993146365/job/66758664427
   
   ## Solution
   
   Replace `exec()` with `spawn()` for build commands. `spawn()` streams 
stdout/stderr directly to log files on disk instead of buffering in memory, so 
there is no buffer size limit regardless of how much output the build produces.
   
   ### Key changes:
   - Add `runBuild()` helper that uses `spawn()` with piped streams to log files
   - Detect build failures via exit code (spawn) instead of promise rejection 
(exec)
   - Preserve all existing behavior: parallel builds, log file output, failure 
reporting
   - Keep `exec()` for simple `cp` commands (tiny output, no risk)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to