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

2.0.3-0 breaks mamba-org/setup-micromamba@v2 GH Action #3576

Open
3 tasks done
kmuehlbauer opened this issue Nov 6, 2024 · 25 comments
Open
3 tasks done

2.0.3-0 breaks mamba-org/setup-micromamba@v2 GH Action #3576

kmuehlbauer opened this issue Nov 6, 2024 · 25 comments

Comments

@kmuehlbauer
Copy link

Troubleshooting docs

  • My problem is not solved in the Troubleshooting docs

Anaconda default channels

  • I do NOT use the Anaconda default channels (pkgs/* etc.)

How did you install Mamba?

Other (please describe)

Search tried in issue tracker

no other issue found

Latest version of Mamba

  • My problem is not solved with the latest version

Tried in Conda?

Not applicable

Describe your issue

With latest micromamba 2.0.3-0 our CI mamba-org/setup-micromamba@v2 GH Action stopped working.

See https://github.com/pydata/xarray/actions/runs/11704038363/job/32595639555

/home/runner/micromamba-bin/micromamba list -r /home/runner/micromamba -n xarray-tests
  critical libmamba could not load prefix data
Error: The process '/home/runner/micromamba-bin/micromamba' failed with exit code 1

mamba info / micromamba info

/home/runner/micromamba-bin/micromamba info -r /home/runner/micromamba -n xarray-tests
  
         libmamba version : 2.0.3
       micromamba version : 2.0.3
             curl version : libcurl/8.10.1 OpenSSL/3.3.2 zlib/1.3.1 zstd/1.5.6 libssh2/1.11.0 nghttp2/1.64.0
       libarchive version : libarchive 3.7.4 zlib/1.2.13 bz2lib/1.0.8 libzstd/1.5.6
         envs directories : /home/runner/micromamba/envs
            package cache : /home/runner/micromamba/pkgs
                            /home/runner/.mamba/pkgs
              environment : xarray-tests
             env location : /home/runner/micromamba/envs/xarray-tests
        user config files : /home/runner/.mambarc
   populated config files : /home/runner/work/_temp/setup-micromamba/.condarc
         virtual packages : __unix=0=0
                            __linux=6.5.0=0
                            __glibc=2.35=0
                            __archspec=1=x86_64_v3
                 channels : https://conda.anaconda.org/conda-forge/linux-64
                            https://conda.anaconda.org/conda-forge/noarch
         base environment : /home/runner/micromamba
                 platform : linux-64

Logs

https://github.com/pydata/xarray/actions/runs/11704038363/job/32595639555

environment.yml

name: xarray-tests
channels:
  - conda-forge
  - nodefaults
dependencies:
  - aiobotocore
  - array-api-strict
  - boto3
  - bottleneck
  - cartopy
  - cftime
  - dask-core
  - dask-expr # dask raises a deprecation warning without this, breaking doctests
  - distributed
  - flox
  - fsspec
  - h5netcdf
  - h5py
  - hdf5
  - hypothesis
  - iris
  - lxml # Optional dep of pydap
  - matplotlib-base
  - nc-time-axis
  - netcdf4
  - numba
  - numbagg
  - numexpr
  - numpy>=2
  - opt_einsum
  - packaging
  - pandas
  # - pint>=0.22
  - pip
  - pooch
  - pre-commit
  - pyarrow # pandas raises a deprecation warning without this, breaking doctests
  - pydap
  # start pydap server dependencies, can be removed if pydap-server is available
  - gunicorn
  - PasteDeploy
  - docopt-ng
  - Webob
  - Jinja2
  - beautifulsoup4
  # end pydap server dependencies
  - pytest
  - pytest-cov
  - pytest-env
  - pytest-xdist
  - pytest-timeout
  - rasterio
  - scipy
  - seaborn
  - sparse
  - toolz
  - typing_extensions
  - zarr

~/.condarc

no input
@kapiraman
Copy link

I can reproduce this on the powershell command-line with micromamba.

PS C:\Users\Me> micromamba env create -yqn minrepro python<3.13
PS C:\Users\Me> micromamba list -n minrepro
critical libmamba could not load prefix data
PS C:\Users\Me> micromamba --version
2.0.3

It does not repro with unconstrained python (or python=3.13).

@jnooree
Copy link

jnooree commented Nov 6, 2024

same issue here. (mamba-org/micromamba-releases#62)

@ocefpaf
Copy link
Contributor

ocefpaf commented Nov 7, 2024

@JohanMabille
Copy link
Member

micromamba 2.0.3 has been marked as broken, and the release removed from micromamba-releases. micromamba 2.0.2 should be downloaded as the latesst, this should fix the issues for now.

@Klaim
Copy link
Member

Klaim commented Nov 7, 2024

Another example of that issue in https://github.com/pyoceans/nbrr/actions/runs/11719160248/job/32641844119?pr=28

Note that In these logs we can see that the source of the issue is an exception coming from python. The end log is the same, but the initial report here does not have that python excpetion.

When "could not load prefix data" error occurs we lose the original error message that lead to that point, so I made a pr to help with that: #3581 That might clarify what's happening and distinguish the different sources of problem.

Unfortunately so far I cannot reproduce the error based on the initial report (using the env on window but removing gunicorn) neither with kapiraman's repro. But I'm looking into the details.

@kapiraman
Copy link

micromamba 2.0.3 has been marked as broken, and the release removed from micromamba-releases. micromamba 2.0.2 should be downloaded as the latesst, this should fix the issues for now.

Unfortunately 2-2.0.2 had another issue preventing micromamba from creating environments with pip packages on windows.

(Which seems to be fixed in 2.0.3, so that's progress!)

@Klaim
Copy link
Member

Klaim commented Nov 12, 2024

We think the issue might be fixed by #3584
However we suspect there might be actually several issues, it's hard to say because of the variety of reports and lack of info provided by the error output. We intend to release an alpha with that fix and #3581 to help figure out the other problems if they appear.
If you intend to try that alpha, consider also adding --log-verbose 1 in the list command in your scripts for more helpful data.

@maresb
Copy link
Contributor

maresb commented Nov 12, 2024

I'm very eager to try it out in the context of conda-lock. Would you please be able to post here with instructions once the alpha is available?

@Klaim
Copy link
Member

Klaim commented Nov 12, 2024

Yes 👍🏽
The alpha release is now available e1bdc94
EDIT: I just learned that there is apparently an issue preventing the release, but it's coming imminently.

In your ci scripts that reproduces the issue, add --log-level 1 to the micromamba (or mamba) commands which were previously failing (micromamba list at a minimum, not really needed for the env creation).
If it fails again but in another command, add that flag in these other commands.
Then report here so that we get a better idea of if there are issues we couldn't reproduce yet.
Thanks for your help!

@kapiraman
Copy link

Looks good for my use case. Using the 2.0.4-alpha win-64 build artifact, I can't repro.

@maresb
Copy link
Contributor

maresb commented Nov 12, 2024

@kapiraman
Copy link

@maresb I used the built artifact directly for my command-line case. For setup-micromamba, it looks like you could use micromamba-url instead of micromamba-version. But the artifact link is both cookie-protected and zipped... so I guess you'd need to host the unzipped binary yourself. I have not tried this, it's just an idea.

@maresb
Copy link
Contributor

maresb commented Nov 13, 2024

Thanks @kapiraman for the hints! I didn't notice the micromamba-url option. I don't have self-hosting handy, and it doesn't look like setup-micromamba handles extraction for a conda-forge URL, so I don't see any way I can get it with reasonable effort.

Would it be able to cut a release for the alpha on micromamba-releases? It seems like I should be able to use micromamba-url with that.

@Hind-M
Copy link
Member

Hind-M commented Nov 13, 2024

@maresb micromamba 2.0.4alpha1 is available now on micromamba-releases.

@maresb
Copy link
Contributor

maresb commented Nov 13, 2024

Here's the result:

  /home/runner/micromamba-bin/micromamba list -r /home/runner/micromamba -n conda-lock-dev
  critical libmamba could not load prefix data: [json.exception.parse_error.101] parse error at line 1, column 1: syntax error while parsing value - invalid literal; last read: '<U+001B>'

@Klaim, I added log-level: trace, but unfortunately it doesn't seem to work on the micromamba list step.

@Klaim
Copy link
Member

Klaim commented Nov 13, 2024

@maresb Thanks! Did you try with --log-level 1 ? This should clarify to us which source of json is being parsed before failing.

That error is different from the one already fixed so that's progress.

@maresb
Copy link
Contributor

maresb commented Nov 13, 2024

Great! Could you please be more specific with your suggestion? Where can I insert --log-level 1 so that it executes in the micromamba list step of the setup-micromamba action?

@Klaim
Copy link
Member

Klaim commented Nov 13, 2024

Great! Could you please be more specific with your suggestion? Where can I insert --log-level 1 so that it executes in the micromamba list step of the setup-micromamba action?

Ah sorry I thought you were running the list command through a custom script. I'll have to check how setup-micromamba work and why log-level: trace doesnt work

@kapiraman
Copy link

It's because this line doesn't pass in options.logLevel.

@maresb
Copy link
Contributor

maresb commented Nov 13, 2024

I went ahead and forked setup-micromamba to add the logging. Here are the full logs

...
info     libmamba Loading single package record: "/home/runner/micromamba/envs/conda-lock-dev/conda-meta/libcurl-8.11.0-hbbe4b11_0.json"
  info     libmamba Loading single package record: "/home/runner/micromamba/envs/conda-lock-dev/conda-meta/click-default-group-1.2.4-pyhd8ed1ab_0.json"
  info     libmamba Loading site packages
  critical libmamba could not load prefix data: [json.exception.parse_error.101] parse error at line 1, column 1: syntax error while parsing value - invalid literal; last read: '<U+001B>'

@Klaim
Copy link
Member

Klaim commented Nov 14, 2024

@maresb We still fail to reproduce that issue and we need to see what's that data being parsed (we have some idea of what is failing but not sure) so we'll release another alpha with more logs when that error occurs

@maresb
Copy link
Contributor

maresb commented Nov 14, 2024

Sounds good @Klaim, thanks so much for all the effort to the bottom of this! I await the next alpha release in micromamba-releases.

@Hind-M
Copy link
Member

Hind-M commented Nov 15, 2024

Hey @maresb! The new alpha is available on micromamba-releases.

@maresb
Copy link
Contributor

maresb commented Nov 15, 2024

Great, thanks! Please see https://github.com/conda/conda-lock/actions/runs/11855193213/job/33038908463?pr=720#step:5:416

@wolfv
Copy link
Member

wolfv commented Nov 15, 2024

looks like pip uses rich output by default?

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

9 participants