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

puppet tries to install latest version of a pip package on every run #638

Closed
saz opened this issue Jul 21, 2022 · 0 comments · Fixed by #639
Closed

puppet tries to install latest version of a pip package on every run #638

saz opened this issue Jul 21, 2022 · 0 comments · Fixed by #639
Labels
bug Something isn't working skip-changelog

Comments

@saz
Copy link
Contributor

saz commented Jul 21, 2022

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 6
  • Ruby: 2.7
  • Distribution: Debian Bullseye
  • Module version: 6.3.0

How to reproduce (e.g Puppet code you use)

ensure_resource('python::pip', 'check-systemd', {'ensure' => 'latest', 'pip_provider' => 'pip3'})

What are you seeing

Puppet tries to install the package on each run

What behaviour did you expect instead

Puppet tries to install the package only once

Output log

Notice: /Stage[main]/Profile::Base::Common/Python::Pip[check-systemd]/Exec[pip_install_check-systemd]/returns: executed successfully (corrective)

Any additional information you'd like to impart

pip changed the dependency resolver in version 20.3. There's more information here: https://stackoverflow.com/a/26664162
As the command to find the latest version is returning an error instead of version numbers, there is no latest version available and that's why puppet tries to install the package on each run

Looks like as if we need to use a different command, depending on the pip version.

pip 20.3.4:

root@machine ~ # pip install --use-deprecated=legacy-resolver check-systemd==
ERROR: Could not find a version that satisfies the requirement check-systemd== (from versions: 2.0.1, 2.0.2, 2.0.3, 2.0.4, 2.0.6, 2.0.7, 2.0.8, 2.0.9, 2.1.0, 2.2.0, 2.2.1, 2.3.0, 2.3.1)
ERROR: No matching distribution found for check-systemd==

pip 20.0.2:

root@machine:~# pip install check-systemd==
ERROR: Could not find a version that satisfies the requirement check-systemd== (from versions: 2.0.1, 2.0.2, 2.0.3, 2.0.4, 2.0.6, 2.0.7, 2.0.8, 2.0.9, 2.1.0, 2.2.0, 2.2.1, 2.3.0, 2.3.1)
ERROR: No matching distribution found for check-systemd==

pip 20.1.1:

root@machine:~# pip install check-systemd==
ERROR: Could not find a version that satisfies the requirement check-systemd== (from versions: 2.0.1, 2.0.2, 2.0.3, 2.0.4, 2.0.6, 2.0.7, 2.0.8, 2.0.9, 2.1.0, 2.2.0, 2.2.1, 2.3.0, 2.3.1)
ERROR: No matching distribution found for check-systemd==

pip 19.1.1:

root@machine:~# pip install check-systemd==
Collecting check-systemd==
  ERROR: Could not find a version that satisfies the requirement check-systemd== (from versions: 2.0.1, 2.0.2, 2.0.3, 2.0.4, 2.0.6, 2.0.7, 2.0.8, 2.0.9, 2.1.0, 2.2.0, 2.2.1, 2.3.0, 2.3.1)
ERROR: No matching distribution found for check-systemd==

pip 22.0.4:

root@machine:~# pip install check-systemd==
ERROR: Could not find a version that satisfies the requirement check-systemd== (from versions: 2.0.1, 2.0.2, 2.0.3, 2.0.4, 2.0.6, 2.0.7, 2.0.8, 2.0.9, 2.1.0, 2.2.0, 2.2.1, 2.3.0, 2.3.1)
ERROR: No matching distribution found for check-systemd==
saz added a commit to saz/puppet-python that referenced this issue Jul 23, 2022
@evgeni evgeni added the bug Something isn't working label Oct 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working skip-changelog
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants