Repository navigation
Conversation
victormlg
force-pushed
the
cf-reactor.AllFileEventTypes
branch
2 times, most recently
from
October 14, 2026 14:49
a417845 to
3f5cbb2
Compare
victormlg
marked this pull request as ready for review
October 14, 2026 14:49
victormlg
force-pushed
the
cf-reactor.AllFileEventTypes
branch
from
October 15, 2026 07:28
3f5cbb2 to
036767c
Compare
larsewi
requested changes
Oct 15, 2026
larsewi
left a comment
Contributor
There was a problem hiding this comment.
The first commit mixes refactors, API changes, behavior changes and a new interval attribute. Please split it into one commit per change.
victormlg
force-pushed
the
cf-reactor.AllFileEventTypes
branch
from
October 15, 2026 09:27
036767c to
869e4b3
Compare
larsewi
requested changes
Oct 16, 2026
Ticket: ENT-14692 Signed-off-by: Victor Moene <victor.moene@northern.tech> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The reference check of a new watcher is now done by WatcherRegister(), without holding the registry lock as it may block. If it fails, the watcher is not registered and WatcherRegister() returns false, so that the events promise fails. Ticket: ENT-14692 Signed-off-by: Victor Moene <victor.moene@northern.tech> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
WatcherRegister() now takes a pointer to the options, which include the interval between two checks. Ticket: ENT-14692 Signed-off-by: Victor Moene <victor.moene@northern.tech> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ticket: ENT-14692 Signed-off-by: Victor Moene <victor.moene@northern.tech> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
It sets the seconds between two checks for the event, 1 by default. The parser only checks it if it doesn't depend on variables or body arguments, so it is checked again once expanded, and the events promise fails if it is invalid. Ticket: ENT-14692 Signed-off-by: Victor Moene <victor.moene@northern.tech> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Moved from a hardcoded and single `file_deleted` event type, to a table with all the event types and their necessary code, so that cf-reactor can easily be extended with new event types. Ticket: ENT-14692 Signed-off-by: Victor Moene <victor.moene@northern.tech> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
victormlg
force-pushed
the
cf-reactor.AllFileEventTypes
branch
from
October 16, 2026 12:37
869e4b3 to
9c324e1
Compare
Contributor
Author
|
@cf-bottom jenkins, please :) |
|
Sure, I triggered a build: Jenkins: https://ci.cfengine.com/job/pr-pipeline/14813/ Packages: http://buildcache.cfengine.com/packages/testing-pr/jenkins-pr-pipeline-14813/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
All event types are mutually exclusive:
new interval attribute
body when file_deleted(file) { file_deleted => "$(file)"; interval => 30; # waits 30 seconds between polls }event types that need several values, expect a set of attributes
body when file_exceeds_1GB(file) { file_size_exceeds => "$(file)"; size_threshold => "1G"; }