Skip to content

planemo uses internal gx_venv even if galaxy_root brings its own .venv #1343

@wm75

Description

@wm75

To reproduce rename planemo's .planemo/gx_venv*, then run e.g. planemo test with --galaxy_root set to an existing instance of Galaxy with its .venv set up.

Expected behavior: planemo should use the root Galaxy's .venv
Actual behavior: planemo fails after completing all tests with

Traceback (most recent call last):
  File "/home/wolma/planemo_39/bin/planemo", line 8, in <module>
    sys.exit(planemo())
  File "/home/wolma/planemo_39/lib64/python3.9/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/home/wolma/planemo_39/lib64/python3.9/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/home/wolma/planemo_39/lib64/python3.9/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/wolma/planemo_39/lib64/python3.9/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/wolma/planemo_39/lib64/python3.9/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/home/wolma/planemo_39/lib64/python3.9/site-packages/click/decorators.py", line 84, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
  File "/home/wolma/planemo_39/lib64/python3.9/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/home/wolma/planemo_39/lib64/python3.9/site-packages/planemo/cli.py", line 102, in handle_blended_options
    return f(*args, **kwds)
  File "/home/wolma/planemo_39/lib64/python3.9/site-packages/planemo/commands/cmd_test.py", line 75, in cli
    return_value = test_runnables(ctx, runnables, original_paths=uris, **kwds)
  File "/home/wolma/planemo_39/lib64/python3.9/site-packages/planemo/engine/test.py", line 13, in test_runnables
    test_data = engine.test(runnables, test_timeout=kwds.get("test_timeout"))
  File "/home/wolma/planemo_39/lib64/python3.9/site-packages/planemo/engine/interface.py", line 76, in test
    test_results = self._collect_test_results(test_cases, test_timeout)
  File "/home/wolma/planemo_39/lib64/python3.9/site-packages/planemo/engine/interface.py", line 90, in _collect_test_results
    run_responses = self._run_test_cases(test_cases, test_timeout)
  File "/home/wolma/planemo_39/lib64/python3.9/site-packages/planemo/engine/galaxy.py", line 119, in _run_test_cases
    pass
  File "/usr/lib64/python3.9/contextlib.py", line 126, in __exit__
    next(self.gen)
  File "/home/wolma/planemo_39/lib64/python3.9/site-packages/planemo/engine/galaxy.py", line 137, in ensure_runnables_served
    yield config
  File "/usr/lib64/python3.9/contextlib.py", line 126, in __exit__
    next(self.gen)
  File "/home/wolma/planemo_39/lib64/python3.9/site-packages/planemo/galaxy/serve.py", line 91, in serve_daemon
    config.kill()
  File "/home/wolma/planemo_39/lib64/python3.9/site-packages/planemo/galaxy/config.py", line 1049, in kill
    stop_gravity(virtual_env=self.virtual_env_dir, gravity_state_dir=self.gravity_state_dir, env=self.env)
  File "/home/wolma/planemo_39/lib64/python3.9/site-packages/planemo/io.py", line 206, in stop_gravity
    subprocess.check_call([gravity_bin, "--state-dir", gravity_state_dir, "shutdown"], env=environ)
  File "/usr/lib64/python3.9/subprocess.py", line 368, in check_call
    retcode = call(*popenargs, **kwargs)
  File "/usr/lib64/python3.9/subprocess.py", line 349, in call
    with Popen(*popenargs, **kwargs) as p:
  File "/usr/lib64/python3.9/subprocess.py", line 951, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib64/python3.9/subprocess.py", line 1821, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/home/wolma/.planemo/gx_venv_3/bin/galaxyctl'

because it looks for gravity in the expected planemo-internal place.

A workaround when you haven't set up the planemo venv is to run planemo with --no_cache_galaxy, but since planemo manages to start gravity no matter what, it should also be able to stop it again.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions