[Fleet] Integration policy doesn't get deleted if it is orphaned #129683
Labels
bug
Fixes for quality problems that affect the customer experience
Supportability
Improve our (devs, SREs, support eng, users) ability to troubleshoot/self-service product better.
Team:Fleet
Team label for Observability Data Collection Fleet team
Discovered while working on a case related to #129677.
If an integration policy is orphaned (its parent agent policy does not exist), this can cause various issues in the UI. The obvious solution is to bulk delete these policies using
/api/fleet/package_policies/delete
, but this does not work (even withforce: true
) due to that API attempting to update the non-existent agent policies. An example response:This API should be able to delete orphaned integration policies, perhaps after logging a
warn
that its parent agent policy doesn't exist.The text was updated successfully, but these errors were encountered: