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

conformance tests: failed checksum comparison (133) #200

Open
audrium opened this issue Aug 30, 2021 · 7 comments
Open

conformance tests: failed checksum comparison (133) #200

audrium opened this issue Aug 30, 2021 · 7 comments

Comments

@audrium
Copy link
Member

audrium commented Aug 30, 2021

Workflow finishes successfully, but

cwl ❯ cwltest --tool /home/amecioni/.virtualenvs/cwl/bin/reana-cwl-runner --test=conformance_test_v1.0.yaml -n133 --basedir /home/amecioni/Documents/tests/common-workflow-language/v1.0   --

Test [133/197] env_home_tmpdir_docker_complex: Test $HOME and $TMPDIR are set correctly in Docker without using return code
/home/amecioni/.virtualenvs/cwl/bin/reana-cwl-runner--outdir=/tmp/tmpnkz38c8s--quietv1.0/envvar3.cwlv1.0/empty.jsonTest 133 failed: /home/amecioni/.virtualenvs/cwl/bin/reana-cwl-runner --outdir=/tmp/tmpnkz38c8s --quiet v1.0/envvar3.cwl v1.0/empty.json
Test $HOME and $TMPDIR are set correctly in Docker without using return code
Compare failure expected: {
    "results": {
        "basename": "results",
        "checksum": "sha1$7d5ca8c0c03e883c56c4eb1ef6f6bb9bccad4d86",
        "class": "File",
        "size": 8
    }
}
got: {
    "results": {
        "basename": "results",
        "checksum": "sha1$957e6915fce641da594630569e806811b253b325",
        "class": "File",
        "http://commonwl.org/cwltool#generation": 0,
        "location": "file:///var/reana/users/00000000-0000-0000-0000-000000000000/workflows/3bb2c6f5-e056-4d90-9f57-3e404a8692e1/outputs/results",
        "nameext": "",
        "nameroot": "results",
        "size": 8
    }
}
caused by: failed comparison for key 'results': expected: {
    "basename": "results",
    "checksum": "sha1$7d5ca8c0c03e883c56c4eb1ef6f6bb9bccad4d86",
    "class": "File",
    "size": 8
}
got: {
    "basename": "results",
    "checksum": "sha1$957e6915fce641da594630569e806811b253b325",
    "class": "File",
    "http://commonwl.org/cwltool#generation": 0,
    "location": "file:///var/reana/users/00000000-0000-0000-0000-000000000000/workflows/3bb2c6f5-e056-4d90-9f57-3e404a8692e1/outputs/results",
    "nameext": "",
    "nameroot": "results",
    "size": 8
}
caused by: field 'checksum' failed comparison: expected: "sha1$7d5ca8c0c03e883c56c4eb1ef6f6bb9bccad4d86"
got: "sha1$957e6915fce641da594630569e806811b253b325"
0 tests passed, 1 failures, 0 unsupported features
@mr-c
Copy link
Member

mr-c commented Aug 30, 2021

@audrium Can you share contents of the results file here?

@audrium
Copy link
Member Author

audrium commented Aug 30, 2021

@audrium Can you share contents of the results file here?

It consists of a single word: failure :)

I see that test workflow command executes something like this:

...
if [ "$HOME" = "/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/0c80b005-87f3-4b3e-8a91-c361b14fec74/cwl/docker_outdir" ] && [ "$TMPDIR" = "/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/0c80b005-87f3-4b3e-8a91-c361b14fec74/cwl/docker_tmpdir" ]
then
    echo success > results
else
    echo failure > results
...

Checked docker_outdir, there is identical results file there with failure in it as well

@tiborsimko
Copy link
Member

Does cwltool itself pass all the reference test suite?

@mr-c
Copy link
Member

mr-c commented Aug 30, 2021

Does cwltool itself pass all the reference test suite?

It does

@mr-c
Copy link
Member

mr-c commented Aug 30, 2021

@audrium Are there execution logs available? How are you invoking the container? You can modify the test to print the values of $HOME and $TMPDIR to help with troubleshooting.

Here's the result of running this test with plain cwltool and --debug

