-
Notifications
You must be signed in to change notification settings - Fork 8k
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
[UII] Surface option to delete diagnostics files #183690
Conversation
… diagnostic file
Pinging @elastic/fleet (Team:Fleet) |
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
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 for the docs. 👍
Here's a docs update PR for the new delete option.
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.
Code + tests LGTM, I did not pull down to test locally 🚀
I expect the next thing we'll be asked for on this page would be bulk delete. Do you think it makes sense to put an issue for that on the backlog for now?
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Public APIs missing comments
Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: cc @jen-huang |
Summary
Resolves #167366.
This PR introduces the ability to manually delete diagnostics files before their ILM policy kicks in. This PR:
DELETE /api/fleet/agents/files/{fileId}
route which returns{id: string, deleted: boolean}
.fleet-fileds-fromhost-data-agent
data stream when a request is received, and updates the corresponding meta information in.fleet-fileds-fromhost-meta-agent
to set it toDELETED
statusShow expired requests
toggleFYI, the expiration threshold is currently only 3 minutes. This is a bug, see: #183692
The main reason for adding this toggle is to keep the initial list view clean. The items in this list are built from all
REQUEST_DIAGNOSTICS
agent actions that the user submits, which can be on a single agent or bulk agents.When a file is deleted manually with this new work, or by the existing ILM policy, we can correctly flag the associated action as having
DELETED
files and hide it from view. But when a request errors out or otherwise results in no files being generated, we still want to keep the history of the request (we have no precedent of deleting agent activity). Over time, this history is no longer useful for the user and just pollutes the table, so it is better to hide these items from the initial view.Testing
Use the single and bulk request diagnostics feature and test the delete functionality. Go nuts :)
Checklist