TheRoddyWMS / Roddy

The Roddy workflow development and management system.
http://roddy-documentation.readthedocs.io
MIT License
8 stars 3 forks source link

Temporary output directory support #330

Open vinjana opened 5 years ago

vinjana commented 5 years ago

Currently, the user has to manager transactionality of jobs by either writing to manually composed temporary files or by using checkpoint files (in rare cases). This has several disadvantages:

Aim: Write all job-output into job-specific output directory. Only after the job is finished, move the output to the final destination. Compare e.g. cwlexec: Here everything is kept in job-specific directories. We would like to be more generic (and we can; it is also easy to mimick the cwlexec behaviour by adding ${TOOL_ID} into the output file path).

  1. At submission time, create a temporary directory (directly?) within the output directory. It could be also a temp-dir for the submission and another directory level for the job.
  2. Expose the job's full temp-dir and temporary tag (i.e. just the random part of the directory) to the filename-pattern resolution with specific variables. They should also be exposed into the job with environment variables (e.g. RODDY_JOB_TMP_DIR and RODDY_JOB_TMP_TAG or so).
  3. After the job finished successfully in the job wrapper script move the temporary output to the final destination.
vinjana commented 6 months ago

Note that the temporary job directory needs to be different for every job execution. The directory path should be defined before the job starts executing (this it could be shown at job submission time)