jfrog / jfrog/jfrog-cli

Poetry version solving fails when running `jf poetry install`

Open
#3,306 1 comment 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug dev-approved
Dominant language
Go
Stars
595
Forks
307
Avg merge
4d 17h
Merged PRs (30d)
17

Description

Describe the bug

When running poetry commands, the JFrog CLI will invoke poetry update, which now fails following the update to version 2.87.0.

Current behavior

When running any jf poetry command (for example jf poetry install):

❮ JFROG_CLI_LOG_LEVEL="DEBUG" jf poetry install
10:41:19 [Debug] JFrog CLI version: 2.87.0
10:41:19 [Debug] OS/Arch: darwin/arm64
10:41:19 [Debug] Trace ID for JFrog Platform logs: 8d5b657ed35b5a20
10:41:19 [Debug] Preparing to read the config file /Users/user/Developer/sample-python-project/.jfrog/projects/poetry.yaml
10:41:19 [Debug] Found resolver in the config file /Users/user/Developer/sample-python-project/.jfrog/projects/poetry.yaml
10:41:19 [🔵Info] Running Poetry install.
10:41:19 [Debug] Running poetry config command...
10:41:19 [Debug] Sending HTTP GET request to: https://tenant.jfrog.io/artifactory/api/system/version
10:41:19 [Debug] Artifactory response: 200 
10:41:19 [Debug] Artifactory Call Home: Sending info...
10:41:19 [Debug] Sending HTTP POST request to: https://tenant.jfrog.io/artifactory/api/system/usage
10:41:19 [Debug] Sending HTTP POST request to: https://tenant.jfrog.io/jfconnect/api/v1/backoffice/metrics/log
10:41:19 [Debug] Running poetry config command...
10:41:20 [🔵Info] Added tool.poetry.source name:"internalteam-pypi-prod" url:"https://tenant.jfrog.io/artifactory/api/pypi/internalteam-pypi-prod"
10:41:20 [🔵Info] Running Poetry update
Updating dependencies
Resolving dependencies... (0.1s)

Because sample-python-project depends on boto3 (>=1.42.24,<2.0.0) which doesn't match any versions, version solving failed.
10:41:20 [🔵Info] Trace ID for JFrog Platform logs: 8d5b657ed35b5a20
10:41:20 [🚨Error] Poetry config command failed with: exit status 1

Here are the debug logs for the poetry update:

