voxpupuli / puppet-zabbix

Puppet module for creating and maintaining zabbix components with puppet.
https://forge.puppet.com/puppet/zabbix
Apache License 2.0
79 stars 228 forks source link

Modulesync 5.3.0 #834

Closed ekohl closed 1 year ago

ekohl commented 1 year ago

I'm still bothered by this bit: https://github.com/voxpupuli/puppet-zabbix/blob/f4796f1439453610bc4f483a94247f6530313551/spec/defines/startup_spec.rb#L14-L17 The loop there doesn't work as you'd expect. You should really create a context, otherwise you only end up testing the last value I think. However, I don't have time now to dive into this.

ekohl commented 1 year ago

Archlinux fails because there's no Apache version set. I'm not sure how that ever worked.

And https://github.com/voxpupuli/puppet-zabbix/pull/833 will drop Ubuntu 16.04.

ekohl commented 1 year ago

One problem is that this changes Gentoo to have openrc as the init system (which is the default), but the tests assume systemd. I'm not sure how to deal with that.

Rathios commented 1 year ago

Threw in some additions here that fix the remainder of the tests for me: https://github.com/ekohl/puppet-zabbix/pull/1

ekohl commented 1 year ago

Debian just fails on this when using Puppet 6:

            Error: Could not update: Execution of '/opt/puppetlabs/puppet/bin/gem install -v 5.0.0-alpha1 --no-document zabbixapi' returned 1: ERROR:  Error installing zabbixapi:
                The last version of public_suffix (< 6.0, >= 2.0.2) to support your Ruby & RubyGems was 4.0.7. Try installing it with `gem install public_suffix -v 4.0.7` and then running the current command again
                public_suffix requires Ruby version >= 2.6. The current ruby version is 2.5.0.

I recall that old Rubygems versions had issues with downgrading. Not sure what the best course of action is here, but that's just broken.

smortex commented 1 year ago

So yeah, this fails with Puppet 6 because the module try to install zabbixapi which depends on httpaddressablepublic_suffix in Puppet's ruby gems and the latest version of public_suffix is not compatible with the version of Ruby (Puppet 6 AIO bundles Ruby 2.5).

While some ruby code can select which version of a dependency to use (gem 'foo', '< 5.0'; require 'foo'), it is not done (and for good reasons) by zabbixapi nor the module provider, so even if the installation was resolving older gems, this would be fragile because the latest versions of the dependencies would be selected at runtime.

Maybe it's time to drop support for Puppet 6 and have CI green again?

bastelfreak commented 1 year ago

:+1: for dropping Puppet 6. It's EoL in a few months anyways.