OpenFn / OpenFn/lightning

Don't Mark run as `lost` if a key event is rejected

Open
#4,355 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

lost runs
Dominant language
Elixir
Stars
296
Forks
86
Avg merge
1d 13h
Merged PRs (30d)
50

Description

This is related to #2943. Not a fix, but a better and cheaper intermediate solution.

Sometimes when something goes wrong in a run, key events like step:start and step:complete (I think literally just those two? Or anything but a log?) will fail.

As soon a step:complete fails, right now, the run will become Lost, because all subsequent events will be rejected by lighting.

If we forget the complexity of idempotency, of retries, of strictness, why a particular event was rejected: the wider story is that as soon as a step:complete is rejected, Lightning must mark the run crashed (or killed?) rather than lost.

Because Lost means "we don't know what happened to this run". But that's inaccurate - we know exactly what happened to the Run - Lightning rejected its events.

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 handling of rejected key events, especially step:start and step:complete, and how those rejections affect the run state. Confirm whether a rejected step:complete should mark the run crashed or killed rather than lost, then verify that subsequent events no longer cause the run to remain lost.

Written by the indexing model from the issue text.

Assessment

Tech stack
elixir
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.