Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

pip with ensure => latest can spuriously skip the install

Abierto
#350 1 comentario 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
35/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
python
Área
devops

Línea de trabajo

The issue does not name a file or test; start by locating the pip resource's ensure => latest check and reproduce the shown pip search ... | grep ... command. Done means related package results no longer make an unrelated package appear installed, with a regression test for the Google package example.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

The pip resource checks whether the latest version is installed using essentially pip search pkg_name | grep -i INSTALLED.*latest. This can give false positives if you have one or more other related packages already installed, because pip search matches package names and descriptions. It doesn't seem to have an option for matching the package name exactly.

I observed this in practice when installing multiple Google API packages, for example:

  $pip_packages = [
    'google-cloud-core',
    'google-cloud-dataflow',
    'google-cloud-storage',
    'google-api-python-client',
  ]

  python::pip { $pip_packages:
    ensure       => latest,
    virtualenv   => $virtual_env_dir,
    owner        => $::user,
  }

And google-api-python-client spuriously matched a bunch of installed packages:

Debug: Executing with ...: 'pip search  google-api-python-client | grep -i INSTALLED | grep -i latest'
Debug: /Stage[main]/Python::Pip[google-api-python-client]/Exec[pip_install_google-api-python-client]/unless:   INSTALLED: 0.0.2 (latest)
Debug: /Stage[main]/Python::Pip[google-api-python-client]/Exec[pip_install_google-api-python-client]/unless:   INSTALLED: 0.5.0 (latest)
Debug: /Stage[main]/Python::Pip[google-api-python-client]/Exec[pip_install_google-api-python-client]/unless:   INSTALLED: 0.7.5 (latest)
Debug: /Stage[main]/Python::Pip[google-api-python-client]/Exec[pip_install_google-api-python-client]/unless:   INSTALLED: 0.22.1 (latest)
Debug: /Stage[main]/Python::Pip[google-api-python-client]/Exec[pip_install_google-api-python-client]/unless:   INSTALLED: 2.6.0 (latest)
Debug: /Stage[main]/Python::Pip[google-api-python-client]/Exec[pip_install_google-api-python-client]/unless:   INSTALLED: 1.6.0 (latest)
Lenguaje dominante
Ruby
Estrellas
196
Forks
371
Merge medio
5 h 54 min
PR fusionados (30 d)
5

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de voxpupuli/puppet-python

Todos los issues de voxpupuli/puppet-python

Issues similares

Más issues de Ruby

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.