Skip to content

ENT-14197: Accept list of bundles in "then" attribute in event promises - #6384

Merged
larsewi merged 1 commit into
cfengine:masterfrom
victormlg:cf-reactor.AcceptBundleList
Oct 14, 2026
Merged

larsewi merged 1 commit into
cfengine:masterfrom
victormlg:cf-reactor.AcceptBundleList

Conversation

@victormlg

Copy link
Copy Markdown
Contributor
bundle reactor event_handler
{
  vars:
    "A" string => "/tmp/a";
    "B" string => "/tmp/b";
    "C" string => "/tmp/c";

  events:
    "Create $(A)"
      when => file_deleted("$(A)"),
      then => create_file("$(A)");
    "Create $(B)"
      when => file_deleted("$(B)"),
      then => { create_file("$(B)") };
    "Create $(C)"
      when => file_deleted("$(C)"),
      then => { print("hello world"), create_file("$(C)"), "do_something" };
}

Comment thread libpromises/promises.c Fixed
Comment thread libpromises/promises.c Fixed
Comment thread libpromises/syntax.c Fixed
Comment thread libpromises/syntax.c Fixed
Comment thread libpromises/syntax.c Fixed

@larsewi larsewi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Caches are now cleared once per event, not once per bundle. This is probably intended? Needs to be documented later on.

@larsewi

larsewi commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

@cf-bottom Jenkins please :)

@cf-bottom

Copy link
Copy Markdown

@victormlg

victormlg commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor Author

Build Status

Re-run failed tests

@victormlg
victormlg force-pushed the cf-reactor.AcceptBundleList branch from d3c06be to 20b61bf Compare October 13, 2026 07:57
@victormlg

Copy link
Copy Markdown
Contributor Author

@cf-bottom jenkins, please :)

@cf-bottom

Copy link
Copy Markdown

@victormlg

Copy link
Copy Markdown
Contributor Author

Re-running FR tests:
Build Status

@victormlg
victormlg requested a review from larsewi October 13, 2026 14:14
Comment thread libpromises/policy.c Outdated
Comment thread libpromises/promises.c
Comment thread libpromises/syntax.c
The "then" attribute in events promises accepts both simple bundles
and list of bundles, similar to bundlsequences.

Ticket: ENT-14197
Signed-off-by: Victor Moene <victor.moene@northern.tech>
@victormlg
victormlg force-pushed the cf-reactor.AcceptBundleList branch from 20b61bf to e39a47d Compare October 14, 2026 08:08
@larsewi
larsewi merged commit 27b04c7 into cfengine:master Oct 14, 2026
12 checks passed
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.

4 participants