Skip to content

ENT-14692: Added file event types - #6409

Open
victormlg wants to merge 14 commits into
cfengine:masterfrom
victormlg:cf-reactor.AllFileEventTypes_2
Open

victormlg wants to merge 14 commits into
cfengine:masterfrom
victormlg:cf-reactor.AllFileEventTypes_2

Conversation

@victormlg

@victormlg victormlg commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Depends on: #6430
Merge together: cfengine/documentation#3810

Comment thread cf-reactor/file_watcher.c
{
assert(args != NULL && args->next != NULL);
const char *path = RlistScalarValue(args);
const long size_threshold = IntFromString(RlistScalarValue(args->next));
Comment thread cf-reactor/watcher.c Fixed
Comment thread cf-reactor/watcher.c Fixed
Comment thread cf-reactor/watcher.c Fixed
Comment thread cf-reactor/watcher.c Fixed
Comment thread cf-reactor/watcher.c Fixed
Comment thread cf-reactor/watcher.c Fixed
Comment thread cf-reactor/watcher.c Fixed
Comment thread cf-reactor/watcher.c Fixed
@victormlg
victormlg force-pushed the cf-reactor.AllFileEventTypes_2 branch 2 times, most recently from 5fd6d59 to 4452b4a Compare October 19, 2026 12:38
Signed-off-by: Victor Moene <victor.moene@northern.tech>
Signed-off-by: Victor Moene <victor.moene@northern.tech>
The check was removed by accident in 9c10ad3. Now it
is reverted back to how it was

Signed-off-by: Victor Moene <victor.moene@northern.tech>
These tests cover the reactor bundles and the events promise
type.

Signed-off-by: Victor Moene <victor.moene@northern.tech>
Added a folder to cover all event types with test. Starting with file_deleted.

Signed-off-by: Victor Moene <victor.moene@northern.tech>
cf-reactor should parse edit_line bundles so it can use them in the
"then" bundles run on reaction to events

Signed-off-by: Victor Moene <victor.moene@northern.tech>
The promises of edit_line and edit_xml bundles always used
CF_EDIT_IFELAPSED (1 minute) as their ifelapsed, ignoring the default
ifelapsed. cf-reactor sets the default to 0 for the bundles it runs on
events, so a file edited by an event was not edited again by another
event less than a minute later. Edit promises now use the lower of the
two (EDIT_IFELAPSED).

Signed-off-by: Victor Moene <victor.moene@northern.tech>
… event

Signed-off-by: Victor Moene <victor.moene@northern.tech>
@victormlg
victormlg force-pushed the cf-reactor.AllFileEventTypes_2 branch from 4452b4a to 6515414 Compare October 23, 2026 10:29
@victormlg
victormlg marked this pull request as ready for review October 23, 2026 10:31
Added file_created event type, together with a test

Ticket: ENT-14692
Signed-off-by: Victor Moene <victor.moene@northern.tech>
Added file_modified event type together with a test

Ticket: ENT-14692
Signed-off-by: Victor Moene <victor.moene@northern.tech>
Added file_content_modified event type together with a test

Ticket: ENT-14692
Signed-off-by: Victor Moene <victor.moene@northern.tech>
Added file_permissions_changed event type together with a test

Ticket: ENT-14692
Signed-off-by: Victor Moene <victor.moene@northern.tech>
Added file_owner_changed event type together with a test

Ticket: ENT-14692
Signed-off-by: Victor Moene <victor.moene@northern.tech>
Added file_size_exceeds event type together with a test

Ticket: ENT-14692
Signed-off-by: Victor Moene <victor.moene@northern.tech>
@victormlg
victormlg force-pushed the cf-reactor.AllFileEventTypes_2 branch from 6515414 to f6543a5 Compare October 23, 2026 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants