Skip to content

Conversation

@victormlg
Copy link
Contributor

@victormlg victormlg commented Nov 10, 2025

Example:

body common control
{
  evaluation_order => "classic";
}

bundle agent __main__
{
# here the evaluation is "classic"
  methods:
    usebundle => A;
    usebundle => B;
}

bundle agent A
{
# here the evaluation is "classic"
}

body file control
{
  evaluation_order => "top_down";
}

bundle agent B
{
# here the evaluation is "top_down"
}

Merge together:
https://github.com/cfengine/enterprise/pull/869
https://github.com/cfengine/nova/pull/2485

@victormlg victormlg force-pushed the body_file_control_evalorder branch from e7872f4 to 4c3215c Compare November 10, 2025 10:31
@victormlg victormlg force-pushed the body_file_control_evalorder branch 2 times, most recently from 7be731d to 2270d92 Compare November 10, 2025 14:04
@victormlg victormlg requested a review from larsewi November 12, 2025 10:47
@olehermanse
Copy link
Member

@cf-bottom jenkins, please

@cf-bottom
Copy link

@larsewi
Copy link
Contributor

larsewi commented Nov 17, 2025

13:50:19 license-checking.c:658:9: error: too few arguments to functionPolicyAppendBundle13:50:19          Bundle *bp = PolicyAppendBundle(track_license_policy, NamespaceDefault(), "track_license_bundle", "agent", NULL, NULL);
13:50:19          ^

Looks like you'll need some changes in nova and enterprise as well :)

@victormlg victormlg force-pushed the body_file_control_evalorder branch from 6780184 to a05f4fa Compare November 18, 2025 09:19
Changelog: Title
Ticket: CFE-4598
Signed-off-by: Victor Moene <[email protected]>
@victormlg victormlg force-pushed the body_file_control_evalorder branch from a05f4fa to b83278f Compare November 18, 2025 09:21
Changelog: Fixed json policy parsing by adding new field "evaluation_order" to the expected output
Signed-off-by: Victor Moene <[email protected]>
@victormlg victormlg force-pushed the body_file_control_evalorder branch from b83278f to cce7986 Compare November 18, 2025 09:27
@victormlg
Copy link
Contributor Author

@cf-bottom jenkins, please

@cf-bottom
Copy link

else if (StringEqual(P.rval.item, "top_down"))
{
P.current_evaluation_order = EVAL_ORDER_TOP_DOWN;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Should there be an else with parser error?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Then the evaluation order stays as EVALUATION_ORDER_UNDEFINED. But the program will error on the wrong value later anyways, so wd don't really need to check for the right value here

@larsewi
Copy link
Contributor

larsewi commented Nov 18, 2025

@olehermanse, @nickanderson wants to demo this on the agent is in. Can we merge this before release if the tests pass?

@larsewi
Copy link
Contributor

larsewi commented Nov 19, 2025

The tests look good! @olehermanse, can we merge?

@olehermanse
Copy link
Member

@larsewi yep

@olehermanse olehermanse merged commit 6db4861 into cfengine:master Nov 19, 2025
49 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

4 participants