Made evaluation_order in body common control configurable via Augments#3192
Open
nickanderson wants to merge 1 commit into
Open
Made evaluation_order in body common control configurable via Augments#3192nickanderson wants to merge 1 commit into
nickanderson wants to merge 1 commit into
Conversation
3deddeb to
bf19577
Compare
This exposes evaluation_order in body common control of the main policy (promises.cf) via default:def.control_common_evaluation_order, which sets the default promise evaluation order for all components (cf-agent, cf-serverd, cf-execd, cf-monitord). body agent control now only sets evaluation_order for cf-agent when it is explicitly configured via augments, so cf-agent inherits the evaluation order from body common control unless overridden. This keeps the existing default:def.control_agent_evaluation_order override working while letting body common control act as the base default. Acceptance tests exercise both the common control default (inherited by cf-agent) and the cf-agent specific override against the built promises.cf. Ticket: ENT-13495 Changelog: Title
bf19577 to
b9e48b6
Compare
Member
Author
|
The failure here seems to be the result of installing the ubuntu 26 package on ubuntu 22? Interesting, cf-remote --version master list ubuntu does show results for ubuntu22 agent package, but only for arm. |
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.
What
Makes
evaluation_orderinbody common controlof the main policy(
promises.cf) configurable via augments throughdefault:def.control_common_evaluation_order. This sets the default promiseevaluation order for all components (
cf-agent,cf-serverd,cf-execd,cf-monitord).This is a follow-up to #3068 / #3077 (which made
body agent controlconfigurable). The
control_common_evaluation_ordervariable was alreadypresent in
controls/def.cfbut was not wired into any control body.Why it wasn't a one-line change
cf-agentgivesbody agent controlpriority overbody common controlwhendeciding evaluation order (core
EvalContextIsClassicOrder). Because the MPFpreviously set
evaluation_orderinbody agent controlunconditionally(defaulting to
classic), that default masked any value coming frombody common controlforcf-agent.To make
control_common_evaluation_ordera meaningful "change it everywhere"setting,
body agent controlnow setsevaluation_orderonly whendefault:def.control_agent_evaluation_orderis explicitly configured (to avalid value) via augments. When it is not set,
cf-agentinherits the orderfrom
body common control.Resulting behavior
control_common_evaluation_ordercontrol_agent_evaluation_ordertop_downtop_downclassictop_downtop_downclassicA specific file can still override both via
evaluation_orderinbody file control.Changes
promises.cf.in—body common controlsetsevaluation_orderfromdefault:def.control_common_evaluation_order(guarded byminimum_version(3.27.0)).controls/cf_agent.cf—evaluation_orderinbody agent controlis nowclass-gated behind
control_agent_evaluation_order_configured.controls/def.cf—control_agent_evaluation_ordernow defaults to empty anda
control_agent_evaluation_order_configuredclass detects a valid, explicitlyconfigured value (mirrors the existing
control_agent_agentfacility_configuredidiom).
MPF.md— documentscontrol_common_evaluation_order, notes that cf-agentinherits it, and fixes a typo (
control_agent_evalution_order).Testing
Adds two acceptance tests under
tests/acceptance/00_basics/def.json/:control_common_evaluation_order.cf— sets only the common augment andasserts
cf-agentinheritstop_down.control_agent_evaluation_order.cf— sets only the agent augment and assertsthe
cf-agentoverride applies.Both use a report-order discriminator run against the built
promises.cfandpass locally, along with the existing
control_common_bundlesequence_end.cf.Scope
Limited to the main policy (
promises.cf). The update policy (update.cf)already exposes
control_agent_update_evaluation_orderfrom #3077 and is leftas-is; extending
body common controlthere can be a follow-up.Ticket: ENT-13495