Closed ekohl closed 1 year ago
I don't know if the original maintainers are as active on this repository -- should we merge and handle the release @ekohl ?
I was looking at this and found some more things. However, I need to check them. My plan is to build a new dev env and verify it. Then also mark this plugin as "looking for maintainer".
This is now much larger. I included a rewrite to the settings DSL since the old style is deprecated. I'll have to see about setting up a test env to verify this.
@ezr-ondrej would you mind taking a look if this approach makes sense?
@ezr-ondrej while I have your attention, do you know what the best solution for the Rubocop fixes is? I'm mostly wondering because they come from theforeman-rubocop (which probably still needs a new owner):
/home/jenkins/workspace/puppetdb_foreman-pull-request/database/postgresql/label/fast/ruby/2.7/plugin/app/models/concerns/orchestration/puppetdb.rb:26:51: C: Style/FormatStringToken: Prefer annotated tokens (like %<foo>s) over template tokens (like %{foo}).
failure format(_("Failed to deactivate node %{name} in PuppetDB: %{message}\n "), name: name, message: e.message), e
^^^^^^^
/home/jenkins/workspace/puppetdb_foreman-pull-request/database/postgresql/label/fast/ruby/2.7/plugin/app/models/concerns/orchestration/puppetdb.rb:26:72: C: Style/FormatStringToken: Prefer annotated tokens (like %<foo>s) over template tokens (like %{foo}).
failure format(_("Failed to deactivate node %{name} in PuppetDB: %{message}\n "), name: name, message: e.message), e
^^^^^^^^^^
Looking at the Foreman code it is mostly using _('...') % {}
rather than format()
. Should this be doing the same?
/home/jenkins/workspace/puppetdb_foreman-pull-request/database/postgresql/label/fast/ruby/2.7/plugin/app/services/puppetdb_host.rb:14:10: C: Rails/SkipsModelValidations: Avoid using update_attribute because it skips validations.
host.update_attribute(environment: environment) if environment
I'm not sure what the best solution is here. Simply skip it for now?
I'm not sure what the best solution is here. Simply skip it for now?
Yeah, I'd go with a skip :)
For foreman-puppet I went with format
as it is prefered way to go in modern Ruby it seems and I'd like if Rubocop does that for us (shift us towards the new standards) but only if it doesnt hurt I'd say :)
hey, I noticed that if I upgrade my foreman from 2.1.4 to 2.2, despite the Foreman will have the hosts and puppet agent will sync fine, my Icinga collector will stop working. Is this related to new foreman compatibility?
can this PR pushed forward please ? ... foreman 3.4 is not working anymore if the plugin is installed without a fix. So many users seems to be affected.
Thanks to @kamils-iRonin #74 was merged. I'll rebase this.
Reduced to just dropping PuppetDB API v1 & v3 support.
Thanks a bunch!
Puppet 6 & 7 only support v4 and older version are EOL.