lightning icon indicating copy to clipboard operation
lightning copied to clipboard

Deleted workflows remain editable and re-runnable

Open mtuchi opened this issue 8 months ago • 0 comments

Describe the bug:

Currently deleted workflows can still be edited and re-run. This behavior contradicts the expected outcome of deleting a workflow, which should be to fully disable it and make runs view-only.

Version number

  • On app.openfn.org: v2.5.3 (1.0.11)
  • Locally on main : 5e916abb7

I have reproduced this locally on main:

  • [x] Yes
  • [ ] No

To Reproduce Steps to reproduce the behavior:

  1. Create a test workflow with sample jobs
  2. Run the workflow to create different work orders
  3. Delete the workflow after couple of runs
  4. Navigate to the history page and inspect a run from a deleted workfow
  5. You will be redirected to a workflow canvas with access to all input, job code and output logs
  6. Try to re-run from a selected input
  7. The workflow should run and create a new work-order

Expected Behavior:

  • Deleting a workflow should completely disable it, preventing further edits and executions.
  • Run logs for deleted workflows should remain accessible for reference but not allow re-runs.

Actual Behavior:

  • Users can edit deleted workflows, potentially modifying their configuration.
  • Deleted workflows can still be triggered for re-runs.

Screen-recording

https://github.com/OpenFn/lightning/assets/6592749/2cbd140a-c244-4010-9c5d-e9761383176d

Severity:

This bug introduces a risk of unintended workflow execution and configuration changes after deletion. It can cause confusion and potentially disrupt run history logs.

Proposed Solution:

  • Update the workflow deletion functionality to ensure complete disabling.
  • Prevent editing and re-running of deleted workflows.
  • Consider offering an option to permanently remove run logs associated with deleted workflows if desired (separate discussion, probably data retention feature).

mtuchi avatar Jun 04 '24 10:06 mtuchi