voxpupuli / puppet-prometheus

Puppet module for prometheus
https://forge.puppet.com/puppet/prometheus
Apache License 2.0
60 stars 241 forks source link

Update options flag to new double dash format #816

Open lbdemv opened 3 weeks ago

lbdemv commented 3 weeks ago

Pull Request (PR) description

The nginx exporter logs the following deprecation warning after startup.

nginx-prometheus-exporter: the flag format is deprecated and will be removed in a future release, please use the new format: --nginx.scrape-uri

This PR intends to fix the deprecated flag format and use the current flag format with double dashes.

This Pull Request (PR) fixes the following issues

No issue opened so far.

TheMeier commented 3 weeks ago

@lbdemv do you know since when the "--" versions are supported? https://github.com/nginxinc/nginx-prometheus-exporter/releases/tag/v1.0.0 ?

lbdemv commented 3 weeks ago

Sorry, I didn't actually check that. I just saw it and went on to fix the current warning...

Maybe I can dwell into that later today, if it is important.

lbdemv commented 3 weeks ago

As i see that, the deprecation change is made in https://github.com/nginxinc/nginx-prometheus-exporter/pull/460 It was a fix for https://github.com/nginxinc/nginx-prometheus-exporter/issues/447

The initial issue seem to be the change to kigpin in https://github.com/nginxinc/nginx-prometheus-exporter/pull/420 which was flagged as a breaking change in the mentioned v1.0.0 changelog

TheMeier commented 3 weeks ago

I see. The default version in this module is currently 0.11.0 (https://github.com/voxpupuli/puppet-prometheus/blob/master/manifests/nginx_prometheus_exporter.pp#L66) so we need a version comparision here. Also there is a pending MR (https://github.com/voxpupuli/puppet-prometheus/pull/783) to update the version but that needs some work :(