mamba-org / mamba

The Fast Cross-Platform Package Manager
https://mamba.readthedocs.io
BSD 3-Clause "New" or "Revised" License
6.9k stars 356 forks source link

micromamba fails silently when not providing env variables used in condarc #2599

Open pavelzw opened 1 year ago

pavelzw commented 1 year ago

micromamba fails silently when CONDA_API_KEY is not provided here.

❯ cat $CONDARC
channels:
  - secret-channel
  - conda-forge

custom_multichannels:
  secret-channel:
    - https://url.to.secret.channel/t/${CONDA_API_KEY}/get/secret-channel

❯ micromamba create -n testtempenv python

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

warning  libmamba No 'channels' specified
error    libmamba Could not solve for environment specs
    The following package could not be installed
    └─ python   does not exist (perhaps a typo or a missing channel).
critical libmamba Could not solve for environment specs

❯ micromamba --version
1.4.4

❯ micromamba info

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

            environment : None (not found)
           env location : -
      user config files : /Users/pavel/.mambarc
 populated config files :
       libmamba version : 1.4.4
     micromamba version : 1.4.4
           curl version : libcurl/7.87.0 (SecureTransport) LibreSSL/3.3.6 zlib/1.2.11 nghttp2/1.51.0
     libarchive version : libarchive 3.5.3 zlib/1.2.11 liblzma/5.0.5 bz2lib/1.0.8
       virtual packages : __unix=0=0
                          __osx=13.3.1=0
                          __archspec=1=arm64
               channels :
       base environment : /Users/pavel/micromamba
               platform : osx-arm64
AntoinePrv commented 1 year ago

I works when it is provided? I didn't know that was a feature!

pavelzw commented 1 year ago

We actually use it very often like this at work 😅

jonashaag commented 1 year ago

See https://github.com/mamba-org/mamba/pull/1423

It's also implemented in Conda :)