fleet/changes/42544-windows-profiles
Jordan Montgomery 302ad3df7a
Insert hmwp and windows command entries at once (#42566)
<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
**Related issue:** Resolves #42544 

This inserts the commands into the windows command queue in batches
along with the host_mdm_windows_profile entries. corresponding host
profile entries are inserted in the same batch as the command queue
entry so that if a host checks in very quickly after, its profile
doesn't get overwritten by the reconciler during the "update" pass at
the end.

This isn't easily reproducible locally, but will run a loadtest as soon
as possible

# 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.

- [x] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements), JS
inline code is prevented especially for url redirects, and untrusted
data interpolated into shell scripts/commands is validated against shell
metacharacters.
- [x] If paths of existing endpoints are modified without backwards
compatibility, checked the frontend/CLI for any necessary changes

## Testing

- [x] Added/updated automated tests
- [x] Where appropriate, [automated tests simulate multiple hosts and
test for host
isolation](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/reference/patterns-backend.md#unit-testing)
(updates to one hosts's records do not affect another)

- [x] QA'd all new/changed functionality manually

For unreleased bug fixes in a release candidate, one of:

- [x] Confirmed that the fix is not expected to adversely impact load
test results
- [x] Alerted the release DRI if additional load testing is needed


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

## Summary by CodeRabbit

* **Chores**
* Optimized Windows MDM device profile management with more efficient
batch processing for command delivery and profile updates.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-03-27 22:17:34 -04:00

1 line
120 B
Text

* Fixed an issue where Windows MDM profiles could remain in pending if hosts acknowledged them too quickly after upload