Skip to content

feat(collections): pf-4401 worker threads - #276

Merged
cdcabrera merged 1 commit into
patternfly:mainfrom
cdcabrera:pf-4401-worker
Aug 12, 2026
Merged

feat(collections): pf-4401 worker threads#276
cdcabrera merged 1 commit into
patternfly:mainfrom
cdcabrera:pf-4401-worker

Conversation

@cdcabrera

@cdcabrera cdcabrera commented Aug 11, 2026

Copy link
Copy Markdown
Member

What is it?

  • feat(collections): pf-4401 worker threads
    • collections, apply proxy for heavy tasks via workers
    • server.workerPool, pooled worker threads, queue cap, shutdown
    • server.workerRunner, module exec with AsyncLocalStorage isolation, parentPort keep-alive
    • server.workerEntry, dedicated worker entry for spawn/import resolution
    • server, wire worker pool into request flow used by collections
    • tools, new dedicated export for user facing tools, avoid worker conflicts
    • docs, public API/deprecations, example import paths for dedicated user facing tools
    • tests, add coverage for worker pool/runner and refresh snapshots
    • jest.setupTests, worker mock, include setup, env updates
    • package, add #workerEntry import alias for worker script, export for user facing tools

Notes

  • supersedes feat(collections): pf-4401 process spawn, ipc #273 with worker-threads for hybrid collections (collections requiring parallel behavior) vs a child-process (fully isolated)
  • moving to worker-threads relates easier context for settings around global options and sessions.
  • the child-process implementation while feasible and functional was ... "intense". we'll reserve child-process for collections-as-plugins in the future
  • we ended up having to adjust how threads are spooled up because it conflicted with the centralized export for tools-as-plugins. as an extra safety measure to avoid spooling workers when someone just wanted to write a tool-as-plugin we separated out the tools export for users and deprecated the previous central export, planned removal for 3.0.0

Updates issue/story

related to #272 #241 #242 and pf-4401 pf-4402
supersedes #273

@cdcabrera
cdcabrera marked this pull request as draft August 11, 2026 23:55
@cdcabrera
cdcabrera force-pushed the pf-4401-worker branch 2 times, most recently from a90ca82 to 7795193 Compare August 12, 2026 15:37
@cdcabrera
cdcabrera marked this pull request as ready for review August 12, 2026 21:17
* collections, apply proxy for heavy tasks via workers
* server.workerPool, pooled worker threads, queue cap, shutdown
* server.workerRunner, module exec with AsyncLocalStorage isolation, parentPort keep-alive
* server.workerEntry, dedicated worker entry for spawn/import resolution
* server, wire worker pool into request flow used by collections
* tools, new dedicated export for user facing tools, avoid worker conflicts
* docs, public API/deprecations, example import paths for dedicated user facing tools
* tests, add coverage for worker pool/runner and refresh snapshots
* jest.setupTests, worker mock, include setup, env updates
* package, add #workerEntry import alias for worker script, export for user facing tools
@cdcabrera
cdcabrera merged commit 3ee24ef into patternfly:main Aug 12, 2026
8 checks passed
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