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

Errors in pip don't propagate to micromamba #1439

Closed
austin1howard opened this issue Feb 2, 2022 · 1 comment
Closed

Errors in pip don't propagate to micromamba #1439

austin1howard opened this issue Feb 2, 2022 · 1 comment

Comments

@austin1howard
Copy link
Contributor

When using micromamba to install from an environment file, non-zero exit codes from the pip install step don't result in a non-zero exit code from micromamba. This means that docker builds etc. using micromamba can "succeed" even without pip dependencies installed successfully, resulting in silently broken images.

Example: Using this simple environment.yml:

name: base
channels:
  - conda-forge
dependencies:
  - python=3.9.6
  - pip=21.1.3
  - pip:
      - nonexistentpythonpackage==123.123

and the mambaorg/micromamba:0.20.0 docker image, the following output occurs:

(base) mambauser@f384883f4c2a:/tmp$ micromamba install -y -f /tmp/environment.yml

                                           __
          __  ______ ___  ____ _____ ___  / /_  ____ _
         / / / / __ `__ \/ __ `/ __ `__ \/ __ \/ __ `/
        / /_/ / / / / / / /_/ / / / / / / /_/ / /_/ /
       / .___/_/ /_/ /_/\__,_/_/ /_/ /_/_.___/\__,_/
      /_/

conda-forge/linux-aarch6 [====================] (00m:01s) Done
conda-forge/noarch       [====================] (00m:01s) Done

Transaction

  Prefix: /opt/conda

  Updating specs:

   - python=3.9.6
   - pip=21.1.3
   - pip


  Package                    Version  Build               Channel                         Size
────────────────────────────────────────────────────────────────────────────────────────────────
  Install:
────────────────────────────────────────────────────────────────────────────────────────────────

  + _openmp_mutex                4.5  1_gnu               conda-forge/linux-aarch64      22 KB
  + ca-certificates        2021.10.8  h4fd8a4c_0          conda-forge/linux-aarch64     139 KB
  + ld_impl_linux-aarch64     2.36.1  h02ad14f_2          conda-forge/linux-aarch64     669 KB
  + libffi                       3.3  h884eca8_2          conda-forge/linux-aarch64      55 KB
  + libgcc-ng                 11.2.0  hf1cc4e7_12         conda-forge/linux-aarch64     514 KB
  + libgomp                   11.2.0  hf1cc4e7_12         conda-forge/linux-aarch64     431 KB
  + libstdcxx-ng              11.2.0  h0d0a5bb_12         conda-forge/linux-aarch64       4 MB
  + libzlib                   1.2.11  hb9de7d4_1013       conda-forge/linux-aarch64      71 KB
  + ncurses                      6.3  h01db608_0          conda-forge/linux-aarch64       1 MB
  + openssl                   1.1.1l  hf897c2e_0          conda-forge/linux-aarch64       2 MB
  + pip                       21.1.3  pyhd8ed1ab_0        conda-forge/noarch              1 MB
  + python                     3.9.6  h4f4e160_1_cpython  conda-forge/linux-aarch64      12 MB
  + python_abi                   3.9  2_cp39              conda-forge/linux-aarch64       4 KB
  + readline                     8.1  h1a49cc3_0          conda-forge/linux-aarch64     307 KB
  + setuptools                60.7.0  py39ha65689a_0      conda-forge/linux-aarch64       1 MB
  + sqlite                    3.37.0  hc164836_0          conda-forge/linux-aarch64       2 MB
  + tk                        8.6.11  hd8af866_1          conda-forge/linux-aarch64       3 MB
  + tzdata                     2021e  he74cb21_0          conda-forge/noarch            121 KB
  + wheel                     0.37.1  pyhd8ed1ab_0        conda-forge/noarch             31 KB
  + xz                         5.2.5  h6dd45c4_1          conda-forge/linux-aarch64     357 KB
  + zlib                      1.2.11  hb9de7d4_1013       conda-forge/linux-aarch64      98 KB

  Summary:

  Install: 21 packages

  Total download: 30 MB

