spreaker / prometheus-pgbouncer-exporter

Prometheus exporter for PgBouncer
MIT License
104 stars 39 forks source link

PyYAML absolute dependency breaks install on systems that also include kubernetes client libraries #39

Closed ndavidson-pulse closed 2 years ago

ndavidson-pulse commented 3 years ago

We have a docker container which pip3 installs via a requirements.txt file that contains kubernetes==18.20.0 and prometheus-pgbouncer-exporter==2.1.1 this fails because of the absolute dependency in prometheus-pgbouncer-exporters requirements with the following error:

ERROR: Cannot install -r /requirements.txt (line 6), -r /requirements.txt (line 8) and PyYAML==5.4.1 because these package versions have conflicting dependencies.

The conflict is caused by:
    The user requested PyYAML==5.4.1
    kubernetes 18.20.0 depends on pyyaml>=5.4.1
    prometheus-pgbouncer-exporter 2.1.1 depends on PyYAML==5.3.1

I believe the correct fix is to update the absolute dependency to be a minimum version constraint - e.g.

- PyYAML==5.4
+ PyYAML>=5.4.1