galaxyproject / galaxyproject/planemo

Planemo exits 0 during test despite galaxy/tool error

Open
#679 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
110
Forks
102
Avg merge
4d 21h
Merged PRs (30d)
13

Description

Cc @bgruening @yhoogstrate @nsoranzo

I noticed this whilst looking at the crossmap tool's build logs. The tools ended up *not* being tested and two failures were raised that probably should have killed the tests?

```
2017-05-24 00:10:02,390 INFO [galaxy.config] Install database targetting Galaxy's database configuration.
2017-05-24 00:10:03,300 ERROR [galaxy.visualization.genomes] Error reading twobit.loc
Traceback (most recent call last):
File "/tmp/tmpFqJe_b/galaxy-dev/lib/galaxy/visualization/genomes.py", line 210, in reload_genomes
for line in open( os.path.join( self.app.config.tool_data_path, "twobit.loc" ) ):
IOError: [Errno 2] No such file or directory: '/tmp/tmpFqJe_b/galaxy-dev/tool-data/twobit.loc'
2017-05-24 00:10:03,352 INFO [galaxy.util.handlers] Setting default to child with id 'main'
2017-05-24 00:10:03,377 INFO [galaxy.tools.toolbox.watcher] Watchdog library unavailable, cannot monitor tools.
2017-05-24 00:10:03,569 INFO [galaxy.tools.toolbox.base] Parsing the tool configuration /tmp/tmpFqJe_b/tool_conf.xml
2017-05-24 00:10:03,594 ERROR [galaxy.tools] Could not find dependency 'input' of parameter 'input_chain' in tool CrossMap BAM
2017-05-24 00:10:03,594 ERROR [galaxy.tools.toolbox.base] Error reading tool from path: /home/travis/build/galaxyproject/tools-iuc/tools/crossmap/crossmap_bam.xml
Traceback (most recent call last):
File "/tmp/tmpFqJe_b/galaxy-dev/lib/galaxy/tools/toolbox/base.py", line 544, in _load_tool_tag_set
tool = self.load_tool(concrete_path, use_cached=False)
File "/tmp/tmpFqJe_b/galaxy-dev/lib/galaxy/tools/toolbox/base.py", line 730, in load_tool
tool = self.create_tool( config_file=config_file, repository_id=repository_id, guid=guid, **kwds )
File "/tmp/tmpFqJe_b/galaxy-dev/lib/galaxy/tools/__init__.py", line 249, in create_tool
tool = ToolClass( config_file, tool_source, self.app, guid=guid, repository_id=repository_id, **kwds )
File "/tmp/tmpFqJe_b/galaxy-dev/lib/galaxy/tools/__init__.py", line 423, in __init__
raise e
KeyError: 'input'
2017-05-24 00:10:03,604 ERROR [galaxy.tools] Could not find dependency 'input' of parameter 'input_chain' in tool CrossMap BED
2017-05-24 00:10:03,605 ERROR [galaxy.tools.toolbox.base] Error reading tool from path: /home/travis/build/galaxyproject/tools-iuc/tools/crossmap/crossmap_bed.xml
Traceback (most recent call last):
File "/tmp/tmpFqJe_b/galaxy-dev/lib/galaxy/tools/toolbox/base.py", line 544, in _load_tool_tag_set
tool = self.load_tool(concrete_path, use_cached=False)
File "/tmp/tmpFqJe_b/galaxy-dev/lib/galaxy/tools/toolbox/base.py", line 730, in load_tool
tool = self.create_tool( config_file=config_file, repository_id=repository_id, guid=guid, **kwds )
File "/tmp/tmpFqJe_b/galaxy-dev/lib/galaxy/tools/__init__.py", line 249, in create_tool
tool = ToolClass( config_file, tool_source, self.app, guid=guid, repository_id=repository_id, **kwds )
File "/tmp/tmpFqJe_b/galaxy-dev/lib/galaxy/tools/__init__.py", line 423, in __init__
raise e
KeyError: 'input'
2017-05-24 00:10:03,605 INFO [galaxy.tools.toolbox.base] Parsing the tool configuration /tmp/tmpFqJe_b/shed_tools_conf.xml
2017-05-24 00:10:03,606 INFO [galaxy.tools.toolbox.base] Parsing the tool configuration /tmp/tmpFqJe_b/empty_tool_conf.xml
No handlers could be found for logger "galaxy.datatypes.display_applications.application"
2017-05-24 00:10:04,024 INFO [galaxy.jobs] Handler 'main' will load all configured runner plugins
2017-05-24 00:10:04,036 INFO [galaxy.jobs.handler] job handler stop queue started
2017-05-24 00:10:04,056 INFO [galaxy.jobs.handler] job handler queue started
2017-05-24 00:10:04,090 INFO [galaxy.app] Galaxy app startup finished (5195.934 ms)
2017-05-24 00:10:05,169 INFO [galaxy.queue_worker] Binding and starting galaxy control worker for main
/home/travis/.planemo/gx_venv/lib/python2.7/site-packages/sqlalchemy/sql/sqltypes.py:562: SAWarning: Dialect sqlite+pysqlite does *not* support Decimal objects natively, and SQLAlchemy must convert from floating point - rounding errors and other issues may occur. Please consider storing Decimal numbers as strings or integers on this platform for lossless storage.
'storage.' % (dialect.name, dialect.driver))
/home/travis/.planemo/gx_venv/lib/python2.7/site-packages/sqlalchemy/sql/default_comparator.py:153: SAWarning: The IN-predicate on "request_type.id" was invoked with an empty sequence. This results in a contradiction, which nonetheless can be expensive to evaluate. Consider alternative strategies for improved performance.
'strategies for improved performance.' % expr)

----------------------------------------------------------------------
XML: /tmp/tmpFqJe_b/xunit.xml
----------------------------------------------------------------------
Ran 0 tests in 0.000s

OK
```

xref https://github.com/galaxyproject/tools-iuc/pull/702

Contributor guide

Open the contributing guide

Research direction

Start with the Planemo test command's handling of Galaxy startup and tool-loading errors, then inspect how the reported xunit result ran 0 tests yet ended with OK. Trace where these failures become the process status; done means this scenario returns a nonzero exit code instead of 0.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.