reanahub / reana-client

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

new command: prune workflow's workspace #651

Closed tiborsimko closed 1 year ago

tiborsimko commented 1 year ago

Current behaviour

When a user has consumed all the possible disk quota, there are several techniques that can help to liberate disk space:

See:

This works well, but it may be either a bit tedious to set up, or by deleting workflows manually one could loose possibly interesting information about which workflow runs succeeded, which runs failed, etc.

(The behaviour of REANA is unlike that of a typical CI, which deletes all artefacts unless declared otherwise, whilst REANA keeps all artefacts unless declared otherwise.)

Expected behaviour

It would be useful to offer one more way to the user to easily remove any unnecessary temporary files. Let's call it "pruning" the workspace.

We could introduce a new prune command:

$ reana-client prune -w myanalysis.42

which, when run, will immediately remove all workspace files for the myanalysis run 42 except for those inputs and outputs that are declared in the reana.yaml file.

In this way, the workspace would get rid of any large temporary files immediately, the inputs would be kept though so that workflow could eventually be relaunched any time if necessary, and the outputs would be kept too so that there would be no need to relaunch anything by default if the user only wants to access the results some time in the future.

Notes