$ /home/michael/cwltool/env3.9/bin/cwltool --debug  v1.0/envvar3.cwl v1.0/empty.json
INFO /home/michael/cwltool/env3.9/bin/cwltool 3.1.20210816212154
INFO Resolved 'v1.0/envvar3.cwl' to 'file:///home/michael/common-workflow-language/v1.0/v1.0/envvar3.cwl'
DEBUG [job envvar3.cwl] initializing from file:///home/michael/common-workflow-language/v1.0/v1.0/envvar3.cwl
DEBUG [job envvar3.cwl] {}
DEBUG [job envvar3.cwl] path mappings is {}
DEBUG [job envvar3.cwl] command line bindings is [
    {
        "shellQuote": false,
        "valueFrom": "echo HOME=$HOME TMPDIR=$TMPDIR # > log\nif [ \"$HOME\" = \"$(runtime.outdir)\" ] && [ \"$TMPDIR\" = \"$(runtime.tmpdir)\" ]\nthen\n    echo success > results\nelse\n    echo failure > results\nfi\n",
        "position": [
            0,
            0
        ]
    }
]
DEBUG [job envvar3.cwl] initial work dir {}
WARNING [job envvar3.cwl] Skipping Docker software container '--memory' limit despite presence of ResourceRequirement with ramMin and/or ramMax setting. Consider running with --strict-memory-limit for increased portability assurance.
INFO [job envvar3.cwl] /tmp/jh7tnyyh$ docker \
    run \
    -i \
    --mount=type=bind,source=/tmp/jh7tnyyh,target=/cbourI \
    --mount=type=bind,source=/tmp/hr0jqg_z,target=/tmp \
    --workdir=/cbourI \
    --read-only=true \
    --user=1000:1000 \
    --rm \
    --cidfile=/tmp/5ke1nnmz/20210830192003-813113.cid \
    --env=TMPDIR=/tmp \
    --env=HOME=/cbourI \
    debian:stretch-slim \
    /bin/sh \
    -c \
    echo HOME=$HOME TMPDIR=$TMPDIR # > log
if [ "$HOME" = "/cbourI" ] && [ "$TMPDIR" = "/tmp" ]
then
    echo success > results
else
    echo failure > results
fi
HOME=/cbourI TMPDIR=/tmp
INFO [job envvar3.cwl] Max memory used: 0MiB
INFO [job envvar3.cwl] completed success
DEBUG [job envvar3.cwl] outputs {
    "results": {
        "location": "file:///tmp/jh7tnyyh/results",
        "basename": "results",
        "nameroot": "results",
        "nameext": "",
        "class": "File",
        "checksum": "sha1$7d5ca8c0c03e883c56c4eb1ef6f6bb9bccad4d86",
        "size": 8,
        "http://commonwl.org/cwltool#generation": 0
    }
}
DEBUG [job envvar3.cwl] Removing input staging directory /tmp/dfs78ozg
DEBUG [job envvar3.cwl] Removing temporary directory /tmp/hr0jqg_z
DEBUG Moving /tmp/jh7tnyyh/results to /home/michael/common-workflow-language/v1.0/results
{
    "results": {
        "location": "file:///home/michael/common-workflow-language/v1.0/results",
        "basename": "results",
        "class": "File",
        "checksum": "sha1$7d5ca8c0c03e883c56c4eb1ef6f6bb9bccad4d86",
        "size": 8,
        "path": "/home/michael/common-workflow-language/v1.0/results"
    }
}
INFO Final process status is success
(env3.9) michael@mrc-tux:~/common-workflow-language/v1.0$ cat results 
success

@audrium
Copy link
Member Author

audrium commented Aug 31, 2021

@audrium Are there execution logs available? How are you invoking the container? You can modify the test to print the values of $HOME and $TMPDIR to help with troubleshooting.

I'm running the tests in a following way:

reana-cwl-runner --outdir=/tmp/tmpjtdf817v --quiet v1.0/envvar3.cwl v1.0/empty.json

or

cwltest --tool /home/amecioni/.virtualenvs/cwl/bin/reana-cwl-runner --test=conformance_test_v1.0.yaml -n133 --basedir /home/amecioni/Documents/tests/common-workflow-language/v1.0   --

