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

Enhance cwltoil to support SoftwareRequirements & BioContainers. #1757

Closed
wants to merge 2 commits into from

Conversation

jmchilton
Copy link
Contributor

This commit enables all the same options in cwltoil as added to cwltool recently in common-workflow-language/cwltool#214 including --beta-conda-dependencies, --beta-dependency-resolvers-configuration, and --beta-use-biocontainers. The first two of these are documented in depth in cwltool's README now (https://github.com/common-workflow-language/cwltool/#leveraging-softwarerequirements-beta).

Here I will quickly review a couple of the available options against test examples available in cwltool's tests directory. I will assume cwltoil has been setup as configure in this branch and galaxy-lib installed in the same environment - for instance with pip install galaxy-lib. Now lets grab the examples from cwltool...

git clone https://github.com/common-workflow-language/cwltool.git
cd cwltool

From here we can quickly demonstrate installation and resolution of SoftwareRequirements using Conda using the tests/seqtk_seq.cwl tool. This tool doesn't define a DockerRequirement but does define the following SoftwareRequirements as hints as follows:

hints:
  SoftwareRequirement:
    packages:
    - package: seqtk
      version:
      - r93

We can try this tool out with cwltoil and see that by default we probably don't have the binary seqtk on our PATH and so the tool fails using the following command:

cwltoil tests/seqtk_seq.cwl tests/seqtk_seq_job.json

This should result in a tool execution failure. We can then instruct cwltoil to install the required package from Bioconda into an isolated environment and use it as needed by passing it the --beta-conda-dependencies flag as follows:

cwltoil --beta-conda-dependencies tests/seqtk_seq.cwl tests/seqtk_seq_job.json

The tool should now be successful.

The Conda support can be endless tweaked but the defaults are defaults that target the best practice Conda channels that work well for the Galaxy project. Additional SoftwareRequirement resolution options are available including targetting Software Modules, Homebrew, simple scripts called "Galaxy packages". All of these options can be specified and configured with a YAML file passed to cwltoil using the --beta-dependency-resolvers-configuration option instead of the simple shortcut --beta-conda-dependencies. The cwltool documentation walks through a few examples of adapting infrastructure to tools and tools to package managers.

In addition to options that allow configuring tool execution environments, containers themselves can be discovered and/or built from these software requirements. The Biocontainers project (previously Biodocker) contains a registry we use for this purpose. Every version of every Bioconda package has a corresponding best-practice (very lightweight, very small) Docker container on quay.io. There are over 2300 such containers currently.

Continuing with the example above, the new --beta-use-biocontainers flag instructs cwltoil to fetch the corresponding Biocontainers container from quay.io automatically or build one to use locally (required for instance for tools with multiple software requirements - fat tools).

cwltoil --beta-use-biocontainers tests/seqtk_seq.cwl tests/seqtk_seq_job.json

These containers contain the same binaries that the package would use locally (outside of Docker). Therefore this technique allows cross platform reproducibility/remixability across cwltool, cwltoil, Galaxy, and CLI - both inside and outside of containers.

@cgcloud-jenkins
Copy link

Can one of the admins verify this patch?

1 similar comment
@cgcloud-jenkins
Copy link

Can one of the admins verify this patch?

@mr-c
Copy link
Contributor

mr-c commented Jul 13, 2017

Jenkins, okay to test

@mr-c
Copy link
Contributor

mr-c commented Jul 13, 2017

Jenkins, test please

@ejacox
Copy link
Contributor

ejacox commented Jul 14, 2017

Jenkins, test this please

@mr-c
Copy link
Contributor

mr-c commented Jul 14, 2017

Looks like a single transient failure
Jenkins, test this please

@ejacox
Copy link
Contributor

ejacox commented Jul 14, 2017

@jessebrennan, #1742 is still occuring

@jessebrennan
Copy link
Contributor

@ejacox yes but this branch isn't up to date with master and hasn't merged the latest commit to fix it. From what I can tell, No branch yet has.

@jmchilton
Copy link
Contributor Author

I'll rebase.

This commit enables all the same options in cwltoil as added to cwltool recently in common-workflow-language/cwltool#214 including `` --beta-conda-dependencies``, ``--beta-dependency-resolvers-configuration``, and ``--beta-use-biocontainers``. The first two of these are documented in depth in cwltool's README now (https://github.com/common-workflow-language/cwltool/#leveraging-softwarerequirements-beta).

Here I will quickly review a couple of the available options against test examples available in cwltool's ``tests`` directory. I will assume cwltoil has been setup as configure in this branch and galaxy-lib installed in the same environment - for instance with ``pip install galaxy-lib``. Now lets grab the examples from cwltool...

