-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Fleet] Remove body from sendRemovePackage to fix broken uninstall as…
…sets button (#195101) ## Summary The "uninstall assets" button in the integrations UI got recently broken. Trying to uninstall assets fails with 400. The reason is that the [UI request](https://github.com/elastic/kibana/blob/6001786d04388f5f79cea74b674e510fc7a60d3a/x-pack/plugins/fleet/public/hooks/use_request/epm.ts#L273-L282) is using and old (and deprecated) endpoint, that sends `body` in the payload. However the [schema validation](https://github.com/elastic/kibana/blob/ccd0e17c0955163f82e15c464d82df45f391cf62/x-pack/plugins/fleet/server/types/rest_spec/epm.ts#L617-L631) of the [delete endpoint](https://github.com/elastic/kibana/blob/1a54aabd6d1806fbdd5309da9b06fefdd4fe0689/x-pack/plugins/fleet/server/routes/epm/index.ts#L540-L568) doesn't accept it. ![Screenshot 2024-10-04 at 10 01 47 AM](https://github.com/user-attachments/assets/0f88fd52-eb1d-489f-9ad4-49e104f40430) Here I'm updating the UI request to use the correct schema. The only other place where this request was used with `body` was in the debug page, so we should be fine. ### Testing - Install any integration - Try to uninstall the assets from the UI: ![Screenshot 2024-10-04 at 17 13 28](https://github.com/user-attachments/assets/f95b5c96-ca8f-4319-8d95-3a76ed588c17) ![Screenshot 2024-10-04 at 17 14 25](https://github.com/user-attachments/assets/aea994bd-2d35-4ca7-ab92-db80a1c5546c) ### Checklist - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios --------- Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
- Loading branch information
1 parent
94caafd
commit 78bd739
Showing
5 changed files
with
26 additions
and
8 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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