Here are the full logs:

reana ❯ rc logs -w cwl-test.9
==> Workflow engine logs
{'results': {'location': 'file:///var/reana/users/00000000-0000-0000-0000-000000000000/workflows/20a24f22-2c8a-4b6a-b40e-575c229173b9/outputs/results', 'basename': 'results', 'nameroot': 'results', 'nameext': '', 'class': 'File', 'checksum': 'sha1$957e6915fce641da594630569e806811b253b325', 'size': 8, 'http://commonwl.org/cwltool#generation': 0}}

running workflow on context: {'publisher': <reana_commons.publisher.WorkflowStatusPublisher object at 0x7fc9c1bb8040>, 'rjc_api_client': <reana_commons.api_client.JobControllerAPIClient object at 0x7fc9c146d580>, 'workflow_uuid': '20a24f22-2c8a-4b6a-b40e-575c229173b9', 'workflow_workspace': '/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/20a24f22-2c8a-4b6a-b40e-575c229173b9', 'workflow_json': {'arguments': [{'shellQuote': False, 'valueFrom': 'echo HOME="$HOME"\necho runtime.outdir="$(runtime.outdir)"\necho TMPDIR="$TMPDIR"\necho runtime.tmpdir="$(runtime.tmpdir)"\n\nif [ "$HOME" = "$(runtime.outdir)" ] && [ "$TMPDIR" = "$(runtime.tmpdir)" ]\nthen\n    echo success > results\nelse\n    echo failure > results\nfi\n'}], 'class': 'CommandLineTool', 'cwlVersion': 'v1.0', 'hints': [{'class': 'DockerRequirement', 'dockerPull': 'debian:stretch-slim'}, {'class': 'ResourceRequirement', 'ramMin': 8}], 'id': '#main', 'inputs': [], 'outputs': [{'id': '#main/results', 'outputBinding': {'glob': 'results'}, 'type': 'File'}], 'requirements': [{'class': 'ShellCommandRequirement'}]}, 'workflow_parameters': {}, 'operational_options': [], 'kwargs': {'workflow_file': 'None'}}
2021-08-31 08:21:52,830 | reana-workflow-engine-cwl | MainThread | INFO | running workflow on context: {'publisher': <reana_commons.publisher.WorkflowStatusPublisher object at 0x7fc9c1bb8040>, 'rjc_api_client': <reana_commons.api_client.JobControllerAPIClient object at 0x7fc9c146d580>, 'workflow_uuid': '20a24f22-2c8a-4b6a-b40e-575c229173b9', 'workflow_workspace': '/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/20a24f22-2c8a-4b6a-b40e-575c229173b9', 'workflow_json': {'arguments': [{'shellQuote': False, 'valueFrom': 'echo HOME="$HOME"\necho runtime.outdir="$(runtime.outdir)"\necho TMPDIR="$TMPDIR"\necho runtime.tmpdir="$(runtime.tmpdir)"\n\nif [ "$HOME" = "$(runtime.outdir)" ] && [ "$TMPDIR" = "$(runtime.tmpdir)" ]\nthen\n    echo success > results\nelse\n    echo failure > results\nfi\n'}], 'class': 'CommandLineTool', 'cwlVersion': 'v1.0', 'hints': [{'class': 'DockerRequirement', 'dockerPull': 'debian:stretch-slim'}, {'class': 'ResourceRequirement', 'ramMin': 8}], 'id': '#main', 'inputs': [], 'outputs': [{'id': '#main/results', 'outputBinding': {'glob': 'results'}, 'type': 'File'}], 'requirements': [{'class': 'ShellCommandRequirement'}]}, 'workflow_parameters': {}, 'operational_options': [], 'kwargs': {'workflow_file': 'None'}}
Dumping workflow specification and input parameter files...
2021-08-31 08:21:52,830 | reana-workflow-engine-cwl | MainThread | INFO | Dumping workflow specification and input parameter files...
parsing arguments ...
2021-08-31 08:21:52,846 | reana-workflow-engine-cwl | MainThread | INFO | parsing arguments ...
starting the run..
2021-08-31 08:21:52,850 | reana-workflow-engine-cwl | MainThread | INFO | starting the run..
INFO /usr/local/bin/run-cwl-workflow 0.8.0a2 with cwltool 3.1.20210628163208
2021-08-31 08:21:52,857 | cwltool | MainThread | INFO | /usr/local/bin/run-cwl-workflow 0.8.0a2 with cwltool 3.1.20210628163208
INFO Resolved 'workflow.json#main' to 'file:///var/reana/users/00000000-0000-0000-0000-000000000000/workflows/20a24f22-2c8a-4b6a-b40e-575c229173b9/workflow.json#main'
2021-08-31 08:21:52,860 | cwltool | MainThread | INFO | Resolved 'workflow.json#main' to 'file:///var/reana/users/00000000-0000-0000-0000-000000000000/workflows/20a24f22-2c8a-4b6a-b40e-575c229173b9/workflow.json#main'
[job main] CREATED TASK MSG----------------------
2021-08-31 08:21:53,940 | reana-workflow-engine-cwl | MainThread | INFO | [job main] CREATED TASK MSG----------------------
{'cmd': "/bin/sh -c 'umask 2;export "
        'TMPDIR="/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/20a24f22-2c8a-4b6a-b40e-575c229173b9/cwl/tmpdir/o3ag03xf";export '
        'HOME="/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/20a24f22-2c8a-4b6a-b40e-575c229173b9/cwl/docker_outdir";export '
        'PATH="/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin";mkdir '
        '-p '
        '/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/20a24f22-2c8a-4b6a-b40e-575c229173b9/cwl/docker_outdir '
        '&& cd '
        '/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/20a24f22-2c8a-4b6a-b40e-575c229173b9/cwl/docker_outdir '
        '&& echo HOME="$HOME"\n'
        'echo '
        'runtime.outdir="/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/20a24f22-2c8a-4b6a-b40e-575c229173b9/cwl/docker_outdir"\n'
        'echo TMPDIR="$TMPDIR"\n'
        'echo '
        'runtime.tmpdir="/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/20a24f22-2c8a-4b6a-b40e-575c229173b9/cwl/docker_tmpdir"\n'
        '\n'
        'if [ "$HOME" = '
        '"/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/20a24f22-2c8a-4b6a-b40e-575c229173b9/cwl/docker_outdir" '
        '] && [ "$TMPDIR" = '
        '"/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/20a24f22-2c8a-4b6a-b40e-575c229173b9/cwl/docker_tmpdir" '
        ']\n'
        'then\n'
        '    echo success > results\n'
        'else\n'
        '    echo failure > results\n'
        'fi; cp -r '
        '/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/20a24f22-2c8a-4b6a-b40e-575c229173b9/cwl/docker_outdir/* '
        "/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/20a24f22-2c8a-4b6a-b40e-575c229173b9/cwl/outdir/n183z_lx' ",
 'compute_backend': None,
 'cvmfs_mounts': 'false',
 'htcondor_accounting_group': None,
 'htcondor_max_runtime': None,
 'image': 'debian:stretch-slim',
 'job_name': 'main',
 'kerberos': None,
 'kubernetes_memory_limit': None,
 'kubernetes_uid': None,
 'prettified_cmd': "/bin/sh -c 'umask 2;export "
                   'TMPDIR="/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/20a24f22-2c8a-4b6a-b40e-575c229173b9/cwl/tmpdir/o3ag03xf";export '
                   'HOME="/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/20a24f22-2c8a-4b6a-b40e-575c229173b9/cwl/docker_outdir";export '
                   'PATH="/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin";mkdir '
                   '-p '
                   '/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/20a24f22-2c8a-4b6a-b40e-575c229173b9/cwl/docker_outdir '
                   '&& cd '
                   '/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/20a24f22-2c8a-4b6a-b40e-575c229173b9/cwl/docker_outdir '
                   '&& echo HOME="$HOME"\n'
                   'echo '
                   'runtime.outdir="/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/20a24f22-2c8a-4b6a-b40e-575c229173b9/cwl/docker_outdir"\n'
                   'echo TMPDIR="$TMPDIR"\n'
                   'echo '
                   'runtime.tmpdir="/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/20a24f22-2c8a-4b6a-b40e-575c229173b9/cwl/docker_tmpdir"\n'
                   '\n'
                   'if [ "$HOME" = '
                   '"/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/20a24f22-2c8a-4b6a-b40e-575c229173b9/cwl/docker_outdir" '
                   '] && [ "$TMPDIR" = '
                   '"/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/20a24f22-2c8a-4b6a-b40e-575c229173b9/cwl/docker_tmpdir" '
                   ']\n'
                   'then\n'
                   '    echo success > results\n'
                   'else\n'
                   '    echo failure > results\n'
                   'fi; cp -r '
                   '/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/20a24f22-2c8a-4b6a-b40e-575c229173b9/cwl/docker_outdir/* '
                   "/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/20a24f22-2c8a-4b6a-b40e-575c229173b9/cwl/outdir/n183z_lx' ",
 'unpacked_img': None,
 'voms_proxy': None,
 'workflow_uuid': '20a24f22-2c8a-4b6a-b40e-575c229173b9',
 'workflow_workspace': '/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/20a24f22-2c8a-4b6a-b40e-575c229173b9'}
