Rajendra kadamandJordan Montgomery 3ccf17f8ac Remove nano_view_queue from unscoped MDM commands list query (#45674)
Drops `nano_view_queue` from the Apple branch of the unscoped commands
list and joins the underlying `nano_*` tables directly. The view's
definition bakes in `ORDER BY q.priority DESC, q.created_at`, which
MySQL re-materializes on every query — the outer `LIMIT` can't push past
it, so each unscoped list call pays the full sort cost over the
post-join row set regardless of page size.

This is the same join shape the host-scoped path already uses (see
`listMDMCommandsByHostIdentifier`), so I followed that pattern. Column
output is identical to what the view was producing, which is why no test
updates were needed — all the existing `TestListMDMCommands*` cases pass
without modification.

Scope of this PR is just the hot caller. The view itself isn't touched.
The issue notes other call sites (`vpp.go`, `apple_mdm.go`) still go
through it, and that dropping the `ORDER BY` from the view's definition
would be the durable fix. Both feel like separate PRs — the audit work
for other call sites is non-trivial, and modifying the view risks
silently breaking any consumer that relied on its implicit ordering.
Happy to follow up on either.

Refs #44509.

# Checklist for submitter

- [x] Input is properly validated (no new user input paths; same
parameterized query shape)
- Tests: existing `TestListMDMCommands*` coverage exercises this path
and passes unchanged. No new tests added — see rationale above.
- Changes file: not applicable, internal query refactor with no
user-visible behavior change.


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

## Summary by CodeRabbit

## Bug Fixes
* Updated Mobile Device Management command status reporting to ensure
accurate status and timestamp information.

<!-- review_stack_entry_start -->

[![Review Change
Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/fleetdm/fleet/pull/45674?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack)

<!-- review_stack_entry_end -->

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Co-authored-by: Jordan Montgomery <elijah.jordan.montgomery@gmail.com>
2026-05-22 12:19:23 -04:00
2026-05-20 11:18:49 -03:00
2026-05-11 08:46:02 -05:00
2026-05-13 10:20:13 -04:00

Fleet logo, landscape, dark text, transparent background

News   ·   Report a bug   ·   Docs   ·   Why open source?   ·   Art

Open-source platform for IT and security teams with thousands of computers. Designed for APIs, GitOps, webhooks, YAML, and humans.

A glass city in the clouds

What's it for?

Fleet gives you a single system to secure and maintain all your computing devices over the air. You can do MDM, patch stuff, deploy software, and verify anything, all from one place, across every OS your organization uses.

Fleet works directly with data and events from the native operating system, down to the bare metal. Strong diagnostics let you investigate errors on end-user devices and collect accurate audit evidence in minutes.

Get started

You can try Fleet out for yourself, or grab time with one of the maintainers to chat.

Is it any good?

Fleet is used in production by IT and security teams managing thousands of devices. Many deployments support tens of thousands of hosts, and a few large organizations manage 400,000 or more.

Supported platforms

  • Linux (all distros)
  • macOS
  • Windows
  • Chromebooks
  • iOS and Android (BYOD or corporate-owned)
  • Amazon Web Services (AWS)
  • Google Cloud (GCP)
  • Azure (Microsoft cloud)
  • Data centers
  • Containers (kube, etc)
  • Linux-based IoT devices

Infrastructure as code

Manage your fleet with GitOps, or use the GUI, REST API, webhook events, and the fleetctl command-line tool.

Linux support

First-class support for all major distros. Linux gets the same attention and visibility as macOS and Windows.

Visibility and compliance

Fleet can report on hundreds of attributes across your devices and ships with CIS benchmarks for macOS and Windows and comprehensive operating system, hardware, and software data. Check out the table reference documentation to see what's available.

Open by design

Fleet is open source and transparent about what it can and can't see. End users can verify exactly how the agent works and what data their company collects. Fleet collects only the data needed to manage and secure devices, not private activity like keystrokes, emails, or webcams.

Good neighbors

Ready-to-use, enterprise-friendly integrations exist for Snowflake, Splunk, GitHub Actions, Vanta, Elastic Jira, Zendesk, and more. Fleet also works with tools such as Munki, Chef, Puppet, Ansible, CrowdStrike, and SentinelOne.

Lighter than air

Fleet is lightweight and modular. You can use it for MDM without using it for security, and vice versa. You can turn off features you are not using.

Free as in free

The free version of Fleet will always be free. Fleet is independently backed and actively maintained with the help of many amazing contributors.

Longevity

The company behind Fleet is founded (and majority-owned) by true believers in open source. The company's business model is influenced by GitLab (NYSE: GTLB), with great investors, happy customers, and the capacity to become profitable at any time.

Fleet Device Management's company handbook is public and open source. You can read about the history of Fleet and our commitment to improving the product.

Chat

The Fleet community is full of kind and helpful people. Whether or not you are a paying customer, if you need help, just reach out.

Contributing   Go Report Card   CII Best Practices  

Contributions are welcome, whether you answer questions on Slack / GitHub / LinkedIn, improve the documentation or website, write a tutorial, give a talk at a conference or local meetup, give an interview on a podcast, troubleshoot reported issues, or submit a patch. The Fleet code of conduct is on GitHub.

License

The free version of Fleet is available under the MIT license. The commercial license is also designed to allow contributions to paid features for users whose employment agreements allow them to contribute to open source projects. (See LICENSE.md for details.)

Fleet is built on osquery, nanoMDM, Nudge, and swiftDialog.

S
Description
No description provided
Readme MIT
1.6 GiB
Languages
Go 52.5%
TypeScript 37.5%
JavaScript 4.3%
PowerShell 1.4%
Augeas 0.9%
Other 3%