voxpupuli / puppet-kibana

Kibana Puppet module by Elastic.
Apache License 2.0
16 stars 48 forks source link

Discrepancy in lib/puppet_x/elastic/hash.rb library file between kibana and elasticsearch modules #42

Closed shaunbugler closed 2 years ago

shaunbugler commented 4 years ago

Bug Report

Bug description

When using both the elasticsearch and kibana puppet modules, depending on the environment you get the lib/puppet_x/elastic/hash.rb file changing from the one provided by elasticsearch and the one provided by kibana. I believe this is due to the last update of elasticsearch from version 6.3.1 to 6.4.0 and the kibana module not following it

This is the same as issue #41

Expected behavior:

Consistent puppet runs across all environments when using both elasticsearch and kibana modules

Observed behavior:

hash.rb is updated when running different puppet environments

serverX (Stretch) ~ # diff /etc/puppetlabs/puppet/environments/production/modules/elasticsearch/lib/puppet_x/elastic/hash.rb /etc/puppetlabs/puppet/environments/production/modules/kibana/lib/puppet_x/elastic/hash.rb
67d66
<         return to_enum(:each_pair) unless block_given?
71d69
<         self

Puppet run logs:

Notice: /File[/opt/puppetlabs/puppet/cache/lib/puppet_x/elastic/hash.rb]/content: 
--- /opt/puppetlabs/puppet/cache/lib/puppet_x/elastic/hash.rb   2020-04-02 15:38:23.456567786 +0200
+++ /tmp/puppet-file20200403-40095-tffv5z       2020-04-03 09:27:51.847891889 +0200
@@ -64,11 +64,9 @@
       # Override each_pair with a method that yields key/values in
       # sorted order.
       def each_pair
-        return to_enum(:each_pair) unless block_given?
         keys.sort.each do |key|
           yield key, self[key]
         end
-        self
       end
     end
   end

Notice: /File[/opt/puppetlabs/puppet/cache/lib/puppet_x/elastic/hash.rb]/content: content changed '{md5}4300b3a1327121c196bc7c02e51055e4' to '{md5}159abda7275f5bc45f354ce4fc59cce9'

Feature Request

Bring the kibana module to version 6.4.0 with the update library to match the elasticsearch module

shaunbugler commented 4 years ago

Seems it time to fork and fix ourselves?

fatmcgav commented 4 years ago

Hey @shaunbugler

Apologies for the radio silence here. Unfortunately there are lots of competing priorities for time right now, and the current focus is on updating the Elasticsearch module to support version 7 and also refactor a lot of code there.

PR's for fixing bugs or adding new functionality are always welcome, so if you fancy taking a stab at it rather than forking please feel free. We can provide feedback etc if required.

Thanks in advance.

shaunbugler commented 4 years ago

Hey @shaunbugler

Apologies for the radio silence here. Unfortunately there are lots of competing priorities for time right now, and the current focus is on updating the Elasticsearch module to support version 7 and also refactor a lot of code there.

PR's for fixing bugs or adding new functionality are always welcome, so if you fancy taking a stab at it rather than forking please feel free. We can provide feedback etc if required.

Thanks in advance.

All good my man, there is a pull request #41 that exists, they can't get the travis tests to pass