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

Ensure that channels match expected value in conda-build #365

Merged
merged 28 commits into from
Nov 15, 2023
Merged

Conversation

jaimergp
Copy link
Contributor

@jaimergp jaimergp commented Nov 8, 2023

Description

Following up on conda/conda-build#5037. Closes #363.

This issue is caused by a discrepancy in how each PackageRecord is built. conda will take defaults (a multichannel) as the "brand" channel for a PackageRecord, but libmamba takes the actual physical channel (e.g. pkgs/main) as the "brand" channel.

This is not an issue in conda itself because it uses a different mechanism to fetch the PackageRecords, but in conda-build it ends up raising a KeyError because of the channel identifier mismatch.

Let's see if mapping them for conda-build helps.

Checklist - did you ...

  • Add a file to the news directory (using the template) for the next release's release notes?
  • Add / update necessary tests?
  • Add / update outdated documentation?

@conda-bot conda-bot added the cla-signed [bot] added once the contributor has signed the CLA label Nov 8, 2023
@jaimergp
Copy link
Contributor Author

jaimergp commented Nov 9, 2023

Intriguing that conda-libmamba-solver-src/tests/test_downstream.py::test_build_recipe[jedi] fails in all platforms but Linux-conda-forge with:

WARNING: failed to get install actions, retrying.  exception was: Unsatisfiable dependencies for platform linux-64: {MatchSpec("3.10.*==*_cp310"), MatchSpec("jedi==0.17.2=py310_1")}
Encountered problems while solving:
  - nothing provides python_abi 3.10.* *_cp310 needed by jedi-0.17.2-py310_1

Could not solve for environment specs
The following package could not be installed
└─ jedi 0.17.2.* py310_1 is not installable because it requires
   └─ python_abi 3.10.* *_cp310, which does not exist (perhaps a missing channel).
WARNING:conda_build.environ:failed to get install actions, retrying.  exception was: Unsatisfiable dependencies for platform linux-64: {MatchSpec("3.10.*==*_cp310"), MatchSpec("jedi==0.17.2=py310_1")}
Encountered problems while solving:
  - nothing provides python_abi 3.10.* *_cp310 needed by jedi-0.17.2-py310_1

Could not solve for environment specs
The following package could not be installed
└─ jedi 0.17.2.* py310_1 is not installable because it requires
   └─ python_abi 3.10.* *_cp310, which does not exist (perhaps a missing channel).

Of course, it passes locally if run isolated.

It's also intriguing that newly added test required three reruns to pass, consistently:

../conda-libmamba-solver-src/tests/test_channels.py::test_channel_matchspec PASSED [  1%]
../conda-libmamba-solver-src/tests/test_channels.py::test_channels_prefixdata PASSED [  2%]
../conda-libmamba-solver-src/tests/test_channels.py::test_channels_installed_unavailable PASSED [  3%]
../conda-libmamba-solver-src/tests/test_channels.py::test_mirrors_do_not_leak_channels[_setup_channels_alias] PASSED [  4%]
../conda-libmamba-solver-src/tests/test_channels.py::test_mirrors_do_not_leak_channels[_setup_channels_custom] PASSED [  5%]
../conda-libmamba-solver-src/tests/test_channels.py::test_jax_and_jaxlib PASSED [  6%]
../conda-libmamba-solver-src/tests/test_channels.py::test_encoding_file_paths PASSED [  7%]
../conda-libmamba-solver-src/tests/test_channels.py::test_conda_build_with_aliased_channels RERUN [  8%]  <<<
../conda-libmamba-solver-src/tests/test_channels.py::test_conda_build_with_aliased_channels RERUN [  8%]  <<<
../conda-libmamba-solver-src/tests/test_channels.py::test_conda_build_with_aliased_channels PASSED [  8%]  <<< HERE!
../conda-libmamba-solver-src/tests/test_downstream.py::test_build_recipe[baddeps] PASSED [  9%]
../conda-libmamba-solver-src/tests/test_downstream.py::test_build_recipe[jedi] RERUN [ 10%]
../conda-libmamba-solver-src/tests/test_downstream.py::test_build_recipe[jedi] RERUN [ 10%]
../conda-libmamba-solver-src/tests/test_downstream.py::test_build_recipe[jedi] RERUN [ 10%]
../conda-libmamba-solver-src/tests/test_downstream.py::test_build_recipe[jedi] FAILED [ 10%]

@jezdez
Copy link
Member

jezdez commented Nov 9, 2023

pre-commit.ci autofix

@jaimergp
Copy link
Contributor Author

Errors (test_conda_downgrade) are known, and hopefully tamed by #378. So I'd say we merge :)

@jaimergp jaimergp marked this pull request as ready for review November 13, 2023 20:37
@jaimergp jaimergp merged commit a5036a8 into main Nov 15, 2023
67 of 69 checks passed
@jaimergp jaimergp deleted the fix-363 branch November 15, 2023 08:39
@github-actions github-actions bot added the locked [bot] locked due to inactivity label Dec 12, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla-signed [bot] added once the contributor has signed the CLA locked [bot] locked due to inactivity
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Conda build 3.27.1 fails with libmamba solver with key error then an assert error when key error corrected
3 participants