galaxyproject / planemo

Command-line utilities to assist in developing Galaxy and Common Workflow Language artifacts - including tools, workflows, and training materials.
https://planemo.readthedocs.io/
MIT License
89 stars 86 forks source link

Improve resilience when outputs aren't produced in workflow tests #1272

Open mvdbeek opened 1 year ago

mvdbeek commented 1 year ago
There were problems with 1 test(s) - out of 1 test(s) executed. See /home/runner/work/iwc/iwc/tool_test_output.html for detailed breakdown.
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.7.14/x64/lib/python3.7/site-packages/planemo/galaxy/activity.py", line 53, in execute
    return _execute(ctx, config, runnable, job_path, **kwds)
  File "/opt/hostedtoolcache/Python/3.7.14/x64/lib/python3.7/site-packages/planemo/galaxy/activity.py", line 227, in _execute
    run_response.collect_outputs(ctx, output_directory)
  File "/opt/hostedtoolcache/Python/3.7.14/x64/lib/python3.7/site-packages/planemo/galaxy/activity.py", line 429, in collect_outputs
    pseduo_location=True,
  File "/opt/hostedtoolcache/Python/3.7.14/x64/lib/python3.7/site-packages/galaxy/tool_util/cwl/util.py", line 456, in output_to_cwl_json
    properties = output_properties(pseduo_location=pseduo_location, **dataset_dict)
  File "/opt/hostedtoolcache/Python/3.7.14/x64/lib/python3.7/site-packages/galaxy/tool_util/cwl/util.py", line 35, in output_properties
    f = open(path, "rb")
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmpzvrwtntr/full contaminant + mito scaffold list'
VGP-assembly-decontamination-pipeline.ga_0: failed

that's not very helpful, I think we just need to catch all exception in collect_outputs. It is quite clear what the error is if you look at the failing jobs.

https://github.com/galaxyproject/iwc/actions/runs/3158850531/jobs/5141410583

mvdbeek commented 1 year ago

This particular case is fixed now, but we should still always produce a meaningful test report ...