Repository navigation
Made cf-reactor keep all agent promises - #6426
Merged
larsewi merged 2 commits intoOct 28, 2026
Merged
Conversation
|
Thank you for submitting a pull request! Maybe @craigcomstock can review this? |
victormlg
force-pushed
the
cf-reactor.EvalAllAgentPromiseTypes
branch
from
October 27, 2026 10:26
49067c5 to
e09569a
Compare
| success &= PolicyCheckBundleSections(bundle->sections, errors); | ||
| success &= PolicyCheckBundleSections(bundle->custom_sections, errors); | ||
|
|
||
| if (StringEqual(bundle->type, CF_REACTORC)) |
victormlg
marked this pull request as ready for review
October 27, 2026 11:07
victormlg
force-pushed
the
cf-reactor.EvalAllAgentPromiseTypes
branch
from
October 27, 2026 13:11
071d6c2 to
614f292
Compare
larsewi
reviewed
Oct 27, 2026
Contributor
There was a problem hiding this comment.
It feels a bit wrong to have the reactor bundle do anything the agent can do. They should be two different things in my opinion. The reactor bundles should only be used to register events. And the agent bundles should do changes to the system.
Does this mean every time we load the policy, reactor will do changes to the system? While its job should be to register watchers?
Maybe I'm misunderstanding this?
larsewi
approved these changes
Oct 27, 2026
Previously cf-reactor only evaluates meta, vars, classes and events promise types. Now, it can run any of the ones avalaible in agent bundles, in addition to events. Event promises and promises found in agent bundles are mutually exclusive inside reactor bundles. When cf-reactor reads the policy to create the watchers, it only does so with bundles that have an events promise Signed-off-by: Victor Moene <victor.moene@northern.tech>
Instead of running agent bundles inside "then" attribute, we can run reactor bundles Signed-off-by: Victor Moene <victor.moene@northern.tech>
victormlg
force-pushed
the
cf-reactor.EvalAllAgentPromiseTypes
branch
from
October 27, 2026 15:57
614f292 to
ad36a1f
Compare
Contributor
Author
|
@cf-bottom jenkins, please :) |
|
Alright, I triggered a build: Jenkins: https://ci.cfengine.com/job/pr-pipeline/14881/ Packages: http://buildcache.cfengine.com/packages/testing-pr/jenkins-pr-pipeline-14881/ |
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.
We can now do: