Fix out-of-order Windows MDM fleetd install commands (#47683)#47736
Conversation
The fleetd install Add and Exec were enqueued as two separate Windows MDM commands ordered only by created_at (1-second granularity), so they could be delivered Exec-before-Add. The device then ran DownloadInstall on a not-yet-created node, returned 404, and fleetd never installed, which could hang the Windows Autopilot Enrollment Status Page. Enqueue them as a single command so Add always precedes Exec.
|
@coderabbitai full review |
|
/agentic_review |
There was a problem hiding this comment.
Warning
- Copilot's review of this pull request may be incomplete because some of the changed files are excluded by your Copilot content exclusion settings. See Excluding content from Copilot for details.
Pull request overview
This PR fixes an intermittent Windows MDM enrollment failure where fleetd install commands (Add to create the MSI node and Exec to run DownloadInstall) could be delivered out of order due to nondeterministic ordering of rows sharing the same created_at timestamp. The fix makes ordering deterministic by enqueueing both operations as a single queued command (one raw_command) so the Add appears before Exec in the same SyncML body.
Changes:
- Combine fleetd MSI
Add+Execinto one queued Windows MDM command to guarantee delivery order. - Adjust enqueue logic to insert a single command UUID/result-tracking row (using the
ExecUUID). - Add a user-visible changes entry (file content excluded from this review by policy).
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| server/service/microsoft_mdm.go | Enqueues the fleetd install as a single Windows MDM command by concatenating Add and Exec into one raw_command. |
| changes/47683-windows-mdm-fleetd-install-ordering | Release note / changes entry (excluded from diff by content policy; not reviewed). |
Files excluded by content exclusion policy (1)
- changes/47683-windows-mdm-fleetd-install-ordering
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.
Tip: disable this comment in your organization's Code Review settings.
|
@coderabbitai review |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #47736 +/- ##
==========================================
+ Coverage 67.18% 67.20% +0.02%
==========================================
Files 3629 3631 +2
Lines 229302 229480 +178
Branches 11948 11948
==========================================
+ Hits 154060 154228 +168
- Misses 61387 61390 +3
- Partials 13855 13862 +7
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
✅ Action performedFull review finished. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
Walkthrough
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ksykulev
left a comment
There was a problem hiding this comment.
Not a whole lot of tests for this given this fixes are hard to reproduce issue. But not blocking 👍 code looks good.
The fleetd install Add and Exec were enqueued as two separate Windows MDM commands ordered only by created_at (1-second granularity), so they could be delivered Exec-before-Add. The device then ran DownloadInstall on a not-yet-created node, returned 404, and fleetd never installed, which could hang the Windows Autopilot Enrollment Status Page. Enqueue them as a single command so Add always precedes Exec.
Related issue: Resolves #47683
Checklist for submitter
If some of the following don't apply, delete the relevant line.
changes/,orbit/changes/oree/fleetd-chrome/changes.See Changes files for more information.
Testing
Summary by CodeRabbit
Bug Fixes
Documentation