thoth-station/solver

Solver should have a way to consider other sources for transitive dependencies beside the source of the direct dependency

pacospace opened this issue · 5 comments

Describe the bug
Solving a package from pulp index for gym-donkeycar, requires that all transitive dependencies are available on the same index according to the logic in solver.

To Reproduce
Steps to reproduce the behavior:

  1. Install thoth-solver
  2. Run PYTHONPATH=. pipenv run python3 ./thoth-solver --verbose python -r 'gym-donkeycar===1.1.1' -i https://pulp.operate-first.cloud/pypi/gym-donkeycar/simple --no-transitive

Expected behavior
Solver should have a way to consider other sources for transitive dependencies beside the source of the direct dependency

Screenshots

2022-02-07 11:13:41,929  19 INFO     thoth.common:319: Setting up logging to a Sentry instance 'sentry.io/1298083', environment 'ocp4-stage' and integrations ['AioHttpIntegration']
2022-02-07 11:13:42,224  19 INFO     thoth.common:366: Logging to rsyslog endpoint is turned off
2022-02-07 11:13:42,227  19 INFO     thoth.solver:66: Thoth Dependency Solver v1.10.3
2022-02-07 11:13:46,729  19 INFO     thoth.solver.python.python:251: Resolving package 'gym-donkeycar' with version specifier '==1.1.1' from 'https://pulp.operate-first.cloud/pypi/gym-donkeycar/simple'
2022-02-07 11:13:47,072  19 WARNING  thoth.python.source:223: It looks like package name does not match the one parsed from artifact when parsing version from wheel - package name is gym-donkeycar, pared version is 1.1.1, artifact is gym_donkeycar-1.1.1-py2.py3-none-any.whl
2022-02-07 11:13:47,073  19 INFO     thoth.solver.python.python:272: Adding package 'gym-donkeycar' in version '1.1.1' for solving
2022-02-07 11:13:47,073  19 INFO     thoth.solver.python.python:279: Using index 'https://pulp.operate-first.cloud/pypi/gym-donkeycar/simple' to discover package 'gym-donkeycar' in version '1.1.1'
2022-02-07 11:14:12,835  19 INFO     thoth.solver.python.python:338: Resolving dependency versions for 'gym' with range None from 'https://pulp.operate-first.cloud/pypi/gym-donkeycar/simple'
2022-02-07 11:14:13,077  19 INFO     thoth.solver.python.base:81: No releases found for package 'gym'
2022-02-07 11:14:14,427  19 CRITICAL root:105: Traceback (most recent call last):
  File "thoth/solver/cli.py", line 164, in <module>
    cli()
  File "/opt/app-root/lib64/python3.8/site-packages/click/core.py", line 1137, in __call__
    return self.main(*args, **kwargs)
  File "/opt/app-root/lib64/python3.8/site-packages/click/core.py", line 1062, in main
    rv = self.invoke(ctx)
  File "/opt/app-root/lib64/python3.8/site-packages/click/core.py", line 1668, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/opt/app-root/lib64/python3.8/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/opt/app-root/lib64/python3.8/site-packages/click/core.py", line 763, in invoke
    return __callback(*args, **kwargs)
  File "/opt/app-root/lib64/python3.8/site-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "thoth/solver/cli.py", line 142, in python
    result = resolve_python(
  File "/opt/app-root/lib64/python3.8/site-packages/thoth/solver/python/python.py", line 410, in resolve
    solver_result = _do_resolve_index(
  File "/opt/app-root/lib64/python3.8/site-packages/thoth/solver/python/python.py", line 344, in _do_resolve_index
    resolved_versions = _resolve_versions(
  File "/opt/app-root/lib64/python3.8/site-packages/thoth/solver/python/python.py", line 202, in _resolve_versions
    assert len(resolved_versions.keys()) == 1, "Resolution of one package version ended with multiple packages."
AssertionError: Resolution of one package version ended with multiple packages.

Additional context
Check: thoth-station/graph-refresh-job#669

goern commented

looks like you are working on this?

/assign @fridex

goern commented

what is the priority of this?

what is the priority of this?

Maybe critical urgent as it is related to thoth-station/graph-refresh-job#669 with same priority?

This has been fixed by #5116 and changes were successfully tested in the stage environment. We can consider this as done.

/close

@fridex: Closing this issue.

In response to this:

This has been fixed by #5116 and changes were successfully tested in the stage environment. We can consider this as done.

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.