reanahub / reana-client

REANA command-line client
http://reana-client.readthedocs.io/
MIT License
10 stars 45 forks source link

cli: improve deletion of workflows with attached interactive sessions #649

Closed tiborsimko closed 1 year ago

tiborsimko commented 1 year ago

Current behaviour

When a user deletes a workflow, its workspace is deleted, however the user is not warned that any interactive notebook sessions started on the workspace will be kept running (on a now-empty workspace).

For example, run an test workflow:

$ reana-client run -w test
...
$ reana-client status -w test
NAME   RUN_NUMBER   CREATED               STARTED               ENDED                 STATUS     PROGRESS
test   1            2023-01-27T11:01:52   2023-01-27T11:02:03   2023-01-27T11:02:09   finished   1/1

Open a notebook on the test workflow's workspace:

$ reana-client open -w test

Delete the workflow:

$ reana-client delete -w test

The notebook session will remain active, even though all the files under the workspace had been removed.

(Also, reana-client list --sessions is not showing anything unless one does reana-client list --sessions --show-deleted-runs.)

Expected behaviour

It would be useful to do one of the following to make it more transparent:

We may also want to introduce a new CLI option, such as delete --include-session, that would do the above, with the default being "off" for gentle behaviour, and "on" for the harsh behaviour.

tiborsimko commented 1 year ago

(Also, reana-client list --sessions is not showing anything unless one does reana-client list --sessions --show-deleted-runs.)

This is obviously because the workflow has been deleted. However, if we are following the logic that list shows all non-deleted workflows and only list --all shows deleted ones, then the users might expect that list --sessions will show all non-deleted sessions and only list --sessions --all shows deleted ones. (Which brings me to another topic of session accounting, but that's for another issue.) Just a side note.