-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Fleet] Fix changing space for agent actions #203683
[Fleet] Fix changing space for agent actions #203683
Conversation
Pinging @elastic/fleet (Team:Fleet) |
@elasticmachine merge |
@elasticmachine merge upstream |
⏳ Build in-progress, with failures
Failed CI Steps
Test Failures
History
cc @nchaulet |
searchAfter = lastAgent.sort; | ||
|
||
await esClient.updateByQuery({ | ||
index: AGENT_ACTIONS_INDEX, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we don't store spaces in .fleet-actions-results
, right? so that doesn't have to be updated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Starting backport for target branches: 8.x https://github.com/elastic/kibana/actions/runs/12297328678 |
💔 All backports failed
Manual backportTo create the backport manually run:
Questions ?Please refer to the Backport tool documentation |
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
(cherry picked from commit 8d5cd4f) # Conflicts: # x-pack/plugins/fleet/server/services/spaces/agent_policy.ts
# Backport This will backport the following commits from `main` to `8.x`: - [[Fleet] Fix changing space for agent actions (#203683)](#203683) <!--- Backport version: 8.9.8 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Nicolas Chaulet","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-12-12T13:23:50Z","message":"[Fleet] Fix changing space for agent actions (#203683)","sha":"8d5cd4f2d752a8d47c37225c91561af3763464d3","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Fleet","v9.0.0","backport:prev-minor"],"number":203683,"url":"https://github.com/elastic/kibana/pull/203683","mergeCommit":{"message":"[Fleet] Fix changing space for agent actions (#203683)","sha":"8d5cd4f2d752a8d47c37225c91561af3763464d3"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/203683","number":203683,"mergeCommit":{"message":"[Fleet] Fix changing space for agent actions (#203683)","sha":"8d5cd4f2d752a8d47c37225c91561af3763464d3"}}]}] BACKPORT-->
Summary
Resolve #194931
When reassigning a policy to different spaces we were not reassigning action that PR fix it.
How to test
Enable space awareness (feature flag + API call)
Create agent action in a space and update the policy spaces, it should update the action spaces, too and action should be visible in agent activity of the newly assigned space.