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

planemo 0.74.3: test fails when run as a tool with a planemo conda dependency #1148

Closed
fubar2 opened this issue Mar 7, 2021 · 1 comment
Closed

Comments

@fubar2
Copy link

fubar2 commented Mar 7, 2021

This is the edge case of planemo being run as a conda dependency in a tool running planemo test being served by planemo.
It arises from galaxyproject/training-material#2428 .
This was working nicely but broke about a week ago.

For a sample planemo_test tool in the examples below, an archive containing the test case archive can be grabbed from test toolshed and unpacked:

wget https://fubar@testtoolshed.g2.bx.psu.edu/repos/fubar/planemo_test/archive/565150681330.tar.gz

A direct test
planemo test .... planemo_test/planemo_test.xml
works and passes.

Running the test manually in planemo with
planemo serve .... planemo_test/planemo_test.xml
and 565150681330.tar.gz uploaded into the history as a toolshed archive, so it can be selected as
the input toolshed archive for the tool,
the tool fails. It does not get as far as running the test.

It's not clear below but there are more explicit tracebacks from generating the tool that show run_tests.sh sees an apparently unrecognised --dev-wheels parameter and prints the run_tests.sh help text. The only place --dev-wheels appears is planemo/galaxy/run.py -

def setup_common_startup_args():
    return _set_variable_if_wheels(
        "COMMON_STARTUP_ARGS", "--dev-wheels"
    )

Traceback from the failed job seen in Galaxy is pasted below.

An error occurred while running the tool planemo_test.
Details

Execution resulted in the following messages:

Fatal error: Exit code 1 ()

Tool generated the following standard error:

galaxy.util.commands WARNING: Passing program arguments as a string may be a security hazard if combined with untrusted input
Cloning into '/tmp/tmp4fm2c027/tmp/tmp_9rv3ywv/galaxy-dev'...
done.
galaxy.util.commands WARNING: Passing program arguments as a string may be a security hazard if combined with untrusted input
ERROR: google-api-core 1.23.0 has requirement google-auth<2.0dev,>=1.21.1, but you'll have google-auth 1.18.0 which is incompatible.
 * Install prebuilt node (12.16.3) ..... done.
 * Overwriting /home/ross/.planemo/gx_venv_3/bin/shim with new content
galaxy.util.commands WARNING: Passing program arguments as a string may be a security hazard if combined with untrusted input
invalid option: --dev-wheels
Cannot locate xUnit report [/tmp/tmp4fm2c027/tmp/tmp_9rv3ywv/xunit.xml] for tests - required to build planemo report and summarize tests.
Traceback (most recent call last):
  File "/home/ross/miniconda3/envs/__planemo@_uv_/bin/planemo", line 10, in <module>
    sys.exit(planemo())
  File "/home/ross/miniconda3/envs/__planemo@_uv_/lib/python3.8/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/home/ross/miniconda3/envs/__planemo@_uv_/lib/python3.8/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/home/ross/miniconda3/envs/__planemo@_uv_/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/ross/miniconda3/envs/__planemo@_uv_/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/ross/miniconda3/envs/__planemo@_uv_/lib/python3.8/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/home/ross/miniconda3/envs/__planemo@_uv_/lib/python3.8/site-packages/click/decorators.py", line 73, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
  File "/home/ross/miniconda3/envs/__planemo@_uv_/lib/python3.8/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/home/ross/miniconda3/envs/__planemo@_uv_/lib/python3.8/site-packages/planemo/cli.py", line 98, in handle_blended_options
    return f(*args, **kwds)
  File "/home/ross/miniconda3/envs/__planemo@_uv_/lib/python3.8/site-packages/planemo/commands/cmd_test.py", line 82, in cli
    return_value = test_runnables(ctx, runnables, original_paths=uris, **kwds)
  File "/home/ross/miniconda3/envs/__planemo@_uv_/lib/python3.8/site-packages/planemo/engine/test.py", line 35, in test_runnables
    return_value = run_in_config(ctx, config, **kwds)
  File "/home/ross/miniconda3/envs/__planemo@_uv_/lib/python3.8/site-packages/planemo/galaxy/test/actions.py", line 116, in run_in_config
    _check_test_outputs(xunit_report_file_tracker, structured_report_file_tracker)
  File "/home/ross/miniconda3/envs/__planemo@_uv_/lib/python3.8/site-packages/planemo/galaxy/test/actions.py", line 329, in _check_test_outputs
    raise Exception(message)
Exception: Cannot locate xUnit report [/tmp/tmp4fm2c027/tmp/tmp_9rv3ywv/xunit.xml] for tests - required to build planemo report and summarize tests.

@fubar2
Copy link
Author

fubar2 commented Mar 9, 2021

I can test with a monkey patched run_tests.sh to ignore the current bogus --dev-wheels parameter.
It seems to be leaking into the call to run_tests.sh when it's probably intended for, and a legal parameter for common_startup_functions.sh ? I'll let you know if I can figure it out - you never know.

@fubar2 fubar2 closed this as completed Jul 9, 2021
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

1 participant