2021-08-31 08:21:53,941 | reana-workflow-engine-cwl | MainThread | INFO | {'cmd': "/bin/sh -c 'umask 2;export "
        'TMPDIR="/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/20a24f22-2c8a-4b6a-b40e-575c229173b9/cwl/tmpdir/o3ag03xf";export '
        'HOME="/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/20a24f22-2c8a-4b6a-b40e-575c229173b9/cwl/docker_outdir";export '
        'PATH="/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin";mkdir '
        '-p '
        '/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/20a24f22-2c8a-4b6a-b40e-575c229173b9/cwl/docker_outdir '
        '&& cd '
        '/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/20a24f22-2c8a-4b6a-b40e-575c229173b9/cwl/docker_outdir '
        '&& echo HOME="$HOME"\n'
        'echo '
        'runtime.outdir="/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/20a24f22-2c8a-4b6a-b40e-575c229173b9/cwl/docker_outdir"\n'
        'echo TMPDIR="$TMPDIR"\n'
        'echo '
        'runtime.tmpdir="/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/20a24f22-2c8a-4b6a-b40e-575c229173b9/cwl/docker_tmpdir"\n'
        '\n'
        'if [ "$HOME" = '
        '"/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/20a24f22-2c8a-4b6a-b40e-575c229173b9/cwl/docker_outdir" '
        '] && [ "$TMPDIR" = '
        '"/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/20a24f22-2c8a-4b6a-b40e-575c229173b9/cwl/docker_tmpdir" '
        ']\n'
        'then\n'
        '    echo success > results\n'
        'else\n'
        '    echo failure > results\n'
        'fi; cp -r '
        '/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/20a24f22-2c8a-4b6a-b40e-575c229173b9/cwl/docker_outdir/* '
        "/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/20a24f22-2c8a-4b6a-b40e-575c229173b9/cwl/outdir/n183z_lx' ",
 'compute_backend': None,
 'cvmfs_mounts': 'false',
 'htcondor_accounting_group': None,
 'htcondor_max_runtime': None,
 'image': 'debian:stretch-slim',
 'job_name': 'main',
 'kerberos': None,
 'kubernetes_memory_limit': None,
 'kubernetes_uid': None,
 'prettified_cmd': "/bin/sh -c 'umask 2;export "
                   'TMPDIR="/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/20a24f22-2c8a-4b6a-b40e-575c229173b9/cwl/tmpdir/o3ag03xf";export '
                   'HOME="/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/20a24f22-2c8a-4b6a-b40e-575c229173b9/cwl/docker_outdir";export '
                   'PATH="/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin";mkdir '
                   '-p '
                   '/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/20a24f22-2c8a-4b6a-b40e-575c229173b9/cwl/docker_outdir '
                   '&& cd '
                   '/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/20a24f22-2c8a-4b6a-b40e-575c229173b9/cwl/docker_outdir '
                   '&& echo HOME="$HOME"\n'
                   'echo '
                   'runtime.outdir="/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/20a24f22-2c8a-4b6a-b40e-575c229173b9/cwl/docker_outdir"\n'
                   'echo TMPDIR="$TMPDIR"\n'
                   'echo '
                   'runtime.tmpdir="/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/20a24f22-2c8a-4b6a-b40e-575c229173b9/cwl/docker_tmpdir"\n'
                   '\n'
                   'if [ "$HOME" = '
                   '"/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/20a24f22-2c8a-4b6a-b40e-575c229173b9/cwl/docker_outdir" '
                   '] && [ "$TMPDIR" = '
                   '"/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/20a24f22-2c8a-4b6a-b40e-575c229173b9/cwl/docker_tmpdir" '
                   ']\n'
                   'then\n'
                   '    echo success > results\n'
                   'else\n'
                   '    echo failure > results\n'
                   'fi; cp -r '
                   '/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/20a24f22-2c8a-4b6a-b40e-575c229173b9/cwl/docker_outdir/* '
                   "/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/20a24f22-2c8a-4b6a-b40e-575c229173b9/cwl/outdir/n183z_lx' ",
 'unpacked_img': None,
 'voms_proxy': None,
 'workflow_uuid': '20a24f22-2c8a-4b6a-b40e-575c229173b9',
 'workflow_workspace': '/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/20a24f22-2c8a-4b6a-b40e-575c229173b9'}
