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

Conda build 3.27.1 fails with libmamba solver with key error then an assert error when key error corrected #363

Closed
2 tasks done
hsparra opened this issue Nov 7, 2023 · 3 comments · Fixed by #365
Closed
2 tasks done
Labels
locked [bot] locked due to inactivity type::bug describes erroneous operation, use severity::* to classify the type

Comments

@hsparra
Copy link

hsparra commented Nov 7, 2023

Checklist

  • I added a descriptive title
  • I searched open reports and couldn't find a duplicate

What happened?

This is a continuation of issue conda/conda-build#4991. After running the new version the same exception occured at conda/export.py, line 208

File "/home/<username>/.conda/envs/conda-23.9/lib/python3.11/site-packages/conda/exports.py", line 208, in display_actions
actions["LINK"] = [index[d] for d in actions["LINK"]]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/<username>/.conda/envs/conda-23.9/lib/python3.11/site-packages/conda/exports.py", line 208, in <listcomp>
actions["LINK"] = [index[d] for d in actions["LINK"]]
~~~~~^^^
KeyError: Dist(channel='https://<v4 url>/cbuild-test', dist_name='_libgcc_mutex-0.1-main', name='_libgcc_mutex', fmt='.tar.bz2', version='0.1', build_string='main', build_number=0, base_url=None, platform=None)

Per a recommendation line 208 in conda/exports.py was replaced locally with and tested:
actions["LINK"] = [index.get(d, d) for d in actions["LINK"]]

This seemed to address the KeyError but a new AssertError occurs:

assert isinstance(prec, PackageRecord)
AssertionError
-----
conda info......
conda: 23.9.0
conda-build: 3.27.1.dev15
python version: 3.11.5.final.0
conda-libmamba-solver: 23.9.1
libmaba: 1.5.1```

The error was reconfirmed with the released version of 3.27.1.


### Conda Info

```shell
conda: 23.9.0
conda-build: 3.27.1.dev15
python version: 3.11.5.final.0
conda-libmamba-solver: 23.9.1
libmaba: 1.5.1

Conda Config

See conda/conda-build#4991

Conda list

See conda/conda-build#4991

Additional Context

See conda/conda-build#4991

@hsparra hsparra added the type::bug describes erroneous operation, use severity::* to classify the type label Nov 7, 2023
@jaimergp jaimergp transferred this issue from conda/conda-build Nov 8, 2023
@github-project-automation github-project-automation bot moved this from 🆕 New to 🏁 Done in 🧭 Planning Nov 15, 2023
@desilinguist
Copy link

FYI, we use a local Artifactory instance to host our internal packages and a conda-forge cache, and we are still unable to build conda packages unless we set CONDA_SOLVER=classic when calling conda build. We get a KeyError with the mamba solver that looks like this:

Traceback
# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<

    Traceback (most recent call last):
      File "/home/ec2-user/miniconda/lib/python3.10/site-packages/conda/exception_handler.py", line 17, in __call__
        return func(*args, **kwargs)
      File "/home/ec2-user/miniconda/lib/python3.10/site-packages/conda/cli/main.py", line 83, in main_subshell
        exit_code = do_call(args, parser)
      File "/home/ec2-user/miniconda/lib/python3.10/site-packages/conda/cli/conda_argparse.py", line 170, in do_call
        result = plugin_subcommand.action(getattr(args, "_args", args))
      File "/home/ec2-user/miniconda/lib/python3.10/site-packages/conda_build/plugin.py", line 10, in build
        execute(*args, **kwargs)
      File "/home/ec2-user/miniconda/lib/python3.10/site-packages/conda_build/cli/main_build.py", line 572, in execute
        outputs = api.build(
      File "/home/ec2-user/miniconda/lib/python3.10/site-packages/conda_build/api.py", line 254, in build
        return build_tree(
      File "/home/ec2-user/miniconda/lib/python3.10/site-packages/conda_build/build.py", line 3808, in build_tree
        test(pkg, config=metadata.config.copy(), stats=stats)
      File "/home/ec2-user/miniconda/lib/python3.10/site-packages/conda_build/build.py", line 3551, in test
        environ.create_env(
      File "/home/ec2-user/miniconda/lib/python3.10/site-packages/conda_build/environ.py", line 1050, in create_env
        display_actions(actions, index)
      File "/home/ec2-user/miniconda/lib/python3.10/site-packages/conda/exports.py", line 214, in display_actions
        actions["LINK"] = [index[d] for d in actions["LINK"]]
      File "/home/ec2-user/miniconda/lib/python3.10/site-packages/conda/exports.py", line 214, in <listcomp>
        actions["LINK"] = [index[d] for d in actions["LINK"]]
    KeyError: Dist(channel='defaults', dist_name='jdk11-ac-11.0.18.10.1-0', name='jdk11-ac', fmt='.tar.bz2', version='11.0.18.10.1', build_string='0', build_number=0, base_url=None, platform=None)

This happens with:

conda/23.11.0 requests/2.31.0 CPython/3.10.13 Linux/6.1.61-85.141.amzn2023.x86_64 amzn/2023 glibc/2.34 solver/libmamba conda-libmamba-solver/23.11.1 libmambapy/1.5.5

@jaimergp
Copy link
Contributor

We just released 23.12.0, which should alleviate this when paired with conda-build 3.28. Can you check with those versions? If it keeps happening with those versions, please open a new issue with these details. Thanks!

@desilinguist
Copy link

Still fails with conda-libmamba-solver=23.12.0 and conda-build=3.28.1. I have filled #409.

@github-actions github-actions bot added the locked [bot] locked due to inactivity label Aug 27, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked [bot] locked due to inactivity type::bug describes erroneous operation, use severity::* to classify the type
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants