OpenFn / OpenFn/kit

Worker: after disconnect, runs don't seem to recover

Open
#1,179 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Not sure about this, and it may just be a duplicate of #1178

In a flurry of lost runs yesterday, one pattern I notice is:

  • Connection to lightning is lost
  • The worker reconnects
  • Any messages on the wire are lost: the message in flight when connection drops doesn't seem to ever get delivered (citation needed)
  • If that message happened to be step:complete, we're dead

There's also a risk at this point that the run has been marked as Lost by lightning.

Actually, I think the problem we have is that once a run is marked Lost, that's it, game over. If the worker was just held up, and all the events come home an hour later for /reasons/, the run will still be lost - even though all the information gets piped in.

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 tracing the worker reconnect flow and the lifecycle of runs marked Lost, focusing on what happens when a step:complete message is in flight during disconnect. Reproduce the lost-connection scenario and determine whether late events can still affect the run; done means the recovery behavior and its regression coverage are clear.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.