[job main] SUBMITTED TASK --------------------
2021-08-31 08:21:54,220 | reana-workflow-engine-cwl | MainThread | INFO | [job main] SUBMITTED TASK --------------------
[job main] task id: f40d5488-3793-49f4-bc48-1a3b69581d92
2021-08-31 08:21:54,220 | reana-workflow-engine-cwl | MainThread | INFO | [job main] task id: f40d5488-3793-49f4-bc48-1a3b69581d92
[job main] FINAL JOB STATE: finished ------------------
2021-08-31 08:21:59,247 | reana-workflow-engine-cwl | main | INFO | [job main] FINAL JOB STATE: finished ------------------
[job main] task id: f40d5488-3793-49f4-bc48-1a3b69581d92
2021-08-31 08:21:59,268 | reana-workflow-engine-cwl | main | ERROR | [job main] task id: f40d5488-3793-49f4-bc48-1a3b69581d92
[job main] OUTPUTS ------------------
2021-08-31 08:21:59,320 | reana-workflow-engine-cwl | main | INFO | [job main] OUTPUTS ------------------
FinalOutput{'results': {'location': 'file:///var/reana/users/00000000-0000-0000-0000-000000000000/workflows/20a24f22-2c8a-4b6a-b40e-575c229173b9/outputs/results', 'basename': 'results', 'nameroot': 'results', 'nameext': '', 'class': 'File', 'checksum': 'sha1$957e6915fce641da594630569e806811b253b325', 'size': 8, 'http://commonwl.org/cwltool#generation': 0}}FinalOutput
2021-08-31 08:21:59,393 | reana-workflow-engine-cwl | MainThread | INFO | FinalOutput{'results': {'location': 'file:///var/reana/users/00000000-0000-0000-0000-000000000000/workflows/20a24f22-2c8a-4b6a-b40e-575c229173b9/outputs/results', 'basename': 'results', 'nameroot': 'results', 'nameext': '', 'class': 'File', 'checksum': 'sha1$957e6915fce641da594630569e806811b253b325', 'size': 8, 'http://commonwl.org/cwltool#generation': 0}}FinalOutput
INFO Final process status is success
2021-08-31 08:21:59,393 | cwltool | MainThread | INFO | Final process status is success
workflow done
2021-08-31 08:21:59,394 | reana-workflow-engine-cwl | MainThread | INFO | workflow done
2021-08-31 08:21:59,394 | root | MainThread | INFO | Workflow 20a24f22-2c8a-4b6a-b40e-575c229173b9 finished. Files available at /var/reana/users/00000000-0000-0000-0000-000000000000/workflows/20a24f22-2c8a-4b6a-b40e-575c229173b9.
workflow_spec: {'arguments': [{'shellQuote': False, 'valueFrom': 'echo HOME="$HOME"\necho runtime.outdir="$(runtime.outdir)"\necho TMPDIR="$TMPDIR"\necho runtime.tmpdir="$(runtime.tmpdir)"\n\nif [ "$HOME" = "$(runtime.outdir)" ] && [ "$TMPDIR" = "$(runtime.tmpdir)" ]\nthen\n    echo success > results\nelse\n    echo failure > results\nfi\n'}], 'class': 'CommandLineTool', 'cwlVersion': 'v1.0', 'hints': [{'class': 'DockerRequirement', 'dockerPull': 'debian:stretch-slim'}, {'class': 'ResourceRequirement', 'ramMin': 8}], 'id': '#main', 'inputs': [], 'outputs': [{'id': '#main/results', 'outputBinding': {'glob': 'results'}, 'type': 'File'}], 'requirements': [{'class': 'ShellCommandRequirement'}]}




