fleet/server/service/osquery_utils
Victor Lyuboslavsky 086099631e
Fix issue where Windows MDM profiles are not sent to offline hosts (#25619)
For #25615 

The actual fix is these two lines, where we only delete the command from
the queue for the specific host we're processing:
```
const dequeueCommandsStmt = `DELETE FROM windows_mdm_command_queue WHERE enrollment_id = ? AND command_uuid IN (?)`
stmt, params, err = sqlx.In(dequeueCommandsStmt, enrolledDevice.ID, matchingUUIDs)
```

Everything else is tests, cleanup, refactoring for readability.

# Checklist for submitter

- [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/Committing-Changes.md#changes-files)
for more information.
- [x] Added/updated automated tests
- [x] A detailed QA plan exists on the associated ticket (if it isn't
there, work with the product group's QA engineer to add it)
- [x] Manual QA for all new/changed functionality
2025-01-21 09:59:32 -06:00
..
gen_queries_doc.go Software Detail Query Overrides (#19132) 2024-05-30 10:10:16 -06:00
queries.go Fix issue where Windows MDM profiles are not sent to offline hosts (#25619) 2025-01-21 09:59:32 -06:00
queries_test.go Fix bug where DDM/Windows profiles with secrets were not being marked Verified. (#25065) 2025-01-01 18:43:02 -06:00
utils.go Issue 1588 allow disabling host users (#1611) 2021-08-11 14:56:11 -03:00