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

some commands should show extra output #3519

Open
rokroskar opened this issue Jun 9, 2023 · 0 comments
Open

some commands should show extra output #3519

rokroskar opened this issue Jun 9, 2023 · 0 comments

Comments

@rokroskar
Copy link
Member

rokroskar commented Jun 9, 2023

A few commands tend to err on the side of being a little too clean :)

e.g.

  • renku storage pull is great! But it shows no progress, so it's hard to tell what's happening
  • renku session start builds the image, but if there is an error in the image build it's not possible to see the reason

Example for the docker image build issue - this is the output from renku session start:

Ahhhhhhhh! You have found a bug. 🐞

1. Open an issue by typing "open";
2. Print human-readable information by typing "print";
3. See the full traceback without submitting details (default: "ignore").

Please select an action by typing its name (open, print, ignore) [ignore]:
Traceback (most recent call last):
  File "/Users/rok/.venvs/renku-cli/bin/renku", line 8, in <module>
    sys.exit(cli())
  File "/Users/rok/.venvs/renku-cli/lib/python3.9/site-packages/click/core.py", line 1137, in __call__
    return self.main(*args, **kwargs)
  File "/Users/rok/.venvs/renku-cli/lib/python3.9/site-packages/renku/ui/cli/exception_handler.py", line 140, in main
    self._handle_github()
  File "/Users/rok/.venvs/renku-cli/lib/python3.9/site-packages/renku/ui/cli/exception_handler.py", line 172, in _handle_github
    getattr(self, "_process_" + value)()
  File "/Users/rok/.venvs/renku-cli/lib/python3.9/site-packages/renku/ui/cli/exception_handler.py", line 132, in main
    return super().main(*args, **kwargs)
  File "/Users/rok/.venvs/renku-cli/lib/python3.9/site-packages/renku/ui/cli/exception_handler.py", line 91, in main
    return super().main(*args, **kwargs)
  File "/Users/rok/.venvs/renku-cli/lib/python3.9/site-packages/click/core.py", line 1062, in main
    rv = self.invoke(ctx)
  File "/Users/rok/.venvs/renku-cli/lib/python3.9/site-packages/click/core.py", line 1668, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/rok/.venvs/renku-cli/lib/python3.9/site-packages/click/core.py", line 1668, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/rok/.venvs/renku-cli/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/rok/.venvs/renku-cli/lib/python3.9/site-packages/click/core.py", line 763, in invoke
    return __callback(*args, **kwargs)
  File "/Users/rok/.venvs/renku-cli/lib/python3.9/site-packages/renku/ui/cli/session.py", line 284, in start
    session_start_command().with_communicator(communicator).build().execute(
  File "/Users/rok/.venvs/renku-cli/lib/python3.9/site-packages/renku/command/command_builder/command.py", line 250, in execute
    output = self._operation(*args, **kwargs)  # type: ignore
  File "pydantic/decorator.py", line 40, in pydantic.decorator.validate_arguments.validate.wrapper_function
    from contextlib import _GeneratorContextManager
  File "pydantic/decorator.py", line 134, in pydantic.decorator.ValidatedFunction.call

  File "pydantic/decorator.py", line 206, in pydantic.decorator.ValidatedFunction.execute

  File "/Users/rok/.venvs/renku-cli/lib/python3.9/site-packages/renku/core/session/session.py", line 144, in session_start
    provider_api.build_image(project_context.dockerfile_path.parent, image_name, config)
  File "/Users/rok/.venvs/renku-cli/lib/python3.9/site-packages/renku/core/session/docker.py", line 91, in build_image
    self.docker_client().images.build(path=str(image_descriptor), tag=image_name)
  File "/Users/rok/.venvs/renku-cli/lib/python3.9/site-packages/docker/models/images.py", line 285, in build
    raise BuildError(chunk['error'], result_stream)
docker.errors.BuildError: The command '/bin/bash -c -o pipefail mamba env update -q -f /tmp/environment.yml &&     /opt/conda/bin/pip install -r /tmp/requirements.txt --no-cache-dir &&     mamba clean -y --all &&     mamba env export -n "root" &&     rm -rf ${HOME}/.renku/venv' returned a non-zero code: 1

and running docker build gives

[+] Building 12.3s (8/9)
 => [internal] load build definition from Dockerfile                                                                                                                                                                                                   0.0s
 => => transferring dockerfile: 37B                                                                                                                                                                                                                    0.0s
 => [internal] load .dockerignore                                                                                                                                                                                                                      0.0s
 => => transferring context: 34B                                                                                                                                                                                                                       0.0s
 => [internal] load metadata for docker.io/renku/renkulab-py:3.9-0.17.0                                                                                                                                                                                0.0s
 => [internal] load build context                                                                                                                                                                                                                      0.0s
 => => transferring context: 860B                                                                                                                                                                                                                      0.0s
 => CACHED [builder 1/2] FROM docker.io/renku/renkulab-py:3.9-0.17.0                                                                                                                                                                                   0.0s
 => CACHED [builder 2/2] RUN if [ -n "2.3.2" ] ; then         source .renku/venv/bin/activate ;         currentversion=$(renku --version) ;         if [ "2.3.2" != "$currentversion" ] ; then             pip uninstall renku -y ;             gitve  0.0s
 => [stage-1 2/4] COPY requirements.txt environment.yml /tmp/                                                                                                                                                                                          0.0s
 => ERROR [stage-1 3/4] RUN mamba env update -q -f /tmp/environment.yml &&     /opt/conda/bin/pip install -r /tmp/requirements.txt --no-cache-dir &&     mamba clean -y --all &&     mamba env export -n "root" &&     rm -rf /home/jovyan/.renku/ve  12.2s
------
 > [stage-1 3/4] RUN mamba env update -q -f /tmp/environment.yml &&     /opt/conda/bin/pip install -r /tmp/requirements.txt --no-cache-dir &&     mamba clean -y --all &&     mamba env export -n "root" &&     rm -rf /home/jovyan/.renku/venv:
#6 11.54
#6 11.54   Pinned packages:
#6 11.54
#6 11.54   - python 3.9.13
#6 11.54
#6 11.54
#6 11.54 Encountered problems while solving:
#6 11.54   - nothing provides requested rdkit 2023.03.1
#6 11.54
------
executor failed running [/bin/bash -c -o pipefail mamba env update -q -f /tmp/environment.yml &&     /opt/conda/bin/pip install -r /tmp/requirements.txt --no-cache-dir &&     mamba clean -y --all &&     mamba env export -n "root" &&     rm -rf ${HOME}/.renku/venv]: exit code: 1

which makes it immediately clear what needs to be addressed.

The default for both of these should probably be to show output so the user knows what is happening with the option to turn the output off (e.g. a -q flag or similar)

There are probably others...?

@rokroskar rokroskar added kind/enhancement status/triage Issue needs to be triaged labels Jun 9, 2023
@github-project-automation github-project-automation bot moved this to Backlog in renku-python Jun 9, 2023
@Panaetius Panaetius removed the status/triage Issue needs to be triaged label Jun 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Backlog
Development

No branches or pull requests

2 participants