==> Job logs
==> Step: main
==> Workflow ID: 20a24f22-2c8a-4b6a-b40e-575c229173b9
==> Compute backend: Kubernetes
==> Job ID: reana-run-job-22965abd-0b91-4911-9998-3a813a0428f1
==> Docker image: debian:stretch-slim
==> Command: /bin/sh -c 'umask 2;export TMPDIR="/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/20a24f22-2c8a-4b6a-b40e-575c229173b9/cwl/tmpdir/o3ag03xf";export HOME="/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/20a24f22-2c8a-4b6a-b40e-575c229173b9/cwl/docker_outdir";export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin";mkdir -p /var/reana/users/00000000-0000-0000-0000-000000000000/workflows/20a24f22-2c8a-4b6a-b40e-575c229173b9/cwl/docker_outdir && cd /var/reana/users/00000000-0000-0000-0000-000000000000/workflows/20a24f22-2c8a-4b6a-b40e-575c229173b9/cwl/docker_outdir && echo HOME="$HOME"
echo runtime.outdir="/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/20a24f22-2c8a-4b6a-b40e-575c229173b9/cwl/docker_outdir"
echo TMPDIR="$TMPDIR"
echo runtime.tmpdir="/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/20a24f22-2c8a-4b6a-b40e-575c229173b9/cwl/docker_tmpdir"

