Skip to content

Propagate sub-package failures from build/bin/all.js - #1888

Closed
Trivikram Kamat (trivikr) wants to merge 1 commit into
microsoft:mainfrom
trivikr:build-bin-all-spawnSync
Closed

Trivikram Kamat (trivikr) wants to merge 1 commit into
microsoft:mainfrom
trivikr:build-bin-all-spawnSync

Conversation

@trivikr

Copy link
Copy Markdown

all.js ran npm <script> in each sub-package via spawnSync but discarded the result. Since npm test, npm run lint, npm run clean and npm run audit:all all go through this script, failing tests or lint errors in a sub-package still exited 0 and CI stayed green.

Check the spawnSync result and exit non-zero on the first failure, including spawn errors and termination by signal.

all.js ran `npm <script>` in each sub-package via spawnSync but
discarded the result. Since `npm test`, `npm run lint`, `npm run clean`
and `npm run audit:all` all go through this script, failing tests or
lint errors in a sub-package still exited 0 and CI stayed green.

Check the spawnSync result and exit non-zero on the first failure,
including spawn errors and termination by signal.
@trivikr

Copy link
Copy Markdown
Author

Heads-up: with this change, CI now surfaces failures that were previously swallowed. When running npm test locally, client-node-tests failed intermittently (1 out of 3 runs) on the Async Array tests (map / forEach, ok(yielded > 0)). Those tests depend on the batch running for at least 2ms before yielding, which doesn't always happen on fast machines.

The fix for that is in #1889. I'd suggest merging #1889 first (or together with this one) so CI doesn't start failing randomly once this lands.

@dbaeumer

Copy link
Copy Markdown
Member

Got fixed yesterday.

@trivikr
Trivikram Kamat (trivikr) deleted the build-bin-all-spawnSync branch October 16, 2026 15:58
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.

2 participants