────────────────────────────────────────────────────────────────────────────────────────────────

Finished _openmp_mutex                        (00m:00s)              22 KB    210 KB/s
Finished ca-certificates                      (00m:00s)             139 KB    967 KB/s
Finished libgomp                              (00m:00s)             431 KB      3 MB/s
Finished ncurses                              (00m:00s)               1 MB      3 MB/s
Finished ld_impl_linux-aarch64                (00m:00s)             669 KB      2 MB/s
Finished libzlib                              (00m:00s)              71 KB    165 KB/s
Finished libffi                               (00m:00s)              55 KB    109 KB/s
Finished setuptools                           (00m:00s)               1 MB      2 MB/s
Finished python_abi                           (00m:00s)               4 KB      7 KB/s
Finished tk                                   (00m:00s)               3 MB      5 MB/s
Finished xz                                   (00m:00s)             357 KB    516 KB/s
Finished wheel                                (00m:00s)              31 KB     41 KB/s
Finished readline                             (00m:00s)             307 KB    403 KB/s
Finished zlib                                 (00m:00s)              98 KB    121 KB/s
Finished tzdata                               (00m:00s)             121 KB    146 KB/s
Finished libstdcxx-ng                         (00m:00s)               4 MB      5 MB/s
Finished sqlite                               (00m:00s)               2 MB      2 MB/s
Finished libgcc-ng                            (00m:00s)             514 KB    553 KB/s
Finished pip                                  (00m:00s)               1 MB      1 MB/s
Finished openssl                              (00m:00s)               2 MB      2 MB/s
Finished python                               (00m:01s)              12 MB     10 MB/s
Downloading  [====================================================================================================] (00m:02s)   24.60 MB/s
Extracting   [====================================================================================================] (00m:02s)      21 / 21

Transaction starting
Linking ld_impl_linux-aarch64-2.36.1-h02ad14f_2
Linking ca-certificates-2021.10.8-h4fd8a4c_0
Linking libgomp-11.2.0-hf1cc4e7_12
Linking libstdcxx-ng-11.2.0-h0d0a5bb_12
Linking _openmp_mutex-4.5-1_gnu
Linking libgcc-ng-11.2.0-hf1cc4e7_12
Linking libzlib-1.2.11-hb9de7d4_1013
Linking xz-5.2.5-h6dd45c4_1
Linking openssl-1.1.1l-hf897c2e_0
Linking libffi-3.3-h884eca8_2
Linking ncurses-6.3-h01db608_0
Linking zlib-1.2.11-hb9de7d4_1013
Linking readline-8.1-h1a49cc3_0
Linking tk-8.6.11-hd8af866_1
Linking sqlite-3.37.0-hc164836_0
Linking tzdata-2021e-he74cb21_0
Linking python-3.9.6-h4f4e160_1_cpython
Linking pip-21.1.3-pyhd8ed1ab_0
Linking python_abi-3.9-2_cp39
Linking setuptools-60.7.0-py39ha65689a_0
Linking wheel-0.37.1-pyhd8ed1ab_0
Transaction finished

Installing pip packages: nonexistentpythonpackage==123.123
ERROR: Could not find a version that satisfies the requirement nonexistentpythonpackage==123.123 (from versions: none)
ERROR: No matching distribution found for nonexistentpythonpackage==123.123
(base) mambauser@f384883f4c2a:/tmp$ echo $?
0

pip failed, but the micromamba process still raises a zero exit code. In the same docker image, directly running pip install nonexistentpythonpackage==123.123 prints the same error but exits with code 1.

I think this may be related tangentially to #1100 which was solving the problem of pip getting OOM killed?

@wolfv
Copy link
Member

wolfv commented Feb 3, 2022

Thanks for the bug report. This should be fixed by #1442

@wolfv wolfv closed this as completed Feb 3, 2022
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