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

Upstream conda tests/test_create.py::IntegrationTests::test_conda_pip_interop_conda_editable_package fails #141

Closed
2 tasks done
costrouc opened this issue Feb 27, 2023 · 1 comment
Labels
locked [bot] locked due to inactivity type::bug describes erroneous operation, use severity::* to classify the type

Comments

@costrouc
Copy link
Contributor

costrouc commented Feb 27, 2023

Checklist

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

What happened?

This issue came up in #133. There is an upstream conda test tests/test_create.py::IntegrationTests::test_conda_pip_interop_conda_editable_package which fails.

This issue can be reproduced via

docker run --rm -it \
       -v /home/costrouc/p/conda/conda:/opt/conda-src \
       -v /home/costrouc/p/conda/conda-libmamba-solver:/opt/conda-libmamba-solver-src \
       -e TEST_SPLITS=3 \
       -e TEST_GROUP=1 \
       -e CONDA_SOLVER=libmamba \
       ghcr.io/conda/conda-ci:main-linux-python3.10-conda-forge \
       bash

Then running

source /opt/conda-libmamba-solver/dev/bashrc_linux.sh
cd /opt/conda-src
pytest tests/test_create.py::IntegrationTests::test_conda_pip_interop_conda_editable_package

Getting the following error

________ IntegrationTests.test_conda_pip_interop_conda_editable_package ________
Traceback (most recent call last):
  File "/opt/conda-src/tests/test_create.py", line 1688, in test_conda_pip_interop_conda_editable_package
    stdout, stderr, _ = run_command(Commands.INSTALL, prefix, "urllib3=1.20", "--dry-run")
  File "/opt/conda-src/conda/testing/integration.py", line 287, in run_command
    result = do_call(args, p)
  File "/opt/conda-src/conda/cli/conda_argparse.py", line 92, in do_call
    return getattr(module, func_name)(args, parser)
  File "/opt/conda-src/conda/notices/core.py", line 121, in wrapper
    return func(*args, **kwargs)
  File "/opt/conda-src/conda/cli/main_install.py", line 20, in execute
    install(args, parser, 'install')
  File "/opt/conda-src/conda/cli/install.py", line 264, in install
    unlink_link_transaction = solver.solve_for_transaction(
  File "/opt/conda-src/conda/core/solve.py", line 130, in solve_for_transaction
    unlink_precs, link_precs = self.solve_for_diff(update_modifier, deps_modifier,
  File "/opt/conda-src/conda/core/solve.py", line 182, in solve_for_diff
    raise RuntimeError("Cannot unlink unmanageable packages:%s"
RuntimeError: Cannot unlink unmanageable packages:
  - <develop>/pypi::urllib3-1.19.1-dev_0

Detailed logs here

Diving into the exact test which fails here

                # should raise an error
                with pytest.raises(PackagesNotFoundError):
                    # TODO: This raises PackagesNotFoundError, but the error should really explain
                    #       that we can't install urllib3 because it's already installed and
                    #       unmanageable. The error should suggest trying to use pip to uninstall it.
                    stdout, stderr, _ = run_command(Commands.INSTALL, prefix, "urllib3=1.20", "--dry-run")

The expect conda behaviour here assuming pip interop which is not an officially supported feature is to remove the urllib3=1.20 spec from being requested by the user since it is controlled by pip. Correctly an error is being thrown but it is not the one that conda expects. It looks as though libmamba-solver does attempt to recommend updating the pip version using conda-forge but conda catches this as an error after the final solve. See https://github.com/conda/conda/blob/main/conda/core/solve.py#L175-L184. Leaving this detailed issue so that in the future if pip interop is more explored we have a good starting point.

@costrouc costrouc added the type::bug describes erroneous operation, use severity::* to classify the type label Feb 27, 2023
@github-project-automation github-project-automation bot moved this to 🆕 New in 🧭 Planning Feb 27, 2023
@jaimergp jaimergp mentioned this issue Feb 28, 2023
43 tasks
@jaimergp
Copy link
Contributor

Merging issue with #143. Closing here.

@github-project-automation github-project-automation bot moved this from 🆕 New to 🏁 Done in 🧭 Planning May 11, 2023
@jaimergp jaimergp closed this as not planned Won't fix, can't repro, duplicate, stale May 11, 2023
@github-actions github-actions bot added the locked [bot] locked due to inactivity label May 11, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 11, 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

No branches or pull requests

2 participants