Skip to content
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

workDir and jobStore now default to (shared) tmp-outdir-prefix #5154

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

gmloose
Copy link
Contributor

@gmloose gmloose commented Nov 12, 2024

Changelog Entry

To be copied to the draft changelog by merger:

  • PR submitter writes their recommendation for a changelog entry here

Reviewer Checklist

  • Make sure it is coming from issues/XXXX-fix-the-thing in the Toil repo, or from an external repo.
    • If it is coming from an external repo, make sure to pull it in for CI with:
      contrib/admin/test-pr otheruser theirbranchname issues/XXXX-fix-the-thing
      
    • If there is no associated issue, create one.
  • Read through the code changes. Make sure that it doesn't have:
    • Addition of trailing whitespace.
    • New variable or member names in camelCase that want to be in snake_case.
    • New functions without type hints.
    • New functions or classes without informative docstrings.
    • Changes to semantics not reflected in the relevant docstrings.
    • New or changed command line options for Toil workflows that are not reflected in docs/running/{cliOptions,cwl,wdl}.rst
    • New features without tests.
  • Comment on the lines of code where problems exist with a review comment. You can shift-click the line numbers in the diff to select multiple lines.
  • Finish the review with an overall description of your opinion.

Merger Checklist

  • Make sure the PR passes tests.
  • Make sure the PR has been reviewed since its last modification. If not, review it.
  • Merge with the Github "Squash and merge" feature.
    • If there are multiple authors' commits, add Co-authored-by to give credit to all contributing authors.
  • Copy its recommended changelog entry to the Draft Changelog.
  • Append the issue number in parentheses to the changelog entry.

@gmloose
Copy link
Contributor Author

gmloose commented Nov 12, 2024

Implements #5143.

Copy link
Member

@adamnovak adamnovak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code changes look good but I think as is this makes the documentation confusing for the non-CWL case.

Comment on lines 92 to 93
the workflow logs. Default is determined by the
variables (TMPDIR, TEMP, TMP) via mkdtemp. This
the workflow logs. Default is the temporary output
directory (see ``--tmp-outdir-prefix``). This
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's only a notion of --tmp-outdir-prefix in the CWL runner; Python workflows an the WDL runner don't have it, and this documentation is meant to cover all three. So this probably needs to say that for CWL workflows the default --workDir comes from --tmp-outdir-prefix, but for other cases it still comes from mkdtemp.

Also, the help that Toil actually prints is here, and it also has the material about mkdtemp, so if in CWL mode that doesn't apply, we might want to change that text too. There we have access to a boolean cwl flag, so we could describe the CWL-related behavior when it is set and the non-CWL behavior otherwise.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reverted the change to the original text, and added a line about CWL workflows and --tmp-outdir-prefix. I don't know if you want it to be more elaborate.

I didn't touch the help that Toil prints. It was not completely clear to me where these changes had to be made, taking the cwl boolean into account.

This commit makes the following changes to the behaviour of the given command-line options:
* `tmp-outdir-prefix` defaults to `tmpdir-prefix`, unless given on the command-line
* `workDir` defaults to `tmp-outdir-prefix`, unless given on the command-line
* `jobStore` defaults to `tmp-outdir-prefix`, unless given on the command-line
* `coordinationDir` defaults to the default tmpdir-prefix, ignoring `tmpdir-prefix` when given on the command-line (rationale: this is a book-keeping location, that must be on a local 100% posix-compliant file system, because it uses file locks).
Updated the CLI documention for the `--workDir` option.
The jobstore cannot be put inside the working directory, because it may need to be retained (e.g. when --stats is set).
It now gets its own (temporary) directory, if not specified with the --jobstore option.
We do not need to create a working directory on the head node. We only need to create our jobstore here.
There's no need to set `options.tmp_outdir_prefix` here. It is not done in the current `master` branch either.
Improved the documentation of the `--workDir` option, by adding an explanation that the `--tmp-outdir-prefix` will be used for CWL workflows.
@mr-c mr-c force-pushed the issues/5143-workdir-and-jobstore-in-tmp-outdir-prefix branch from ec7b5ca to f71ddf3 Compare November 14, 2024 15:05
@adamnovak
Copy link
Member

@stxue1 is going to fix up the help here and merge this in.

@stxue1
Copy link
Contributor

stxue1 commented Nov 20, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

workDir and jobStore should default to (shared) tmp-outdir-prefix
3 participants