saltstack-formulas / logrotate-formula

http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html
Other
23 stars 71 forks source link

feat(hourly): Add configuration to enable hourly jobs #60

Closed mdschmitt closed 2 years ago

mdschmitt commented 2 years ago

PR progress checklist (to be filled in by reviewers)


What type of PR is this?

Primary type

Secondary type

Does this PR introduce a BREAKING CHANGE?

Not unless existing pillar values for clients have "hourly" set in their job configurations. ...in which case, they already don't work straight-out-of-the-box.

Related issues and/or pull requests

Describe the changes you're proposing

Pillar / config required to test the proposed changes

Debug log showing how the proposed changes work

Documentation checklist

Testing checklist

Additional context

mdschmitt commented 2 years ago

@myii , how's this look?

mdschmitt commented 2 years ago

No major rush, but any word on this?

mdschmitt commented 2 years ago

@myii , dropping another bump in here. Any feedback on my revisions?

mdschmitt commented 2 years ago

Latest CI failure because ArchLinux properly uses systemd timers rather than cron. Requires deeper code tweakage to properly provide for. This PR on hold until I can get that to be better.

myii commented 2 years ago

@mdschmitt Thanks for the additions. I've tested some changes in my own fork to ensure Arch Linux is working as well. I'll push those here and merge this PR shortly.

One question remains: which reference did you use for the /etc/logrotate.hourly.d/... path? I couldn't find any mention of it in the upstream repo:

saltstack-formulas-travis commented 2 years ago

:tada: This PR is included in version 0.13.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket:

mdschmitt commented 2 years ago

Wow @myii , thank you so much for doing this. You beat me to writing the kitchen test and I definitely would have ended up rewriting things to allow for Arch. Folding in cron-formula as a dependency is much cleaner though.

As far as the naming for "logrotate.hourly.d", it was just a logical canonicalization of "logrotate.d" with the explicit addition of "hourly" since hourly isn't out-of-the-box functionality. Inspiration taken from https://sleeplessbeastie.eu/2018/07/11/how-to-execute-logrotate-every-hour

myii commented 2 years ago

No problem -- thanks for the reference, @mdschmitt.