OpenFn / OpenFn/kit

Revisit pool.destroy logic

Open
#1,192 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

DevX
Dominant language
TypeScript
Stars
21
Forks
23
Avg merge
1d 22h
Merged PRs (30d)
17

Description

The test destroy should close all child processes is flaky, so I've skipped it. Looking at the logic I'm not convinced it's doing what I think it's doing.

I don't that immediate exit is working properly. I would like to test this better and maybe refactor.

I'm not enjoying the killWorkerand waitForWorker to finish functions. I'd just like one killWorker function with optional timeout, which can be awaited.

A final cocern: looking back I'm confused about the difference between pool and allWorkers. Why do we need both? Something about workers coming out of the pool while active... I don't know.

I'd just like to revisit this later with a full brain,

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the skipped test, destroy should close all child processes, then trace pool.destroy, killWorker, and waitForWorker to understand immediate exit and the roles of pool and allWorkers. Done means the worker shutdown behavior is reliably tested and the lifecycle API and relationship between these collections are clarified, with any refactor agreed from that investigation.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.