Skip to content

Notify now honors withpath parameter#432

Open
acesso wants to merge 1 commit into
OpenVoxProject:mainfrom
acesso:no-duplicate-notify
Open

Notify now honors withpath parameter#432
acesso wants to merge 1 commit into
OpenVoxProject:mainfrom
acesso:no-duplicate-notify

Conversation

@acesso

@acesso acesso commented May 7, 2026

Copy link
Copy Markdown

When running Puppet agent with the -t flag, notify resources currently log duplicate messages: one for the explicit message itself, and another for the resource state change (creation/sync). This creates unnecessary log noise, making it harder to spot actual infrastructure changes.

This change modifies the notify resource to always be considered as "existing." By preventing the resource from triggering an out-of-sync event, Puppet will no longer log the redundant state-change notification, resulting in cleaner and more readable execution logs.

The withpath parameter now makes sense to be used, since the possible need to actually show the resource path.

Checklist

I have:

  • read the CONTRIBUTING.md document
  • read and accepted the Developer Certificate of Origin document and added a Signed-off-by annotation to each of my commits
  • tested this code
  • included documentation (including possible behaviour changes)
  • documented the code
  • added or modified regression test(s)
  • added or modified unit test(s)

@acesso acesso force-pushed the no-duplicate-notify branch from 50b9505 to 230960a Compare May 7, 2026 17:28
@bastelfreak bastelfreak requested a review from Sharpie May 7, 2026 18:36

@Sharpie Sharpie left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apologies for the delay in reviewing this PR. This looks like a good set of changes for OpenVox 9. @acesso could you re-base your pull request against the main branch?

That should kick the test suite. The commit in this PR will also need to be signed with a SSH or GPG key.

@acesso acesso requested a review from Sharpie June 9, 2026 21:29
@acesso acesso force-pushed the no-duplicate-notify branch 4 times, most recently from 6a80118 to 037bb16 Compare June 9, 2026 21:45
Notify should not represent a state of a resource since it only "exists"
during execution time. This change proposes that it should be considered
to always "exist", thus avoiding a change notification.

Signed-off-by: acesso <[email protected]>
@acesso acesso force-pushed the no-duplicate-notify branch from 037bb16 to c11f2ac Compare June 9, 2026 21:55
@Sharpie

Sharpie commented Jun 10, 2026

Copy link
Copy Markdown
Member

Looks like this caused quite a few failures in the testing suite. I applied the patch locally and compared /opt/puppetlabs/puppet/cache/state/last_run_report.yaml before and after. Looks like this prevents the notify resource from registering a resource event --- which is likely the cause of many of the test failures.

Unfortunately, event creation is pretty intrinsic to how notify works. If we did land this change, it would have to be opt-in as I suspect there are quite a few installations out there that are processing reports and looking for the presence of notify events as an alert indicator.

Alternately, the ipcrm-echo module provides an echo resource which is just logging and no event creation: https://forge.puppet.com/modules/ipcrm/echo/

@Sharpie Sharpie added the backwards-incompatible This change will lead to a major version bump for the next release label Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backwards-incompatible This change will lead to a major version bump for the next release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants