Make a ~/.toil folder to put workflows in
Having common place where we know workflows are located would allow for accessing objects such as the message bus more consistently, we currently default to creating this in the current working directory which may be unreliable for fetching status.
┆Issue is synchronized with this Jira Story ┆friendlyId: TOIL-1232
@adamnovak
I'm not sure what you mean by locating a workflow somewhere. Workflow scripts/CWL files are wherever the user has put them, and the job store is often in S3 and not in a file at all. And we already have a per-workflow-run "coordination directory" on each machine, including the leader, which goes in $XDG_RUNTIME_DIR if that is available.
The message bus messages only get logged to a file if the user passes --logMessages, and in that case we make them specify where they want the file. When the server uses this, it puts it next to all its other per-workflow files, like the WES workflow upload and the saved human-readable workflow logs.
When toil-cwl-runner runs a workflow it often has to pick a job store location, if the user hasn't specified one. We could change that to defaulting to a ~/.toil if we thought that made more sense than where it drops them now, but I'm not sure it does.
If we wanted to automatically pick a place for --logMessages to put its file, we could pick some kind of per-workflow directory under ~/.toil. But we also might want to consider the Toil coordination directory. We could also think about putting it just in the job store, and not always having it be a local file. But in both those cases, it wouldn't really be able to outlive the workflow run.
If Toil just picked a place under ~/.toil to save message bus messages for each workflow, how would the user know which file goes with the workflow they care about? Especially if the workflow is finished and has cleaned up its job store?
This might connect to #4093. Maybe we want all Toil runs to save their leader logs persistently by default, with some kind of toil logs command to look at the logs from previous workflow runs, or clean up the logs from old runs. But I'm not sure we'd want that to be in ~/.toil and not in the job store somehow.