❮ poetry update -vv
Using virtualenv: /Users/user/Library/Caches/pypoetry/virtualenvs/sample-python-project-RaoHFK2d-py3.13
Checking keyring availability: Available
Updating dependencies
Resolving dependencies...
   1: fact: sample-python-project is 0.1.0
   1: derived: sample-python-project
   1: fact: sample-python-project depends on boto3 (>=1.42.24,<2.0.0)
   1: selecting sample-python-project (0.1.0)
   1: derived: boto3 (>=1.42.24,<2.0.0)
   1: fact: no versions of boto3 match >=1.42.24,<2.0.0
   1: conflict: no versions of boto3 match >=1.42.24,<2.0.0
   1: ! boto3 (>=1.42.24,<2.0.0) is satisfied by boto3 (>=1.42.24,<2.0.0)
   1: ! which is caused by "sample-python-project depends on boto3 (>=1.42.24,<2.0.0)"
   1: ! thus: version solving failed
   1: Version solving took 0.120 seconds.
   1: Tried 1 solutions.

  Stack trace:

  4  ~/.local/pipx/venvs/poetry/lib/python3.13/site-packages/poetry/puzzle/solver.py:170 in _solve
       result = resolve_version(self._package, self._provider)

  3  ~/.local/pipx/venvs/poetry/lib/python3.13/site-packages/poetry/mixology/__init__.py:18 in resolve_version
       return solver.solve()

  2  ~/.local/pipx/venvs/poetry/lib/python3.13/site-packages/poetry/mixology/version_solver.py:191 in solve
       self._propagate(next)

  1  ~/.local/pipx/venvs/poetry/lib/python3.13/site-packages/poetry/mixology/version_solver.py:230 in _propagate
       root_cause = self._resolve_conflict(incompatibility)

  SolveFailureError

  Because sample-python-project depends on boto3 (>=1.42.24,<2.0.0) which doesn't match any versions, version solving failed.

  at ~/.local/pipx/venvs/poetry/lib/python3.13/site-packages/poetry/mixology/version_solver.py:451 in _resolve_conflict
      447│             )
      448│             self._log(f'! which is caused by "{most_recent_satisfier.cause}"')
      449│             self._log(f"! thus: {incompatibility}")
      450│ 
    → 451│         raise SolveFailureError(incompatibility)
      452│ 
      453│     def _get_comp_key(self, dependency: Dependency) -> CompKey:
      454│         """
      455│         Returns a tuple of

The following error occurred when trying to handle this error:


  Stack trace:

  12  ~/.local/pipx/venvs/poetry/lib/python3.13/site-packages/cleo/application.py:327 in run
        exit_code = self._run(io)

  11  ~/.local/pipx/venvs/poetry/lib/python3.13/site-packages/poetry/console/application.py:260 in _run
        exit_code = super()._run(io)

  10  ~/.local/pipx/venvs/poetry/lib/python3.13/site-packages/cleo/application.py:431 in _run
        exit_code = self._run_command(command, io)

   9  ~/.local/pipx/venvs/poetry/lib/python3.13/site-packages/cleo/application.py:473 in _run_command
        raise error

   8  ~/.local/pipx/venvs/poetry/lib/python3.13/site-packages/cleo/application.py:457 in _run_command
        exit_code = command.run(io)

   7  ~/.local/pipx/venvs/poetry/lib/python3.13/site-packages/cleo/commands/base_command.py:117 in run
        return self.execute(io) or 0

   6  ~/.local/pipx/venvs/poetry/lib/python3.13/site-packages/poetry/console/commands/installer_command.py:39 in execute
        return super().execute(io)

   5  ~/.local/pipx/venvs/poetry/lib/python3.13/site-packages/cleo/commands/command.py:61 in execute
        return self.handle()

   4  ~/.local/pipx/venvs/poetry/lib/python3.13/site-packages/poetry/console/commands/update.py:58 in handle
        return self.installer.run()

   3  ~/.local/pipx/venvs/poetry/lib/python3.13/site-packages/poetry/installation/installer.py:103 in run
        return self._do_install()

   2  ~/.local/pipx/venvs/poetry/lib/python3.13/site-packages/poetry/installation/installer.py:241 in _do_install
        solved_packages = solver.solve(

   1  ~/.local/pipx/venvs/poetry/lib/python3.13/site-packages/poetry/puzzle/solver.py:87 in solve
        packages = self._solve()

  SolverProblemError

  Because sample-python-project depends on boto3 (>=1.42.24,<2.0.0) which doesn't match any versions, version solving failed.

  at ~/.local/pipx/venvs/poetry/lib/python3.13/site-packages/poetry/puzzle/solver.py:176 in _solve
      172│             packages = result.packages
      173│         except OverrideNeededError as e:
      174│             return self._solve_in_compatibility_mode(e.overrides)
      175│         except SolveFailureError as e:
    → 176│             raise SolverProblemError(e)
      177│ 
      178│         return self._aggregate_solved_packages(packages)
      179│ 
      180│     def _aggregate_solved_packages(
Reproduction steps
  1. Create a project: poetry init
  2. Add a dependency: poetry add boto3
  3. Run jf poetry-config
  4. Run jf poetry install

Poetry version: 2.1.3

Expected behavior

The issue seems related to the removal of the /simple within the source URL in https://github.com/jfrog/jfrog-cli/pull/3247. When adding back /simple, poetry update now works.

JFrog CLI version

2.87.0

Operating system type and version

MacOS 26.2

JFrog Artifactory version

SaaS

JFrog Xray version

SaaS

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the source-URL change in pull request #3247 and reproduce the issue with poetry init, poetry add boto3, jf poetry-config, and jf poetry install. Done means the JFrog CLI-generated Poetry source URL lets poetry update resolve the dependency successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, python
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.