fleet/server/mdm/android/service
Victor Lyuboslavsky c378e27d82
Fixed Android pubsub panic when host was deleted (#43788)
<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
**Related issue:** Resolves #42494 

# Checklist for submitter

If some of the following don't apply, delete the relevant line.

- [x] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/guides/committing-changes.md#changes-files)
for more information.

## Testing

- [x] Added/updated automated tests
- [x] QA'd all new/changed functionality manually

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Bug Fixes**
* Prevented a server panic (HTTP 502) when Android pubsub status reports
arrive for hosts deleted from Fleet by validating re-enrollment before
processing.
* Improved Android host creation to avoid creating duplicate hosts when
an Orbit-only enrollment already exists.

* **Tests**
* Added unit tests for the re-enrollment flow for deleted hosts and
deduplication between Orbit and Android enrollments.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-04-21 16:01:51 -05:00
..
androidmgmt Android WebApps: endpoint to create one, prevent android app configuration on webApps (#40329) 2026-03-02 15:14:19 -05:00
certificate_renewal.go Modified Android certificate renewal logic to make it easier to test. (#40635) 2026-03-02 16:25:48 -08:00
endpoint_utils.go Added middleware for api-only users auth (#43772) 2026-04-21 07:11:33 -04:00
enterpriseCallback.html add self closing successful Android enterprise connection page (#26767) 2025-03-04 16:32:44 +00:00
enterprises_test.go Converted old activity module into function. Cleaned up activity types. (#40752) 2026-03-03 01:01:42 -06:00
handler.go Request body limits (#39080) 2026-02-05 10:29:53 -05:00
profiles.go Android Wi-Fi profile withheld until cert installed on device (#42877) 2026-04-07 16:26:09 -05:00
profiles_filter_test.go Android Wi-Fi profile withheld until cert installed on device (#42877) 2026-04-07 16:26:09 -05:00
profiles_test.go Android Wi-Fi profile withheld until cert installed on device (#42877) 2026-04-07 16:26:09 -05:00
pubsub.go Fixed Android pubsub panic when host was deleted (#43788) 2026-04-21 16:01:51 -05:00
pubsub_test.go Fixed Android pubsub panic when host was deleted (#43788) 2026-04-21 16:01:51 -05:00
reconcile_devices.go Move NewActivity to activity bounded context (#39521) 2026-02-25 14:11:03 -06:00
requests.go RAA: Support removing an android app from managed google play (self-service) on deletion (#39343) 2026-02-11 11:35:00 -05:00
service.go Converted old activity module into function. Cleaned up activity types. (#40752) 2026-03-03 01:01:42 -06:00