-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rerun workflows #203
Comments
Very reasonable use case, of course. But is there anything stopping you from implementing this functionality without there being a specific endpoint to trigger it? Just like, e.g., Snakemake does it? From a WES client's point of view, surely it's trivial to implement re-run functionality, either with identical or updated parameters ("just re-trigger that previous run as is or give me a copy of the form so that I can modify it first"). And a WES can surely (try to) identify re-runs or partial re-runs and reuse cached artifacts, from containers to input data to intermediate data to run checkpoints, regardless of whether the client specifically asks for it or not. And this could be restricted to a particular user's previous runs. Or not. Possibly dependening on the tradeoff between security/privacy considerations and costs/performance. Or we could add a A couple of other thoughts:
|
I like the |
Thinking about it again, I'm not sure how it would work though. And isn't there a danger that it may raise expectations on a given WES to support caching for re-runs? I mean, if it's just about getting the form parameters, a client could also look at What I do think would be good to have to address this issue:
With these fields, instances could broadcast hints as to their ability to use caches for re-runs (and their limitations). It would also enable the client to opt out of caching for security reasons or in case re-runs because of broken caches etc. And I think @vinjana's use case could be solved by extending the documentation for implementers as to how we imagine that caches could be used via the regular |
What
Many workflow engines have a rerun feature that allows the user to restart the workflow at a safe stage after it was stopped ungracefully.
Why
Workflows may terminally end in many situations, including unrecoverable error in the infrastructure (e.g. batch processing system, storage). Some of these conditions may be covered by automatic restarts, like some infrastructure problems, others, however, are best be handled by cancellation or automatic termination of workflows, such as workflow bugs, inability to deal with unexpected inputs, etc. One valid situation that we repeatedly observe is a workflow failing because some odd input data requires 10 times the memory or takes 10 times longer than a "normal" sample (e.g. normal cancer sample vs. chromothrypsis; some optimization algorithms with occasionally bad convergence characteristics)
In principle, workflow runs may be started from the beginning, and indeed some workflow engines do even not provide a restart feature. (Restarting from the beginning, i.e. with a new RunRequest, in any case is the safer solution if one does not trust an engine's rerun feature.)
However, restarting workflows at a later stage is still interesting, because it may safe resources (CPU, IO, energy/CO2), and time -- which is important in some application areas, like the timely processing of patient data.
How
The request would just start exactly the same workflow again, i.e., use the same parameters. There may also be use-cases where a parameter may differ for a rerun. For instance, it may be necessary to increase the memory and time resources for an odd sample.
The rerun may be applied to a workflow in any terminal-state, such as CANCELED, EXECUTOR_ERROR, SYSTEM_ERROR, but obviously not in a running state, like RUNNING, QUEUED, etc.
The correct rerunning itself should be left to the workflow engine. We should not care whether the engine or even the workflow allow for this rerunning (that's outside the responsibility of a WES, I think).
This could be implemented as a separate RerunRequest route (e.g. with the run-id in the route). The whole feature should be optional, because it does not make sense to require the implementation of a RerunRequest API endpoint for a workflow engine that cannot do reruns.
The text was updated successfully, but these errors were encountered: