RexOps / RexOps/Rex

Add more on_no_change hooks

Open
#1,431 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature request
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.