-
Notifications
You must be signed in to change notification settings - Fork 104
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
MD5 check error while installing environment #748
Comments
Thanks @romulorosa for the detailed report! It seems to me like the root of the problem is that Could you please check if you can reproduce the error from pipx install --force 'git+https://github.com/conda/conda-lock@main' where |
All the conda-lock users that I support at my firm have been hitting this issue too, and unfortunately it still reproduces with the latest development version of conda-lock.
|
Thanks for the additional info! I haven't been able to reproduce this yet. I'm using Docker in an attempt to achieve a portable reproducer.
FROM mambaorg/micromamba:2.0.2
RUN micromamba install -y conda-lock
COPY environment.yml /tmp
ARG MAMBA_DOCKERFILE_ACTIVATE=1
RUN conda-lock
RUN conda-lock install -n conda-lock-748-test
channels:
- conda-forge
dependencies:
- protobuf
platforms:
- linux-64 Any ideas? Thanks! |
I was able to intercept the temporary file that
Please note that the output will be nondeterministic -- conda mentions only one of the many packages that caused a checksum mismatch error, and picks a different one every time -- though after running the above command 100 times, it resulted in a checksum mismatch failure every time. I attempted to minimize the attached lockfile to only include one of the packages associated with a checksum mismatch error, but the issue did not reproduce in that case. Any ideas? Thanks for your help with this! |
(Hi from my personal account) Meant to say, like the OP, I am also using Linux. I just found conda/conda#13488 which also mentions conda-lock but they are using Windows. Related? |
Looked into conda/conda#13488 further, and confirmed I too have .partial files in my pkgs_dir, and when I remove those, I can no longer reproduce this. So that does look like the same issue, and it seems it is more likely to occur when using conda-lock. |
Amazing effort, thanks so much @ctcjab for tracking this down, it's much appreciated!!! Now there's the issue of how to proceed. Based on the upstream discussion, I really don't understand how this mismatch actually arises. It gives me the impression that there is a subtle bug that nobody has figured out yet. Some approaches I can think of:
Obviously 1. would be ideal, but I'm not going to manage that. I think that @ctcjab has a good chance at uncovering the underlying bug by pushing a little bit deeper. I like 2. because it's low-effort, but it's not so ideal for users. As for 3. it feels a bit convoluted, but it could work. What do you think? |
Are we using the same |
I don't know, I don't think conda-lock does anything directly with the |
Checklist
What happened?
I generated a conda-lock file and later tried to create an environment based on the conda-lock file. However, while resolving the packages, an error was thrown saying that the expected MD5 did not match the current MD5.
In some cases, I checked the MD5 in my conda-lock and they would match the ones in https://conda.anaconda.org and https://repo.anaconda.com but even though the conda-lock install would return a different MD5.
What solved my problem was to delete all the content in
~/miniconda3/pkgs/
.How to reproduce:
I noticed that when I regenerated the conda-lock for the first time, the conda-lock file generated would contain a lot of
.tar.bz2
files instead of.conda
which usually happens. When I tried creating the environment, the conda-lock install returned 404 for most of the.tar.bz2
files.Then I tried to generate the conda-lock file once more, and then I noticed that most of the files were
.conda
files this time. When I tried to install the environment again the 404 was not present anymore but the MD5 issues happened.So, in order to reproduce the error do the following:
.conda
andtar.bz2
(such asaiohappyeyeballs
)tar.bz2
) and make sure to update the MD5 and SHA based on the ones available in the repository (I was using this one https://repo.anaconda.com/pkgs/main/linux-64/)Additional Context
Setup:
conda 24.9.2
conda-lock, version 2.5.6
OS: Debian Linux f1fabfdb4ca8 5.15.49-linuxkit #1 SMP PREEMPT Tue Sep 13 07:51:32 UTC 2022 x86_64 GNU/Linux
The text was updated successfully, but these errors were encountered: