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

Support galaxy galaxy_user and galaxy_group from planemo commands #107

Open
selten opened this issue Apr 4, 2023 · 1 comment
Open

Support galaxy galaxy_user and galaxy_group from planemo commands #107

selten opened this issue Apr 4, 2023 · 1 comment

Comments

@selten
Copy link

selten commented Apr 4, 2023

Currently when running planemo test against a local Galaxy 23.0 installation (dockerized, installed under root), planemo will error out with a message like:

Executing: galaxyctl start
Error: 1 validation error for Settings
galaxy_user
  galaxy_user is required when running as root (type=value_error)
Problem running Galaxy command [].
Traceback (most recent call last):
  File "/usr/local/bin/planemo", line 8, in <module>
    sys.exit(planemo())
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/click/decorators.py", line 84, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/planemo/cli.py", line 102, in handle_blended_options
    return f(*args, **kwds)
  File "/usr/local/lib/python3.8/dist-packages/planemo/commands/cmd_test.py", line 75, in cli
    return_value = test_runnables(ctx, runnables, original_paths=uris, **kwds)
  File "/usr/local/lib/python3.8/dist-packages/planemo/engine/test.py", line 13, in test_runnables
    test_data = engine.test(runnables, test_timeout=kwds.get("test_timeout"))
  File "/usr/local/lib/python3.8/dist-packages/planemo/engine/interface.py", line 76, in test
    test_results = self._collect_test_results(test_cases, test_timeout)
  File "/usr/local/lib/python3.8/dist-packages/planemo/engine/interface.py", line 90, in _collect_test_results
    run_responses = self._run_test_cases(test_cases, test_timeout)
  File "/usr/local/lib/python3.8/dist-packages/planemo/engine/galaxy.py", line 79, in _run_test_cases
    with self.ensure_runnables_served(runnables) as config:
  File "/usr/lib/python3.8/contextlib.py", line 113, in __enter__
    return next(self.gen)
  File "/usr/local/lib/python3.8/dist-packages/planemo/engine/galaxy.py", line 134, in ensure_runnables_served
    with serve_daemon(self._ctx, runnables, **self._serve_kwds()) as config:
  File "/usr/lib/python3.8/contextlib.py", line 113, in __enter__
    return next(self.gen)
  File "/usr/local/lib/python3.8/dist-packages/planemo/galaxy/serve.py", line 84, in serve_daemon
    with serve(ctx, runnables, **kwds) as config:
  File "/usr/lib/python3.8/contextlib.py", line 113, in __enter__
    return next(self.gen)
  File "/usr/local/lib/python3.8/dist-packages/planemo/galaxy/serve.py", line 22, in serve
    with _serve(ctx, runnables, **kwds) as config:
  File "/usr/lib/python3.8/contextlib.py", line 113, in __enter__
    return next(self.gen)
  File "/usr/local/lib/python3.8/dist-packages/planemo/galaxy/serve.py", line 56, in _serve
    raise Exception(message)
Exception: Problem running Galaxy command [].

It seems like the following lines in the Galaxy config file are responsible for this: https://github.com/galaxyproject/galaxy/blob/release_23.0/lib/galaxy/config/sample/galaxy.yml.sample#L57-L63

@mvdbeek
Copy link
Member

mvdbeek commented Jun 6, 2023

So what you're doing is running planemo test as the root user ? That seems more of a gravity bug then, i guess there's no reason why you wouldn't want to run galaxy as root in a container environment.

@mvdbeek mvdbeek transferred this issue from galaxyproject/planemo Jun 6, 2023
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

2 participants