if [ "$HOME" = "/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/20a24f22-2c8a-4b6a-b40e-575c229173b9/cwl/docker_outdir" ] && [ "$TMPDIR" = "/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/20a24f22-2c8a-4b6a-b40e-575c229173b9/cwl/docker_tmpdir" ]
then
    echo success > results
else
    echo failure > results
fi; cp -r /var/reana/users/00000000-0000-0000-0000-000000000000/workflows/20a24f22-2c8a-4b6a-b40e-575c229173b9/cwl/docker_outdir/* /var/reana/users/00000000-0000-0000-0000-000000000000/workflows/20a24f22-2c8a-4b6a-b40e-575c229173b9/cwl/outdir/n183z_lx'
==> Status: finished
==> Started: 2021-08-31T08:21:54
==> Finished: 2021-08-31T08:21:59
==> Logs:
job: :
 HOME=/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/20a24f22-2c8a-4b6a-b40e-575c229173b9/cwl/docker_outdir
runtime.outdir=/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/20a24f22-2c8a-4b6a-b40e-575c229173b9/cwl/docker_outdir
TMPDIR=/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/20a24f22-2c8a-4b6a-b40e-575c229173b9/cwl/tmpdir/o3ag03xf
runtime.tmpdir=/var/reana/users/00000000-0000-0000-0000-000000000000/workflows/20a24f22-2c8a-4b6a-b40e-575c229173b9/cwl/docker_tmpdir

I've modified the test output a bit to print the values of $HOME, runtime.outdir, $TMPDIR and runtime.tmpdir (in the very end) and as you can see the test fail because runtime.tmpdir does not match TMPDIR. Any ideas why this could happen?

@mr-c
Copy link
Member

mr-c commented Aug 31, 2021

Any ideas why this could happen?

Something specific to reana-workflow-engine-cwl I presume

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

No branches or pull requests

3 participants