Closed asmajlovic closed 6 years ago
Thanks for the report @asmajlovic, this definitely shouldn't be happening. I'm refactoring much of the test/linting setup for the Elasticsearch and Kibana modules to ensure we syntax check against Ruby 1.9 syntax for elastic/puppet-elasticsearch#922, so I'm in the middle of working on these sorts of changes and should be able to resolve them.
Bug Report
elasticsearch
(5.4.3) andkibana
(5.2.0) modules presentBug description
While relatively minor (a bit annoying for us), a discrepancy has been noted in the
lib/puppet_x/elastic/hash.rb
content between thekibana
andelasticsearch
Puppet modules. Depending on which Puppet environment is used, one or the other is used to update the agent. The issue is being opened here since arubocop:disable
line is missing in thekibana
library file.Expected behavior: No changes between Puppet agent runs using different environments referencing with same code
Observed behavior:
# rubocop:disable Metrics/AbcSize
line is added/removed, depending on which module is considered first/last.File differences:
Example:
abc
rubocop:disable Metrics/AbcSize
rubocop:disable Metrics/PerceivedComplexity
def self.extended(base) if RUBY_VERSION >= '1.9'
Notice: /File[/var/lib/puppet/lib/puppet_x/elastic/hash.rb]/content: content changed '{md5}5482a43a74b80467b5078cab48aa3cf7' to '{md5}10dc543476cf0efdacae56694403f705' Info: Loading facts Info: Caching catalog for adm-dev-test01.local Info: Applying configuration version '1520589951' Notice: Finished catalog run in 4.64 seconds
puppet agent -t --environment env2
Info: Retrieving pluginfacts Notice: /File[/var/lib/puppet/facts.d]/mode: mode changed '0755' to '0775' Info: Retrieving plugin Notice: /File[/var/lib/puppet/lib/puppet_x/elastic/hash.rb]/content: --- /var/lib/puppet/lib/puppet_x/elastic/hash.rb 2018-03-09 10:05:48.416069199 +0000 +++ /tmp/puppet-file20180309-31219-1y9m6eg 2018-03-09 10:10:59.882337244 +0000 @@ -7,6 +7,7 @@
Upon extension, modify the hash appropriately to render
rubocop:disable Metrics/AbcSize
rubocop:disable Metrics/PerceivedComplexity
def self.extended(base) if RUBY_VERSION >= '1.9'
Notice: /File[/var/lib/puppet/lib/puppet_x/elastic/hash.rb]/content: content changed '{md5}10dc543476cf0efdacae56694403f705' to '{md5}5482a43a74b80467b5078cab48aa3cf7' Info: Loading facts Info: Caching catalog for adm-dev-test01.local Info: Applying configuration version '1520590263' Notice: Finished catalog run in 5.33 seconds