lightning
lightning copied to clipboard
Deleted workflows remain editable and re-runnable
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:
- Create a test workflow with sample jobs
- Run the workflow to create different work orders
- Delete the workflow after couple of runs
- Navigate to the history page and inspect a run from a deleted workfow
- You will be redirected to a workflow canvas with access to all input, job code and output logs
- Try to re-run from a selected input
- 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).