Skip to content

[9.0] [Fleet] Replace call to registry when deleting kibana assets for custom packages (#224886)#225288

Merged
criamico merged 1 commit intoelastic:9.0from
criamico:backport/9.0/pr-224886
Jun 25, 2025
Merged

[9.0] [Fleet] Replace call to registry when deleting kibana assets for custom packages (#224886)#225288
criamico merged 1 commit intoelastic:9.0from
criamico:backport/9.0/pr-224886

Conversation

@criamico
Copy link
Contributor

Backport

This will backport the following commits from main to 9.0:

Questions ?

Please refer to the Backport tool documentation

…om packages (elastic#224886)

Fixes elastic#224191

## Summary

Bugfix - Replace call to registry when deleting kibana assets for
packages of type "custom" and "bundled". Also replaced the call to
`fetchInfo.registry` on another code path to avoid errors in the same
situation -
- These calls are replaced with `getPackageInfo`, that has some internal
functionalities to decide when the packageInfo should be fetched from
the cache, ES or the registry.
- Added additional logging to the delete assets functions

### Testing
- Install a custom integration that has some assets (a dashboard for
instance)
- Uninstall it and check that the asset is correctly removed and there
are no errors:

<img width="1453" alt="Screenshot 2025-06-25 at 11 02 39"
src="https://github.com/user-attachments/assets/32fb07f3-2628-4e30-be92-16610043b3ae"
/>

### 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>
(cherry picked from commit 550b9d5)

# Conflicts:
#	x-pack/platform/plugins/shared/fleet/server/services/epm/kibana/assets/install.ts
#	x-pack/platform/plugins/shared/fleet/server/services/epm/packages/remove.ts
@criamico criamico requested a review from kibanamachine as a code owner June 25, 2025 13:21
@criamico criamico added the backport This PR is a backport of another PR label Jun 25, 2025
@criamico criamico enabled auto-merge (squash) June 25, 2025 13:21
@botelastic botelastic bot added the Team:Fleet Team label for Observability Data Collection Fleet team label Jun 25, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@criamico criamico merged commit 1296c25 into elastic:9.0 Jun 25, 2025
14 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 Team:Fleet Team label for Observability Data Collection Fleet team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants