OpenFn / OpenFn/kit

ws-worker: gracefully handle lightning-side timeouts

Open
#407 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Lightning may timeout the worker after 10 minute of activity.

if after 11 minutes the worker resumes and starts sending messages:

  • It will be unable to rejoin the attempt channel
  • if it happens to have a channel open, it'll be closed by lightning

In these cases we just need to not explode. We may need to cancel the attempt if there's more work pending. We must not infinitely try to reconnect and accidentally DDoS lightning

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 by locating the ws-worker logic for attempt-channel joining, open-channel handling, and reconnect attempts. Exercise the case where Lightning times out the worker for 10 minutes and it resumes after 11 minutes. Done means the worker does not explode, avoids infinite reconnect attempts or a reconnect storm, and cancels the attempt when more work remains if needed.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.