Skip to content

test(eslint-plugin-runner): skip worker-pool e2e suites on windows (napi terminate aborts)#1031

Merged
fansenze merged 1 commit into
mainfrom
fix/worker-pool-e2e-windows-skip
May 27, 2026
Merged

test(eslint-plugin-runner): skip worker-pool e2e suites on windows (napi terminate aborts)#1031
fansenze merged 1 commit into
mainfrom
fix/worker-pool-e2e-windows-skip

Conversation

@fansenze
Copy link
Copy Markdown
Contributor

Summary

The worker-pool-e2e-* suites flakily crash the windows CI job with Worker exited unexpectedly. Root cause: tearing down a worker thread that has oxc-parser (a napi/Rust addon) loaded aborts below the JS layer on windows — uv_loop_close() while having open handles / SIGABRT (nodejs/node#34567, napi-rs/napi-rs#2460). rstest's forked test child intercepts uncaughtException / unhandledRejection / process.exit, so the only way it can "exit unexpectedly" is this native fault.

This is not a bug in the pool logic — it's a known limitation of worker_threads + native addons. There is no reliable JS-level mitigation (any teardown ordering still races the native cleanup, below the JS layer); a real fix needs process isolation (child_process), tracked separately.

These six suites all spawn real workers and tear them down (shutdown / terminate / crash / wedged paths), so they are gated behind describe.skipIf(process.platform === 'win32'). linux/macOS keep running them in full — the pool logic stays covered everywhere except the windows-native-abort path it cannot survive.

The large diff is mostly prettier re-indenting each suite body one level after the describe.skipIf(...) wrap; the only logical change per file is the skip guard + an explanatory comment.

Related Links

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Terminating a worker thread that has oxc (a napi addon) loaded aborts below the JS layer on windows (nodejs/node#34567), crashing the rstest worker that runs the file. The worker-pool-e2e-* suites all spawn real workers and tear them down (shutdown / terminate / crash paths), so they flakily crash the windows CI job — not a bug in the pool logic, which the linux/macOS runs still fully cover.

This is a known limitation of worker_threads + native addons: any JS-level teardown ordering still races the native cleanup, so there is no reliable mitigation short of process isolation (child_process), tracked separately. Gate the six suites behind describe.skipIf(process.platform === 'win32').
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request skips several end-to-end worker pool tests on Windows platforms using describe.skipIf(process.platform === 'win32'). This change prevents test runner crashes on Windows caused by tearing down workers that have the oxc N-API addon loaded. I have no feedback to provide as there are no review comments.

@fansenze fansenze merged commit 717818d into main May 27, 2026
15 checks passed
@fansenze fansenze deleted the fix/worker-pool-e2e-windows-skip branch May 27, 2026 09:09
eryue0220 added a commit to eryue0220/rslint that referenced this pull request May 27, 2026
… into feat/no-duplicate-hooks

* 'feat/no-duplicate-hooks' of github.com:eryue0220/rslint:
  test(eslint-plugin-runner): skip worker-pool e2e suites on windows (napi terminate aborts) (web-infra-dev#1031)
  feat: port rule react/checked-requires-onchange-or-readonly (web-infra-dev#1030)
  chore(deps): update actions/checkout action to v6 (web-infra-dev#1007)
  chore(deps): update actions/setup-go action to v6 (web-infra-dev#1009)
  chore(deps): update actions/setup-node action to v6 (web-infra-dev#1010)
  feat: port rule @stylistic/jsx-indent-props (web-infra-dev#1028)
  feat(eslint-plugin-runner): new package for ESLint plugin compatibility runtime (web-infra-dev#991)
  feat: port rule @stylistic/jsx-function-call-newline (web-infra-dev#1027)
  feat(eslint-plugin-jest): add `prefer-called-with` rule (web-infra-dev#1025)
  feat: port rule @stylistic/jsx-first-prop-new-line (web-infra-dev#1024)
  feat: port rule @stylistic/jsx-curly-spacing (web-infra-dev#1023)
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