```
git clone https://github.com/common-workflow-language/cwltool.git
cd cwltool
```

From here we can quickly demonstrate installation and resolution of SoftwareRequirements using Conda using the tests/seqtk_seq.cwl tool. This tool doesn't define a DockerRequirement but does define the following SoftwareRequirements as ``hints`` as follows:

```
hints:
  SoftwareRequirement:
    packages:
    - package: seqtk
      version:
      - r93
```

We can try this tool out with cwltoil and see that by default we probably don't have the binary seqtk on our ``PATH`` and so the tool fails using the following command:

```
cwltoil tests/seqtk_seq.cwl tests/seqtk_seq_job.json
```

This should result in a tool execution failure. We can then instruct cwltoil to install the required package from Bioconda into an isolated environment and use it as needed by passing it the ``--beta-conda-dependencies`` flag as follows:

```
cwltoil --beta-conda-dependencies tests/seqtk_seq.cwl tests/seqtk_seq_job.json
```

The tool should now be successful.

The Conda support can be endless tweaked but the defaults are defaults that target the best practice Conda channels that work well for the Galaxy project. Additional SoftwareRequirement resolution options are available including targetting Software Modules, Homebrew, simple scripts called "Galaxy packages". All of these options can be specified and configured with a YAML file passed to cwltoil using the ``--beta-dependency-resolvers-configuration`` option instead of the simple shortcut ``--beta-conda-dependencies``. The cwltool documentation walks through a few examples of adapting infrastructure to tools and tools to package managers.

