Skip to content

[8.18][Fleet] Update query in delete unenrolled agents task (#224808)#224997

Merged
juliaElastic merged 1 commit intoelastic:8.18from
juliaElastic:backport-224996-8.18
Jun 24, 2025
Merged

[8.18][Fleet] Update query in delete unenrolled agents task (#224808)#224997
juliaElastic merged 1 commit intoelastic:8.18from
juliaElastic:backport-224996-8.18

Conversation

@juliaElastic
Copy link
Contributor

backport #224808

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.
@juliaElastic juliaElastic added the backport This PR is a backport of another PR label Jun 24, 2025
@juliaElastic juliaElastic added the release_note:skip Skip the PR/issue when compiling release notes label Jun 24, 2025
@botelastic botelastic bot added the Team:Fleet Team label for Observability Data Collection Fleet team label Jun 24, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

@juliaElastic juliaElastic enabled auto-merge (squash) June 24, 2025 14:35
Copy link
Contributor

@MichelLosier MichelLosier left a comment

Choose a reason for hiding this comment

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

LGTM

@juliaElastic juliaElastic merged commit 20da7df into elastic:8.18 Jun 24, 2025
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team

3 participants