puppetlabs / puppetlabs-apt

Puppet module to help manage Apt
https://forge.puppetlabs.com/puppetlabs/apt
Apache License 2.0
216 stars 463 forks source link

Support "hourly" and Integer as value for update frequency (fixes #1157) #1159

Closed webcompas closed 4 months ago

webcompas commented 6 months ago

Summary

With these changes the update frequency accepts two more values as described in the linked issue.

Related Issues

Add more possible values for update frequency (#1157)

Checklist

CLAassistant commented 6 months ago

CLA assistant check
All committers have signed the CLA.

smortex commented 6 months ago

CI failure is due to:

https://github.com/webcompas/puppetlabs-apt/blob/5265b132500c2d047cec777105f5764f17e79bad/spec/classes/apt_update_spec.rb#L177

Can be fixed by something like:

-          let(:pre_condition) { "class{ '::apt': update => {'frequency' => '#{update_frequency}',} }" }
+          let(:pre_condition) { "class{ '::apt': update => {'frequency' => #{update_frequency.inspect},} }" }

That globally look okay, but feel aggressive: IIRC the default configuration of unattended-updates only update twice a day, so anything more frequent than that feels too much to me. That being said, I am not a Debian developer and maybe those who are would consider this totally fine, so I would love to have someone from the Debian project to step in to help here make an informed decision.

webcompas commented 6 months ago

Thanks for the hint to fix the spec tests. I implemented it and now they are running successfully.

webcompas commented 4 months ago

Please review and merge.

bastelfreak commented 4 months ago

the ARM nightlies are broken, so I'm going to merge this.