In addition to options that allow configuring tool execution environments, containers themselves can be discovered and/or built from these software requirements. The [Biocontainers](https://github.com/BioContainers) project (previously Biodocker) contains a registry we use for this purpose. Every version of every Bioconda package has a corresponding best-practice (very lightweight, very small) Docker container on quay.io. There are over 2300 such containers currently.

Continuing with the example above, the new `--beta-use-biocontainers` flag instructs cwltoil to fetch the corresponding Biocontainers container from quay.io automatically or build one to use locally (required for instance for tools with multiple software requirements - fat tools).

```
cwltoil --beta-use-biocontainers tests/seqtk_seq.cwl tests/seqtk_seq_job.json
```

These containers contain the same binaries that the package would use locally (outside of Docker). Therefore this technique allows cross platform reproducibility/remixability across cwltool, cwltoil, Galaxy, and CLI - both inside and outside of containers.
@mr-c
Copy link
Contributor

mr-c commented Jul 14, 2017

Jenkins, test this please

@ejacox
Copy link
Contributor

ejacox commented Jul 14, 2017

Jenkins, test this please.

@mr-c
Copy link
Contributor

mr-c commented Jul 15, 2017

Hey @jmchilton , the conformance tests don't pass with this branch

73 tests passed, 5 failures, 9 unsupported features
--- Running conformance test v1.0 on /mnt/ephemeral/workspace/toil-pull-requests/venv/bin/cwltoil ---
3.9.0a1
Test [1/87] 
Test [2/87] 
Test [3/87] 
Test [4/87] 
Test [5/87] 
Test [6/87] 
Test [7/87] 
Test [8/87] 
Test [9/87] 
Test [10/87] 
Test [11/87] 
Test [12/87] 
Test [13/87] 
Test [14/87] 
Test [15/87] 
Test [16/87] 
Test [17/87] 
Test [18/87] 
Test [19/87] 
Test [20/87] 
Test [21/87] 
Test failed: /mnt/ephemeral/workspace/toil-pull-requests/venv/bin/cwltoil --outdir=/mnt/ephemeral/tmp/tmpsFWfaB --quiet v1.0/count-lines1-wf.cwl v1.0/wc-job.json
Test two step workflow with imported tools
Returned non-zero
Exception in thread Thread-14:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 754, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/mnt/ephemeral/workspace/toil-pull-requests/src/toil/fileStore.py", line 1468, in asyncWrite
    raise RuntimeError("The termination flag is set, exiting")
RuntimeError: The termination flag is set, exiting
Exception in thread Thread-13:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 754, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/mnt/ephemeral/workspace/toil-pull-requests/src/toil/fileStore.py", line 1468, in asyncWrite
    raise RuntimeError("The termination flag is set, exiting")
RuntimeError: The termination flag is set, exiting

Exception RuntimeError: RuntimeError('cannot join current thread',) in <bound method CachingFileStore.del of <toil.fileStore.CachingFileStore object at 0x2b0a0df23b10>> ignored
Traceback (most recent call last):
File "/mnt/ephemeral/workspace/toil-pull-requests/venv/bin/cwltoil", line 9, in
load_entry_point('toil', 'console_scripts', 'cwltoil')()
File "/mnt/ephemeral/workspace/toil-pull-requests/src/toil/cwl/cwltoil.py", line 786, in main
outobj = toil.start(wf1)
File "/mnt/ephemeral/workspace/toil-pull-requests/src/toil/common.py", line 711, in start
return self._runMainLoop(rootJobGraph)
File "/mnt/ephemeral/workspace/toil-pull-requests/src/toil/common.py", line 969, in _runMainLoop
jobCache=self._jobCache).run()
File "/mnt/ephemeral/workspace/toil-pull-requests/src/toil/leader.py", line 201, in run
raise FailedJobsException(self.config.jobStore, self.toilState.totalFailedJobs, self.jobStore)
toil.leader.FailedJobsException: The job store 'file:/mnt/ephemeral/tmp/tmpzzlmED' contains 1 failed jobs: 'file:///mnt/ephemeral/workspace/toil-pull-requests/src/toil/test/cwl/spec/v1.0/v1.0/parseInt-tool.cwl' p/t/job6J94Hj
=========> Failed job 'file:///mnt/ephemeral/workspace/toil-pull-requests/src/toil/test/cwl/spec/v1.0/v1.0/parseInt-tool.cwl' p/t/job6J94Hj
---TOIL WORKER OUTPUT LOG---
[job wc-tool.cwl] /mnt/ephemeral/tmp/tmpq_bVlX$ wc < /mnt/ephemeral/tmp/tmpkQ90xf/stg4da95d15-fede-46ef-bfbd-1f1ab38e6e4c/whale.txt > /mnt/ephemeral/tmp/tmpq_bVlX/output
INFO:cwltool:[job wc-tool.cwl] /mnt/ephemeral/tmp/tmpq_bVlX$ wc < /mnt/ephemeral/tmp/tmpkQ90xf/stg4da95d15-fede-46ef-bfbd-1f1ab38e6e4c/whale.txt > /mnt/ephemeral/tmp/tmpq_bVlX/output
[job wc-tool.cwl] completed success
INFO:cwltool:[job wc-tool.cwl] completed success
Failed to evaluate expression:
Expression evaluation error:
("Syntax error in parameter reference '%s' or used Javascript code without specifying InlineJavascriptRequirement.", "({'output': parseInt(inputs.file1.contents)})")
WARNING:cwltool:Failed to evaluate expression:
Expression evaluation error:
("Syntax error in parameter reference '%s' or used Javascript code without specifying InlineJavascriptRequirement.", "({'output': parseInt(inputs.file1.contents)})")
Traceback (most recent call last):
File "/mnt/ephemeral/workspace/toil-pull-requests/src/toil/worker.py", line 340, in main
job._runner(jobGraph=jobGraph, jobStore=jobStore, fileStore=fileStore)
File "/mnt/ephemeral/workspace/toil-pull-requests/src/toil/job.py", line 1289, in _runner
returnValues = self._run(jobGraph, fileStore)
File "/mnt/ephemeral/workspace/toil-pull-requests/src/toil/job.py", line 1234, in _run
return self.run(fileStore)
File "/mnt/ephemeral/workspace/toil-pull-requests/src/toil/cwl/cwltoil.py", line 309, in run
raise cwltool.errors.WorkflowException(status)
WorkflowException: permanentFail
ERROR:toil.worker:Exiting the worker because of a failed job on host ip-172-31-22-70
<=========

Test [22/87]
Test failed: /mnt/ephemeral/workspace/toil-pull-requests/venv/bin/cwltoil --outdir=/mnt/ephemeral/tmp/tmpjI4PIE --quiet v1.0/count-lines2-wf.cwl v1.0/wc-job.json
Test two step workflow with inline tools
Returned non-zero
Exception in thread Thread-14:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 754, in run
self.__target(*self.__args, **self.__kwargs)
File "/mnt/ephemeral/workspace/toil-pull-requests/src/toil/fileStore.py", line 1468, in asyncWrite
raise RuntimeError("The termination flag is set, exiting")
RuntimeError: The termination flag is set, exiting
Exception in thread Thread-13:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 754, in run
self.__target(*self.__args, **self.__kwargs)
File "/mnt/ephemeral/workspace/toil-pull-requests/src/toil/fileStore.py", line 1468, in asyncWrite
raise RuntimeError("The termination flag is set, exiting")
RuntimeError: The termination flag is set, exiting

Traceback (most recent call last):
File "/mnt/ephemeral/workspace/toil-pull-requests/venv/bin/cwltoil", line 9, in
load_entry_point('toil', 'console_scripts', 'cwltoil')()
File "/mnt/ephemeral/workspace/toil-pull-requests/src/toil/cwl/cwltoil.py", line 786, in main
outobj = toil.start(wf1)
File "/mnt/ephemeral/workspace/toil-pull-requests/src/toil/common.py", line 711, in start
return self._runMainLoop(rootJobGraph)
File "/mnt/ephemeral/workspace/toil-pull-requests/src/toil/common.py", line 969, in _runMainLoop
jobCache=self._jobCache).run()
File "/mnt/ephemeral/workspace/toil-pull-requests/src/toil/leader.py", line 201, in run
raise FailedJobsException(self.config.jobStore, self.toilState.totalFailedJobs, self.jobStore)
toil.leader.FailedJobsException: The job store 'file:/mnt/ephemeral/tmp/tmpUx6zBu' contains 1 failed jobs: 'file:///mnt/ephemeral/workspace/toil-pull-requests/src/toil/test/cwl/spec/v1.0/v1.0/count-lines2-wf.cwl#step2/2d23745d-a95d-4a0c-b3a5-b3b396c06f9b' m/e/job78XbDR
=========> Failed job 'file:///mnt/ephemeral/workspace/toil-pull-requests/src/toil/test/cwl/spec/v1.0/v1.0/count-lines2-wf.cwl#step2/2d23745d-a95d-4a0c-b3a5-b3b396c06f9b' m/e/job78XbDR
---TOIL WORKER OUTPUT LOG---
[job wc] /mnt/ephemeral/tmp/tmp089xA2$ wc
/mnt/ephemeral/tmp/tmpJz6Nya/stgab8a29b1-21b6-4a07-aa1f-75e7399f8e5f/whale.txt > /mnt/ephemeral/tmp/tmp089xA2/output.txt
INFO:cwltool:[job wc] /mnt/ephemeral/tmp/tmp089xA2$ wc
/mnt/ephemeral/tmp/tmpJz6Nya/stgab8a29b1-21b6-4a07-aa1f-75e7399f8e5f/whale.txt > /mnt/ephemeral/tmp/tmp089xA2/output.txt
[job wc] completed success
INFO:cwltool:[job wc] completed success
Failed to evaluate expression:
Expression evaluation error:

evalmachine.:25
(function(){return {'parseInt_output': parseInt(inputs.parseInt_file1.contents)};})()
^

TypeError: Cannot read property 'contents' of undefined
at evalmachine.:25:70
at evalmachine.:25:84
at ContextifyScript.Script.runInContext (vm.js:53:29)
at ContextifyScript.Script.runInNewContext (vm.js:59:15)
at Object.runInNewContext (vm.js:112:38)
at Socket. ([eval]:10:55)
at emitOne (events.js:115:13)
at Socket.emit (events.js:210:7)
at addChunk (_stream_readable.js:252:12)
at readableAddChunk (_stream_readable.js:235:13)
WARNING:cwltool:Failed to evaluate expression:
Expression evaluation error:

evalmachine.:25
(function(){return {'parseInt_output': parseInt(inputs.parseInt_file1.contents)};})()
^

TypeError: Cannot read property 'contents' of undefined
at evalmachine.:25:70
at evalmachine.:25:84
at ContextifyScript.Script.runInContext (vm.js:53:29)
at ContextifyScript.Script.runInNewContext (vm.js:59:15)
at Object.runInNewContext (vm.js:112:38)
at Socket. ([eval]:10:55)
at emitOne (events.js:115:13)
at Socket.emit (events.js:210:7)
at addChunk (_stream_readable.js:252:12)
at readableAddChunk (_stream_readable.js:235:13)
Traceback (most recent call last):
File "/mnt/ephemeral/workspace/toil-pull-requests/src/toil/worker.py", line 340, in main
job._runner(jobGraph=jobGraph, jobStore=jobStore, fileStore=fileStore)
File "/mnt/ephemeral/workspace/toil-pull-requests/src/toil/job.py", line 1289, in _runner
returnValues = self._run(jobGraph, fileStore)
File "/mnt/ephemeral/workspace/toil-pull-requests/src/toil/job.py", line 1234, in _run
return self.run(fileStore)
File "/mnt/ephemeral/workspace/toil-pull-requests/src/toil/cwl/cwltoil.py", line 309, in run
raise cwltool.errors.WorkflowException(status)
WorkflowException: permanentFail
ERROR:toil.worker:Exiting the worker because of a failed job on host ip-172-31-22-70
<=========

