[8.18][Fleet] Update query in delete unenrolled agents task (#224808)#224997
Merged
juliaElastic merged 1 commit intoelastic:8.18from Jun 24, 2025
Merged
[8.18][Fleet] Update query in delete unenrolled agents task (#224808)#224997juliaElastic merged 1 commit intoelastic:8.18from
juliaElastic merged 1 commit intoelastic:8.18from
Conversation
Issue reported by users that some unenrolled agents on the UI are not being deleted by the background task. The cause turned out to be a discrepancy in how unenrolled agents are determined on the UI versus the background task. The UI shows agents as unenrolled if `active:false` field matches (logic [here](https://github.com/elastic/kibana/blob/main/x-pack/platform/plugins/shared/fleet/server/services/agents/build_status_runtime_field.ts#L115-L119)) The delete unenrolled agents task also queried on the existence of `unenrolled_at` field. It seems some agents don't have this field set, those should be deleted too.
Contributor
|
Pinging @elastic/fleet (Team:Fleet) |
Contributor
💚 Build Succeeded
Metrics [docs]
|
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.
backport #224808