common-workflow-language / common-workflow-language/cwltool

Not all conformance tests pass with udocker

Open
#782 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
376
Forks
255
Avg merge
2d 7h
Merged PRs (30d)
12

Description

---

## Expected Behavior
Conformance tests should all pass

## Actual Behavior
3 fail

## Workflow Code
```
./run_test.sh EXTRA=--user-space-docker-cmd=/home/ubuntu/udocker
```

## Full Traceback
```pytb
--- Running conformance test v1.0 on /home/ubuntu/.local/bin/cwl-runner ---
/home/ubuntu/.local/bin/cwl-runner 1.0.20180525185854
Test [1/131] General test of command line generation
Test [2/131] Test nested prefixes with arrays
Test [3/131] Test nested command line bindings
Test [4/131] Test command line with optional input (missing)
Test [5/131] Test command line with optional input (provided)
Test [6/131] Test InitialWorkDirRequirement ExpressionEngineRequirement.engineConfig feature
Test [7/131] Test command execution in Docker with stdout redirection
Test [8/131] Test command execution in Docker with simplified syntax stdout redirection
Test [9/131] Test command execution in Docker with stdout redirection
Test [10/131] Test command line with stderr redirection
Test [11/131] Test command line with stderr redirection, brief syntax
Test [12/131] Test command line with stderr redirection, named brief syntax
Test [13/131] Test command execution in Docker with stdin and stdout redirection
Test [14/131] Test default usage of Any in expressions.
Test [15/131] Test explicitly passing null to Any type inputs with default values.
Test [16/131] Testing the string 'null' does not trip up an Any with a default value.
Test [17/131] Test Any without defaults can be unspecified.
Test [18/131] Test explicitly passing null to Any type without a default value.
Test [19/131] Testing the string 'null' does not trip up an Any without a default value.
Test [20/131] Testing Any type compatibility in outputSource
Test [21/131] Test command execution in with stdin and stdout redirection
Test [22/131] Test ExpressionTool with Docker-based expression engine
Test [23/131] Test outputEval to transform output
Test [24/131] Test two step workflow with imported tools
Test [25/131] Test two step workflow with inline tools
Test [26/131] Test single step workflow with Scatter step
Test [27/131] Test single step workflow with Scatter step and two data links connected to
same input, default merge behavior

Test [28/131] Test single step workflow with Scatter step and two data links connected to
same input, nested merge behavior

Test [29/131] Test single step workflow with Scatter step and two data links connected to
same input, flattened merge behavior

Test [30/131] Test that no MultipleInputFeatureRequirement is necessary when
workflow step source is a single-item list

Test [31/131] Test workflow with default value for input parameter (missing)
Test [32/131] Test workflow with default value for input parameter (provided)
Test [33/131] Test that workflow defaults override tool defaults
Test [34/131] Test EnvVarRequirement
Test [35/131] Test workflow scatter with single scatter parameter
Test [36/131] Test workflow scatter with two scatter parameters and nested_crossproduct join method
Test [37/131] Test workflow scatter with two scatter parameters and flat_crossproduct join method
Test [38/131] Test workflow scatter with two scatter parameters and dotproduct join method
Test [39/131] Test workflow scatter with single empty list parameter
Test [40/131] Test workflow scatter with two scatter parameters and nested_crossproduct join method with second list empty
Test [41/131] Test workflow scatter with two scatter parameters and nested_crossproduct join method with first list empty
Test [42/131] Test workflow scatter with two scatter parameters, one of which is empty and flat_crossproduct join method
Test [43/131] Test workflow scatter with two empty scatter parameters and dotproduct join method
Test [44/131] Test Any type input parameter
Test [45/131] Test nested workflow
Test [46/131] Test requirement priority
Test [47/131] Test requirements override hints
Test [48/131] Test requirements on workflow steps
Test [49/131] Test default value on step input parameter
Test [50/131] Test use default value on step input parameter with empty source
Test [51/131] Test use default value on step input parameter with null source
Test [52/131] Test default value on step input parameter overridden by provided source
Test [53/131] Test simple workflow
Test [54/131] Test unknown hints are ignored.
Test [55/131] Test InitialWorkDirRequirement linking input files and capturing secondaryFiles
on input and output. Also tests the use of a variety of parameter references
and expressions in the secondaryFiles field.

Test [56/131] Test InitialWorkDirRequirement with expression in filename.

Test [57/131] Test if trailing newline is present in file entry in InitialWorkDir
Test [58/131] Test inline expressions

Test [59/131] Test SchemaDefRequirement definition used in tool parameter

Test [60/131] Test SchemaDefRequirement definition used in workflow parameter

Test [61/131] Test parameter evaluation, no support for JS expressions

Test [62/131] Test parameter evaluation, with support for JS expressions

Test [63/131] Test metadata
Test [64/131] Test simple format checking.

Test [65/131] Test format checking against ontology using subclassOf.

Test [66/131] Test format checking against ontology using equivalentClass.

Test [67/131] Test optional output file and optional secondaryFile on output.

Test [68/131] Test that second expression in concatenated valueFrom is not ignored
Test [69/131] Test valueFrom on workflow step.
Test [70/131] Test valueFrom on workflow step with multiple sources
Test [71/131] Test valueFrom on workflow step referencing other inputs
Test [72/131] Test record type output binding.
Test [73/131] Test support for reading cwl.output.json when running in a Docker container
and just 'path' is provided.

Test failed: /home/ubuntu/.local/bin/cwl-runner --user-space-docker-cmd=/home/ubuntu/udocker --outdir=/tmp/tmpG1CCYH --quiet v1.0/test-cwl-out.cwl v1.0/empty.json
Test support for reading cwl.output.json when running in a Docker container
and just 'path' is provided.

Returned non-zero

******************************************************************************
* *
* STARTING e743cc2b-4a84-3645-b0af-958b50f3035b *
* *
******************************************************************************
executing: sh
Exception while running job
Traceback (most recent call last):
File "/home/ubuntu/.local/lib/python2.7/site-packages/cwltool/job.py", line 267, in _execute
outputs = self.collect_outputs(self.outdir)
File "/home/ubuntu/.local/lib/python2.7/site-packages/cwltool/command_line_tool.py", line 550, in collect_output_ports
ret = json.load(f)
File "/usr/lib/python2.7/json/__init__.py", line 291, in load
**kw)
File "/usr/lib/python2.7/json/__init__.py", line 339, in loads
return _default_decoder.decode(s)
File "/usr/lib/python2.7/json/decoder.py", line 364, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python2.7/json/decoder.py", line 380, in raw_decode
obj, end = self.scan_once(s, idx)
ValueError: Expecting property name enclosed in double quotes: line 1 column 2 (char 1)
[job test-cwl-out.cwl] completed permanentFail
Final process status is permanentFail

Test [74/131] Test support for reading cwl.output.json when running in a Docker container
and just 'location' is provided.

Test failed: /home/ubuntu/.local/bin/cwl-runner --user-space-docker-cmd=/home/ubuntu/udocker --outdir=/tmp/tmpSCzsWi --quiet v1.0/test-cwl-out2.cwl v1.0/empty.json
Test support for reading cwl.output.json when running in a Docker container
and just 'location' is provided.

Returned non-zero

******************************************************************************
* *
* STARTING c29df17f-5b82-30be-93f0-42c43e0bcdbb *
* *
******************************************************************************
executing: sh
Exception while running job
Traceback (most recent call last):
File "/home/ubuntu/.local/lib/python2.7/site-packages/cwltool/job.py", line 267, in _execute
outputs = self.collect_outputs(self.outdir)
File "/home/ubuntu/.local/lib/python2.7/site-packages/cwltool/command_line_tool.py", line 550, in collect_output_ports
ret = json.load(f)
File "/usr/lib/python2.7/json/__init__.py", line 291, in load
**kw)
File "/usr/lib/python2.7/json/__init__.py", line 339, in loads
return _default_decoder.decode(s)
File "/usr/lib/python2.7/json/decoder.py", line 364, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python2.7/json/decoder.py", line 380, in raw_decode
obj, end = self.scan_once(s, idx)
ValueError: Expecting property name enclosed in double quotes: line 1 column 2 (char 1)
[job test-cwl-out2.cwl] completed permanentFail
Final process status is permanentFail

Test [75/131] Test support for returning multiple glob patterns from expression
Test [76/131] Test workflow scatter with single scatter parameter and valueFrom on step input
Test [77/131] Test workflow scatter with two scatter parameters and nested_crossproduct join method and valueFrom on step input
Test [78/131] Test workflow scatter with two scatter parameters and flat_crossproduct join method and valueFrom on step input
Test [79/131] Test workflow scatter with two scatter parameters and dotproduct join method and valueFrom on step input
Test [80/131] Test workflow scatter with single scatter parameter and valueFrom on step input
Test [81/131] Test valueFrom eval on scattered input parameter
Test [82/131] Test workflow two input files with same name.
Test [83/131] Test directory input with parameter reference
Test [84/131] Test directory input in Docker
Test [85/131] Test directory output
Test [86/131] Test directories in secondaryFiles
Test [87/131] Test dynamic initial work dir
Test [88/131] Test writable staged files.
Test [89/131] Test file literal as input
Test [90/131] Test expression in InitialWorkDir listing
Test [91/131] Test nameroot/nameext expression in arguments, stdout
Test [92/131] Test directory input with inputBinding
Test [93/131] Test command line generation of array-of-arrays
Test [94/131] Test $HOME and $TMPDIR are set correctly
Test [95/131] Test $HOME and $TMPDIR are set correctly in Docker
Test failed: /home/ubuntu/.local/bin/cwl-runner --user-space-docker-cmd=/home/ubuntu/udocker --outdir=/tmp/tmpCnK5Yr --quiet v1.0/envvar2.cwl v1.0/empty.json
Test $HOME and $TMPDIR are set correctly in Docker
Returned non-zero

******************************************************************************
* *
* STARTING 70b18688-513f-3c81-856e-968005381a50 *
* *
******************************************************************************
executing: sh
HOME= TMPDIR=
/bin/sh: 1: test: =: unexpected operator
[job envvar2.cwl] completed permanentFail
Final process status is permanentFail

Test [96/131] Test that expressionLib requirement of individual tool step overrides expressionLib of workflow.
Test [97/131] Test output of InitialWorkDir
Test [98/131] Test embedded subworkflow
Test [99/131] Test secondaryFiles on array of files.
Test [100/131] Test directory literal output created by ExpressionTool
Test [101/131] Test file literal output created by ExpressionTool
Test [102/131] Test dockerOutputDirectory
Test [103/131] Test hints with $import
Test [104/131] Test warning instead of error when default path is not found
Test [105/131] Test InlineJavascriptRequirement with multiple expressions in the same tool
Test [106/131] Test if a writable input directory is recursivly copied and writable
Test [107/131] Test that missing parameters are null (not undefined) in expression
Test [108/131] Test that provided parameter is not null in expression
Test [109/131] Test compound workflow document
Test [110/131] Test that nameroot and nameext are generated from basename at execution time by the runner
Test [111/131] Test that file path in $(inputs) for initialworkdir is in $(outdir).
Test [112/131] Test single step workflow with Scatter step and two data links connected to
same input, flattened merge behavior. Workflow inputs are set as list

Test [113/131] Test step input with multiple sources with multiple types
Test [114/131] Test that shell directives are not interpreted.
Test [115/131] Test that shell directives are quoted.
Test [116/131] Test empty writable dir with InitialWorkDirRequirement
Test [117/131] Test empty writable dir with InitialWorkDirRequirement inside Docker
Test [118/131] Test dynamic resource reqs referencing inputs
Test [119/131] Test file literal as input without Docker
Test [120/131] Test that OutputBinding.glob is sorted as specified by POSIX
Test [121/131] Test InitialWorkDirRequirement with a nested directory structure from another step
Test [122/131] Test that boolean flags do not appear on command line if inputBinding is empty and not null
Test [123/131] Test that expression engine does not fail to evaluate reference to self with unprovided input
Test [124/131] Test successCodes
Test [125/131] Test simple workflow with a dynamic resource requirement
Test [126/131] Test that empty array input does not add anything to command line
Test [127/131] Test that ResourceRequirement on a step level redefines requirement on the workflow level
Test [128/131] Test valueFrom with constant value overriding provided array inputs
Test [129/131] Test dynamic resource reqs referencing the size of Files inside a Directory
Test [130/131] Test that it is not an error to connect a parameter to a workflow
step, even if the parameter doesn't appear in the `run` process
inputs.

Test [131/131] Test that parameters that doesn't appear in the `run` process
inputs are not present in the input object used to run the tool.

128 tests passed, 3 failures, 0 unsupported features

1 tool tests failed
```

## Your Environment
* cwltool version: 1.0.20180525185854

This is on an a base Ubuntu 16 image, modified like:

```
sudo apt-get update
sudo apt-get -y install python-pip
pip install cwltest
pip install cwlref-runner
sudo apt-get -y install nodejs

curl https://raw.githubusercontent.com/indigo-dc/udocker/master/udocker.py > udocker
chmod u+rx ./udocker
./udocker install

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

I don't know if this is actually a udocker problem, since I can't get the conformance tests to pass with real docker without root, or the tests to run at all with root.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.