Test [23/87]
Test [24/87]
Test [25/87]
Test [26/87]
Test [27/87]
Test [28/87]
Test [29/87]
Test [30/87]
Test [31/87]
Test [32/87]
Test [33/87]
Test [34/87]
Test [35/87]
Test failed: /mnt/ephemeral/workspace/toil-pull-requests/venv/bin/cwltoil --outdir=/mnt/ephemeral/tmp/tmpztV04S --quiet v1.0/count-lines8-wf.cwl v1.0/wc-job.json
Test nested workflow
Returned non-zero
Exception in thread Thread-20:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 754, in run
self.__target(*self.__args, **self.__kwargs)
File "/mnt/ephemeral/workspace/toil-pull-requests/src/toil/fileStore.py", line 1468, in asyncWrite
raise RuntimeError("The termination flag is set, exiting")
RuntimeError: The termination flag is set, exiting

Exception in thread Thread-19:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 754, in run
self.__target(*self.__args, **self.__kwargs)
File "/mnt/ephemeral/workspace/toil-pull-requests/src/toil/fileStore.py", line 1468, in asyncWrite
raise RuntimeError("The termination flag is set, exiting")
RuntimeError: The termination flag is set, exiting

Exception RuntimeError: RuntimeError('cannot join current thread',) in <bound method CachingFileStore.del of <toil.fileStore.CachingFileStore object at 0x2b67dfe46510>> ignored
Traceback (most recent call last):
File "/mnt/ephemeral/workspace/toil-pull-requests/venv/bin/cwltoil", line 9, in
load_entry_point('toil', 'console_scripts', 'cwltoil')()
File "/mnt/ephemeral/workspace/toil-pull-requests/src/toil/cwl/cwltoil.py", line 786, in main
outobj = toil.start(wf1)
File "/mnt/ephemeral/workspace/toil-pull-requests/src/toil/common.py", line 711, in start
return self._runMainLoop(rootJobGraph)
File "/mnt/ephemeral/workspace/toil-pull-requests/src/toil/common.py", line 969, in _runMainLoop
jobCache=self._jobCache).run()
File "/mnt/ephemeral/workspace/toil-pull-requests/src/toil/leader.py", line 201, in run
raise FailedJobsException(self.config.jobStore, self.toilState.totalFailedJobs, self.jobStore)
toil.leader.FailedJobsException: The job store 'file:/mnt/ephemeral/tmp/tmpZaMtQl' contains 1 failed jobs: 'file:///mnt/ephemeral/workspace/toil-pull-requests/src/toil/test/cwl/spec/v1.0/v1.0/parseInt-tool.cwl' m/J/jobeK5Eqs
=========> Failed job 'file:///mnt/ephemeral/workspace/toil-pull-requests/src/toil/test/cwl/spec/v1.0/v1.0/parseInt-tool.cwl' m/J/jobeK5Eqs
---TOIL WORKER OUTPUT LOG---
[job wc-tool.cwl] /mnt/ephemeral/tmp/tmpT2V3Jg$ wc < /mnt/ephemeral/tmp/tmpLWjRsa/stgef6ae2be-c738-4243-9160-5dcb7d545812/whale.txt > /mnt/ephemeral/tmp/tmpT2V3Jg/output
INFO:cwltool:[job wc-tool.cwl] /mnt/ephemeral/tmp/tmpT2V3Jg$ wc < /mnt/ephemeral/tmp/tmpLWjRsa/stgef6ae2be-c738-4243-9160-5dcb7d545812/whale.txt > /mnt/ephemeral/tmp/tmpT2V3Jg/output
[job wc-tool.cwl] completed success
INFO:cwltool:[job wc-tool.cwl] completed success
Failed to evaluate expression:
Expression evaluation error:
("Syntax error in parameter reference '%s' or used Javascript code without specifying InlineJavascriptRequirement.", "({'output': parseInt(inputs.file1.contents)})")
WARNING:cwltool:Failed to evaluate expression:
Expression evaluation error:
("Syntax error in parameter reference '%s' or used Javascript code without specifying InlineJavascriptRequirement.", "({'output': parseInt(inputs.file1.contents)})")
Traceback (most recent call last):
File "/mnt/ephemeral/workspace/toil-pull-requests/src/toil/worker.py", line 340, in main
job._runner(jobGraph=jobGraph, jobStore=jobStore, fileStore=fileStore)
File "/mnt/ephemeral/workspace/toil-pull-requests/src/toil/job.py", line 1289, in _runner
returnValues = self._run(jobGraph, fileStore)
File "/mnt/ephemeral/workspace/toil-pull-requests/src/toil/job.py", line 1234, in _run
return self.run(fileStore)
File "/mnt/ephemeral/workspace/toil-pull-requests/src/toil/cwl/cwltoil.py", line 309, in run
raise cwltool.errors.WorkflowException(status)
WorkflowException: permanentFail
ERROR:toil.worker:Exiting the worker because of a failed job on host ip-172-31-22-70
<=========

