Open noahtalerman opened 2 months ago
Canceling pending script runs when a script is deleted is the expected behavior.
The copy in the UI tells the IT admin that scripts will be canceled. See the screenshot in this bug: #21889
The current plan is to update the copy ASAP to say something like "pending scripts will still run."
In a later iteration, as part of this request, we'll follow up and update the behavior and copy to something like "pending scripts will be canceled."
cc @nonpunctual @georgekarrv @lukeheath
Chatted with @noahtalerman earlier as I noticed this is adjacent to #17129, and it feels more bug-ish.
There is a trivial UI component to this to update wording introduced in #21889.
There is a trivial UI component to this to update wording introduced in https://github.com/fleetdm/fleet/issues/21889.
@iansltx great call out. I think we can switch back to the old copy:
I added this^ screenshot to the issue description so we don't forget.
Hey team! Please add your planning poker estimate with Zenhub @mostlikelee @lucasmrod @getvictor
Expected Behavior
If an admin deletes/edits a script they expect it not to run.
Currently, the only way to edit a script is via YAML files (GitOps).
Actual Behavior
The script stays as pending.
Steps to reproduce
To Fix
When a script's content is edited, a side effect should be to clear any pending script runs referencing that script. Same with deletion of the script (which has a UI-facing endpoint already). Right now the scope of edits is the batch script edit endpoint used by GitOps, but between GitOps edit and UI deletion there's reason enough to encapsulate this in the data store so adding the side effect on script edit is trivial once we implement that endpoint.
Update the copy in the Delete script modal on the Controls > Scripts page:
"This will cancel any pending script execution for."
"If the script is current running on a host it will still complete, but results won’t appear in Fleet."
"You cannot undo this action."
Test Plan
This covers: