[Fleet] Rename CONFIG_CHANGE action to POLICY_CHANGE#78221
[Fleet] Rename CONFIG_CHANGE action to POLICY_CHANGE#78221jen-huang merged 9 commits intoelastic:masterfrom
CONFIG_CHANGE action to POLICY_CHANGE#78221Conversation
|
Pinging @elastic/ingest-management (Team:Ingest Management) |
| if (newAgentAction.data.policy) { | ||
| newAgentAction.data.policy.outputs.default.api_key = apiKey; | ||
| } | ||
| // BWC for agent <= 7.9 |
There was a problem hiding this comment.
what about 7.9.1 and 7.9.2 which are already realeased?
There was a problem hiding this comment.
i see in test it will work,
| // Transform the policy action for agent version <= 7.9 for BWC | ||
| const agentVersion = semver.parse((agent.local_metadata?.elastic as any)?.agent?.version); | ||
| const agentPolicyAction: AgentPolicyAction | AgentPolicyActionV7_9 = | ||
| agentVersion && semver.lt(agentVersion, '7.10.0') |
There was a problem hiding this comment.
Should we already have an issue to keep of track of these kind of change that need to be removed later?
There was a problem hiding this comment.
I will start a meta issue
nchaulet
left a comment
There was a problem hiding this comment.
Looks good to me (after functional test are fixed) 🚀
michalpristas
left a comment
There was a problem hiding this comment.
Tested this with branch elastic/beats#20779 and it received POLICY_CHANGE correctly.
|
@elasticmachine merge upstream |
|
@nchaulet This just came to mind, do you think it is possible to have "in-flight" policy change actions that haven't been acknowledged by the agent yet when the user upgrades to 7.10 Kibana? If so, should I add a SO migration to change the |
|
@jen-huang Yes it probably possible that happens, 👍 to have the migration to be safe |
|
@nchaulet Thanks for confirming, I pushed up a change to add migration for agent actions. |
|
@elasticmachine merge upstream |
💚 Build SucceededMetrics [docs]
History
To update your PR or re-run it, just comment with: |
* Initial pass at config->policy change action * Make policy change action BWC with agent <= 7.9 * Fix test * Add agent action SO migration for policy change actions Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
… (#78798) * [Fleet] Rename `CONFIG_CHANGE` action to `POLICY_CHANGE` (#78221) * Initial pass at config->policy change action * Make policy change action BWC with agent <= 7.9 * Fix test * Add agent action SO migration for policy change actions Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> * Add temporary logging for CI debugging * Fix condition and adjust tests * Revert "Add temporary logging for CI debugging" This reverts commit 4b578eb. Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Summary
Renames
CONFIG_CHANGEaction type toPOLICY_CHANGEto support the corresponding agent changes in elastic/beats#20779. This also renames thedata.configfield todata.policy.To ensure backwards compatibility (BWC) with agent <= v7.9, transforms were added to createAgentActionFromPolicyAction(). If the agent version is <= v7.9, we send
CONFIG_CHANGEanddata.configinstead. Unit tests were added here against various agent versions.