Test [36/87]
Test [37/87]
Test [38/87]
Test [39/87]
Test [40/87]
Test [41/87]
Test [42/87]
Test [43/87]
Test [44/87]
Test [45/87]
Test [46/87]
Test [47/87]
Test [48/87]
Test [49/87]
Test [50/87]
Test [51/87]
Test [52/87]
Test [53/87]
Test [54/87]
Test failed: /mnt/ephemeral/workspace/toil-pull-requests/venv/bin/cwltoil --outdir=/mnt/ephemeral/tmp/tmphXURxr --quiet v1.0/step-valuefrom-wf.cwl v1.0/step-valuefrom-wf.json
Test valueFrom on workflow step.
Returned non-zero
Exception in thread Thread-14:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 754, in run
self.__target(*self.__args, **self.__kwargs)
File "/mnt/ephemeral/workspace/toil-pull-requests/src/toil/fileStore.py", line 1468, in asyncWrite
raise RuntimeError("The termination flag is set, exiting")
RuntimeError: The termination flag is set, exiting
Exception in thread Thread-13:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 754, in run
self.__target(*self.__args, **self.__kwargs)
File "/mnt/ephemeral/workspace/toil-pull-requests/src/toil/fileStore.py", line 1468, in asyncWrite
raise RuntimeError("The termination flag is set, exiting")
RuntimeError: The termination flag is set, exiting

Exception RuntimeError: RuntimeError('cannot join current thread',) in <bound method CachingFileStore.del of <toil.fileStore.CachingFileStore object at 0x2ac97cf29dd0>> ignored
Traceback (most recent call last):
File "/mnt/ephemeral/workspace/toil-pull-requests/venv/bin/cwltoil", line 9, in
load_entry_point('toil', 'console_scripts', 'cwltoil')()
File "/mnt/ephemeral/workspace/toil-pull-requests/src/toil/cwl/cwltoil.py", line 786, in main
outobj = toil.start(wf1)
File "/mnt/ephemeral/workspace/toil-pull-requests/src/toil/common.py", line 711, in start
return self._runMainLoop(rootJobGraph)
File "/mnt/ephemeral/workspace/toil-pull-requests/src/toil/common.py", line 969, in _runMainLoop
jobCache=self._jobCache).run()
File "/mnt/ephemeral/workspace/toil-pull-requests/src/toil/leader.py", line 201, in run
raise FailedJobsException(self.config.jobStore, self.toilState.totalFailedJobs, self.jobStore)
toil.leader.FailedJobsException: The job store 'file:/mnt/ephemeral/tmp/tmpCZynSk' contains 1 failed jobs: 'file:///mnt/ephemeral/workspace/toil-pull-requests/src/toil/test/cwl/spec/v1.0/v1.0/parseInt-tool.cwl' T/z/jobUYFPwN
=========> Failed job 'file:///mnt/ephemeral/workspace/toil-pull-requests/src/toil/test/cwl/spec/v1.0/v1.0/parseInt-tool.cwl' T/z/jobUYFPwN
---TOIL WORKER OUTPUT LOG---
[job wc-tool.cwl] /mnt/ephemeral/tmp/tmpK2ned1$ wc < /mnt/ephemeral/tmp/tmpHT5FVe/stg154758f1-1b0b-4764-b2d4-60a64a4dad6b/whale.txt > /mnt/ephemeral/tmp/tmpK2ned1/output
INFO:cwltool:[job wc-tool.cwl] /mnt/ephemeral/tmp/tmpK2ned1$ wc < /mnt/ephemeral/tmp/tmpHT5FVe/stg154758f1-1b0b-4764-b2d4-60a64a4dad6b/whale.txt > /mnt/ephemeral/tmp/tmpK2ned1/output
[job wc-tool.cwl] completed success
INFO:cwltool:[job wc-tool.cwl] completed success
Failed to evaluate expression:
Expression evaluation error:
("Syntax error in parameter reference '%s' or used Javascript code without specifying InlineJavascriptRequirement.", "({'output': parseInt(inputs.file1.contents)})")
WARNING:cwltool:Failed to evaluate expression:
Expression evaluation error:
("Syntax error in parameter reference '%s' or used Javascript code without specifying InlineJavascriptRequirement.", "({'output': parseInt(inputs.file1.contents)})")
Traceback (most recent call last):
File "/mnt/ephemeral/workspace/toil-pull-requests/src/toil/worker.py", line 340, in main
job._runner(jobGraph=jobGraph, jobStore=jobStore, fileStore=fileStore)
File "/mnt/ephemeral/workspace/toil-pull-requests/src/toil/job.py", line 1289, in _runner
returnValues = self._run(jobGraph, fileStore)
File "/mnt/ephemeral/workspace/toil-pull-requests/src/toil/job.py", line 1234, in _run
return self.run(fileStore)
File "/mnt/ephemeral/workspace/toil-pull-requests/src/toil/cwl/cwltoil.py", line 309, in run
raise cwltool.errors.WorkflowException(status)
WorkflowException: permanentFail
ERROR:toil.worker:Exiting the worker because of a failed job on host ip-172-31-22-70
<=========

