Add more on_no_change hooks
Nobody has claimed this yet.
- Dominant language
- Perl
- Stars
- 737
- Forks
- 214
- PR merge metrics
- No merged PRs in 30d
Description
User story
As maintainer,
I would like to add more on_no_change hooks to resources,
so I can provide a common interface for resources which could trigger further actions based on whether they made a change or not.
Describe the solution you'd like
Some commands/resources for which we can consider adding on_no_change hooks:
- Sync
- Cron
- Host
- Pkg
- Sysctl
- Fs
- Augeas
Describe alternatives you've considered
For now, I think it's fine to add on_no_change hooks similar to the current on_change hooks. An interesting, but much more involved implementation would be to continue creating a common Resource class, which could implement it in a more generic fashion.
Additional context
This is basically a continuation of #670, after #1386 added on_no_change hooks for file commands.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the existing on_change hooks and the on_no_change implementation added for file commands in #1386. Then inspect the Sync, Cron, Host, Pkg, Sysctl, Fs, and Augeas resources to determine which should gain equivalent hooks; done means each selected resource provides the requested common behavior with tests showing it runs when no change occurs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- perl
- Domain
- devops
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100