OpenFn / OpenFn/lightning

Abort or interrupt a running run

Open
#4,574 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

I'd like to be able to cancel a run that's already claimed, started, or in progress. Sometimes something goes wrong and you know you want to stop it right away, but a long run might take 45 minutes to complete or, worse yet, a crashed worker might not lead to your run being marked as "lost" for 60 minutes.

Proposal

  1. Click into a running run, and you should find a "cancel" button.
  2. Select a bunch of work orders from history in state "running" and you should be able to cancel any associated runs for those work orders (in the same way you can cancel pending runs in #1622 )
  3. Doing so should send a new event to the worker, telling it to abort, cease & desist, etc., etc.
  4. The worker should then send back some tidying up data - last logs, final state with a cancellation reason, etc.
  5. Basically, we don't want to shut the door from the lightning side... we want to tell the worker to stop and clean up immediately.

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 reviewing the existing pending-run cancellation flow referenced in #1622, then trace how running work orders and worker events are handled. Done means the UI can cancel running runs individually or in bulk, the worker receives an abort event, and cancellation returns final state, a reason, and cleanup logs.

Written by the indexing model from the issue text.

Assessment

Tech stack
elixir
Domain
full-stack
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.