Test [55/87]
Test [56/87]
Test [57/87]
Test [58/87]
Test [59/87]
Test [60/87]
Test [61/87]
Test [62/87]
Test [63/87]
Test [64/87]
Test [65/87]
Test [66/87]
Test [67/87]
Test [68/87]
Test [69/87]
Test [70/87]
Test [71/87]
Test [72/87]
Test [73/87]
Test [74/87]
Test [75/87]
Test [76/87]
Test [77/87]
Test [78/87]
Test [79/87]
Test [80/87]
Test [81/87]
Test [82/87]
Test failed: /mnt/ephemeral/workspace/toil-pull-requests/venv/bin/cwltoil --outdir=/mnt/ephemeral/tmp/tmpN5q4YR --quiet v1.0/count-lines10-wf.cwl v1.0/wc-job.json
Test embedded subworkflow
Returned non-zero
Exception in thread Thread-19:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 754, in run
self.__target(*self.__args, **self.__kwargs)
File "/mnt/ephemeral/workspace/toil-pull-requests/src/toil/fileStore.py", line 1468, in asyncWrite
raise RuntimeError("The termination flag is set, exiting")
RuntimeError: The termination flag is set, exiting
Exception in thread Thread-20:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 754, in run
self.__target(*self.__args, **self.__kwargs)
File "/mnt/ephemeral/workspace/toil-pull-requests/src/toil/fileStore.py", line 1468, in asyncWrite
raise RuntimeError("The termination flag is set, exiting")
RuntimeError: The termination flag is set, exiting

Exception RuntimeError: RuntimeError('cannot join current thread',) in <bound method CachingFileStore.del of <toil.fileStore.CachingFileStore object at 0x2b6bbe6004d0>> ignored
Traceback (most recent call last):
File "/mnt/ephemeral/workspace/toil-pull-requests/venv/bin/cwltoil", line 9, in
load_entry_point('toil', 'console_scripts', 'cwltoil')()
File "/mnt/ephemeral/workspace/toil-pull-requests/src/toil/cwl/cwltoil.py", line 786, in main
outobj = toil.start(wf1)
File "/mnt/ephemeral/workspace/toil-pull-requests/src/toil/common.py", line 711, in start
return self._runMainLoop(rootJobGraph)
File "/mnt/ephemeral/workspace/toil-pull-requests/src/toil/common.py", line 969, in runMainLoop
jobCache=self.jobCache).run()
File "/mnt/ephemeral/workspace/toil-pull-requests/src/toil/leader.py", line 201, in run
raise FailedJobsException(self.config.jobStore, self.toilState.totalFailedJobs, self.jobStore)
toil.leader.FailedJobsException: The job store 'file:/mnt/ephemeral/tmp/tmpcXOHgU' contains 1 failed jobs: 'file:///mnt/ephemeral/workspace/toil-pull-requests/src/toil/test/cwl/spec/v1.0/v1.0/parseInt-tool.cwl' g/v/job93N_p

=========> Failed job 'file:///mnt/ephemeral/workspace/toil-pull-requests/src/toil/test/cwl/spec/v1.0/v1.0/parseInt-tool.cwl' g/v/job93N_p

---TOIL WORKER OUTPUT LOG---
[job wc-tool.cwl] /mnt/ephemeral/tmp/tmpGU1XNd$ wc < /mnt/ephemeral/tmp/tmpvWIfar/stge234c060-50c7-477f-a8d1-7cd381e48f3a/whale.txt > /mnt/ephemeral/tmp/tmpGU1XNd/output
INFO:cwltool:[job wc-tool.cwl] /mnt/ephemeral/tmp/tmpGU1XNd$ wc < /mnt/ephemeral/tmp/tmpvWIfar/stge234c060-50c7-477f-a8d1-7cd381e48f3a/whale.txt > /mnt/ephemeral/tmp/tmpGU1XNd/output
[job wc-tool.cwl] completed success
INFO:cwltool:[job wc-tool.cwl] completed success
Failed to evaluate expression:
Expression evaluation error:
("Syntax error in parameter reference '%s' or used Javascript code without specifying InlineJavascriptRequirement.", "({'output': parseInt(inputs.file1.contents)})")
WARNING:cwltool:Failed to evaluate expression:
Expression evaluation error:
("Syntax error in parameter reference '%s' or used Javascript code without specifying InlineJavascriptRequirement.", "({'output': parseInt(inputs.file1.contents)})")
Traceback (most recent call last):
File "/mnt/ephemeral/workspace/toil-pull-requests/src/toil/worker.py", line 340, in main
job._runner(jobGraph=jobGraph, jobStore=jobStore, fileStore=fileStore)
File "/mnt/ephemeral/workspace/toil-pull-requests/src/toil/job.py", line 1289, in _runner
returnValues = self._run(jobGraph, fileStore)
File "/mnt/ephemeral/workspace/toil-pull-requests/src/toil/job.py", line 1234, in _run
return self.run(fileStore)
File "/mnt/ephemeral/workspace/toil-pull-requests/src/toil/cwl/cwltoil.py", line 309, in run
raise cwltool.errors.WorkflowException(status)
WorkflowException: permanentFail
ERROR:toil.worker:Exiting the worker because of a failed job on host ip-172-31-22-70
<=========

Test [83/87]
Test [84/87]
Test [85/87]
Test [86/87]
Test [87/87]
73 tests passed, 5 failures, 9 unsupported features

1 tool tests failed

@jmchilton
Copy link
Contributor Author

jmchilton commented Jul 15, 2017

@mr-c Yes... interesting. My guess is that it is unrelated to my changes and is just the update to cwltool - but I don't really know. Do people mind if I create a little more noise and open a second PR that just updates cwltool and doesn't include the rest of my changes - that way we could know for sure if it is these changes or some other change in cwltool?

@mr-c
Copy link
Contributor

mr-c commented Jul 15, 2017

@jmchilton go for it

jmchilton added a commit to jmchilton/toil that referenced this pull request Jul 17, 2017
@mr-c mr-c added the cwl label Jul 18, 2017
@ejacox
Copy link
Contributor

ejacox commented Jul 20, 2017

Jenkins add to whitelist

@benedictpaten
Copy link
Contributor

hey @tetron , how does this relate to your changes? Would be good to synch on this.

@tetron
Copy link
Contributor

tetron commented Aug 25, 2017

@benedictpaten it looks like the changes to cwltoil made by this PR are relatively small because it is just enabling the underlying functionality in cwltool, so the merge conflict is likely easy to resolve. However this isn't my thing (I haven't used this feature wouldn't know how to test it) so I'd look to @jmchilton or @mr-c to handle it.

@benedictpaten
Copy link
Contributor

Hey @jmchilton - any update on this? Happy to push this through if possible.

@mr-c
Copy link
Contributor

mr-c commented Aug 29, 2017

I may have screwed up the merge -- manually running the examples at https://github.com/common-workflow-language/cwltool#leveraging-softwarerequirements-beta doesn't work for me using cwltoil. Looks like this PR should add some tests.

I think the missing key is 62bdd2e#diff-ee480085fcce06066f78f98d1188e663R766 which was refactored out by @tetron 's v1.0.1 PR.

@ejacox
Copy link
Contributor

ejacox commented Sep 20, 2017

Tests are passing now. Is this ready to merge?

@jmchilton
Copy link
Contributor Author

jmchilton commented Sep 20, 2017

I'm not sure - I'd want to test it some more. I'm going to close it for now and I'll reopen once I have some time to work through the details again after the merge of 1.0.1 support. Thanks for being open to merging it though - that is really great news!

@ejacox
Copy link
Contributor

ejacox commented Sep 20, 2017

OK. Thank you for the update @jmchilton

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

Successfully merging this pull request may close these issues.

8 participants