Auto update, pin, and rollback Fleet-maintained apps via UI/API
Goal
| User story |
|---|
| As an IT admin, |
| I want to keep my Fleet-maintained apps up-to-date, pin them to a specific version, or roll back to the previous version via UI/API |
| so that I can make sure my hosts are patched with the latest version of the app or pin them to a specific version. |
Changes
Product
- [x] UI changes: Figma
- [x] CLI (fleetctl) usage changes: No changes
- [x] YAML changes: No changes. Can already pin/rollback via GitOps (YAML)
- [x] REST API changes: #47274 (merged) — adds
versionbody field to existingPATCH /api/v1/fleet/software/titles/:id/package - [x] Fleet's agent (fleetd) changes: No changes
- [x] Fleet server configuration changes: No changes
- [x] Exposed, public API endpoint changes: No changes
- [x] fleetdm.com changes: No changes
- [x] GitOps mode UI changes: Search Figma for mention of "GitOps mode"
- [x] Activity changes: Extend existing
edited_softwareactivity with apinned_versionfield (stringornull). Display name on the dashboard remains "edited software". - [x] Permissions changes: Only maintainers and up can pin.
- [x] Changes to paid features or tiers: Fleet Premium only
- [x] My device and fleetdm.com/better changes: No changes
- [x] Usage statistics: No changes
- [x] Other reference documentation changes: No changes
- [x] First draft of test plan added
- [x] Once shipped, requester has been notified
- [x] Once shipped, dogfooding issue has been filed. #49742
Engineering
- [x] Test plan is finalized
- [x] Contributor API changes: Docs PR #47274 is merged (
docs-v4.88.0) — addsversionbody parameter toPATCH /api/v1/fleet/software/titles/:id/package. Remaining doc work: a follow-up againstdocs-v4.88.0to document the extendedGET /api/v1/fleet/software/titles/:idresponse carryingpinned_versionandfleet_maintained_versions[]. Owned by #46728. - [x] Feature guide changes: Update Fleet-maintained apps guide — replace the "Update the app" delete-and-re-add instructions with new "Auto-update", "Pin a version", and "Roll back" sections describing both the UI workflow (Actions > Versions) and the GitOps
version:key (already supported since 4.82). Owned by #46728. - [x] Database schema migrations: None. Reuse the existing
software_installers.versioncolumn and the multi-version unique index(global_or_team_id, title_id, version)added by20260218175704_FMAActiveInstallers.go. - [x] Load testing: Not required. The PATCH
.../packageendpoint is already load-tested for non-FMA installer updates;softwareInstallerPayloadFromSlugwas load-tested for GitOps batch in 4.85. No new endpoint, no new write hot-paths. - [x] Pre-QA load test: Not required. Change does not measurably modify Fleet's load profile.
- [x] Load testing/osquery-perf improvements: N/A
- [x] This is a premium only feature: Yes. Core service short-circuits with
ErrMissingLicensewhenversionis set on the PATCH request; EE service holds the implementation. Test plan verifies both backend (402) and frontend (Versions action item hidden) gating.
ℹ️ Please read this issue carefully and understand it. Pay special attention to UI wireframes, especially "dev notes".
QA
Risk assessment
- Requires testing in a hosted environment: Yes. Version caching uses S3, which requires a hosted environment with S3 configured (Fleet Cloud or dogfood) to populate multiple cached versions of an FMA for the same team.
- Risk level: Low
- Risk description: The backend is a wire-through to an engine that has shipped twice (4.82 #31919 rollback, 4.85 #38988 major-version pin). The PATCH endpoint and
softwareInstallerPayloadFromSlugengine already handle every code path the newversionfield needs. The larger surface area to regression-test is frontend: the new Library section (collapsible rows, Latest/Pinned badges, expanded status counts), the new Versions modal (replaces the older "Pin version" modal design), the new Policies modal opened from theAuto install >pill, and the updated Actions ▾ dropdown — especially the GitOps-mode disabled states.
Test plan
Make sure to go through the list and consider all events that might be related to this story, so we catch edge cases earlier.
Run end-to-end on a real macOS host enrolled to a Premium Fleet:
- As admin, add Google Chrome (Fleet-maintained, macOS) to the Workstations team. Verify the Library section shows one collapsed row with
Latest+All hosts. - Populate a second cached version of Chrome for the team (via GitOps
version:against dogfood, or by inserting a secondsoftware_installersrow locally). Verify the Library section now shows two collapsed rows: the new active row withLatest+ label-count badge; the older row greyed out with no badge and the rollback tooltip on hover. - Install Chrome on a test host (Self-service or auto-install). Verify the latest version installs and the active row's
Installedcount increments. Expand the row and verify the labels block, hash + copy, and download icon all render and function. - Click Actions ▾ → Versions. Verify the modal opens titled
VersionswithAutomatically update to latestpre-selected. SelectPin to {older version}→ Save. Verify the success flash, the modal closes, the older row picks up thePinnedbadge, and a new install on a different host pulls the pinned older version. Verify anedited_softwareactivity with the newpinned_versionfield appears. - Open Versions again → select
Pin to major version ({N})→ Save. Verify thePinnedbadge sits on the cached row that satisfies the major and the activity feed showspinned_version: "^N". - Open Versions again → select
Automatically update to latest→ Save. Verify the newest cached row picks upLatestand the activity feed showspinned_version: null. - Enable GitOps mode. Verify: Versions item in Actions ▾ is disabled with the GitOps tooltip; per-row trash icon in the expanded Library row is disabled with the tooltip; Edit appearance / Edit software / Patch keep their existing GitOps treatment.
- Log in as observer. Verify the Versions action item is hidden and per-row trash icons are absent.
- Disable Premium licensing (or hit the core API). Verify
PATCH .../packagewithversionreturns 402 and the Versions action item is hidden in the UI. - Trigger error path: pin to
^999(or any unavailable major). Verify the error flash and the modal stays open with the previous selection. - Click the
Auto install >pill in the Info card. Verify the Policies modal opens with the associated policies. Verify Done dismisses it. - On a host already running the latest Chrome, pin to the older version → verify the host actually downgrades (not just future installs), and software inventory reflects the older build. This is the "roll back because of bugs" path.
- API-level: as observer, observer+, and the gitops role, hit
PATCH .../packagedirectly with aversionbody field → verify the right 403/role-specific error, independent of the UI gating. - GitOps precedence: set a pin via UI/API, then run a GitOps apply that omits the
version:field for the same FMA → verify which wins and document the resulting source-of-truth behavior.
Repeat steps 4–6 as a team-level maintainer to confirm permission gating. Observer and observer+ are covered in step 8.
Testing notes
- A hosted environment with S3 is required to produce a second cached version (see step 2). On a local instance without S3, simulate by inserting a second
software_installersrow tied to the sametitle_idandfleet_maintained_app_id. - To inspect the active installer row in the database:
SELECT id, title_id, version, fleet_maintained_app_id FROM software_installers WHERE title_id = ? AND (global_or_team_id = ? OR global_or_team_id IS NULL) ORDER BY version DESC; - Verify the activity feed shows
edited_softwarewith a non-nullpinned_versionafter step 4 andnullafter step 6.
Confirmation
- [x] Engineer: Added comment to user story confirming successful completion of test plan.
- [ ] QA: Added comment to user story confirming successful completion of test plan.
Noah: This was split off from this story in 4.82.0 and pushed into this release.
@marko-lisica Great job splitting this out, just a reminder to tag me when moving stories in milestones so I can make sure we're planning capacity correctly.
@cdcme @georgekarrv Would you please t-shirt size this when you have a moment?
@georgekarrv / @lukeheath Gave this a S assuming #31919 will be done before this is started.
@noahtalerman, lgtm 📌
lgtm 📌
@mike-j-thomas sweet! Heads up that I added it to the design system in Figma:
FYI @melpike @marko-lisica @rachaelshaw new pin icon.
Sequence diagram for the flow.
https://us-65885.app.gong.io/call?id=6156917544735063440&highlights=%5B%7B%22type%22%3A%22SHARE%22%2C%22from%22%3A3513%2C%22to%22%3A3562%7D%5D reviewed the USR we never looked at the API it was just checked without pulling it up.
I think it would be much easier to just go with version key being set / cleared like we do in gitops to apply and clear the pins. We shouldn't add a whole new ep just for pin
@georgekarrv, that makes sense for me. I will open a new PR.
@cdcme UI changes are ready
Test plan
Completed!
- [x] As admin, add Google Chrome (Fleet-maintained, macOS) to the Workstations team. Verify the Library section shows one collapsed row with
Latest+All hosts. - [x] Populate a second cached version of Chrome for the team (via GitOps
version:against dogfood, or by inserting a secondsoftware_installersrow locally). Verify the Library section now shows two collapsed rows: the new active row withLatest+ label-count badge; the older row greyed out with no badge and the rollback tooltip on hover.- ~~Small problem: tooltip is centered on box and not on text~~ intended change
- ~~Small problem: selection box in Edit software modal still says it cant be done through UI.~~ Fixed
- ~~Small problem: rows are showing the same filename for different versions.~~ Fixed
- [x] Install Chrome on a test host (Self-service or auto-install). Verify the latest version installs and the active row's
Installedcount increments. Expand the row and verify the labels block, hash + copy, and download icon all render and function. - [x] Click Actions ▾ → Versions. Verify the modal opens titled
VersionswithAutomatically update to latestpre-selected. SelectPin to {older version}→ Save. Verify the success flash, the modal closes, the older row picks up thePinnedbadge, and a new install on a different host pulls the pinned older version. Verify anedited_softwareactivity with the newpinned_versionfield appears. - [x] Open Versions again → select
Pin to major version ({N})→ Save. Verify thePinnedbadge sits on the cached row that satisfies the major and the activity feed showspinned_version: "^N". - [x] Open Versions again → select
Automatically update to latest→ Save. Verify the newest cached row picks upLatestand the activity feed showspinned_version: null. - [x] Enable GitOps mode. Verify: Versions item in Actions ▾ is disabled with the GitOps tooltip; per-row trash icon in the expanded Library row is disabled with the tooltip; Edit appearance / Edit software / Patch keep their existing GitOps treatment.
- [x] Log in as observer. Verify the Versions action item is hidden and per-row trash icons are absent.
- Observer can't download the installer (403), is this intended?
- [x] Disable Premium licensing (or hit the core API). Verify
PATCH .../packagewithversionreturns 402 and the Versions action item is hidden in the UI. - [x] ~~Trigger error path: pin to
^999(or any unavailable major). Verify the error flash and the modal stays open with the previous selection.~~ N/A, shouldn't be an error - [x] Click the
Auto install >pill in the Info card. Verify the Policies modal opens with the linked patch policy names- ~~Patch policy only - still shows "Auto install" rather than "Patch policy"~~ Fixed
- [x] On a host already running the latest Chrome, pin to the older version → verify the host actually downgrades (not just future installs), and software inventory reflects the older build. This is the "roll back because of bugs" path.
- ~~Some apps like 1Password don't change back to older versions when a newer one is already installed. This might be a problem with the install script, as some apps like 8x8 Work do change between versions without uninstalling first. The
host_software_installsrecord seemed correct, so more investigation is needed.~~ See #48355
- ~~Some apps like 1Password don't change back to older versions when a newer one is already installed. This might be a problem with the install script, as some apps like 8x8 Work do change between versions without uninstalling first. The
- [x] API-level: as observer, observer+, and the gitops role, hit
PATCH .../packagedirectly with aversionbody field → verify the right 403/role-specific error, independent of the UI gating. - [x] GitOps precedence: set a pin via UI/API, then run a GitOps apply that omits the
version:field for the same FMA → verify which wins and document the resulting source-of-truth behavior. - [x] Repeat steps 4–6 as a team-level maintainer to confirm permission gating. Observer and observer+ are covered in step 8.
- [x] Updating an FMA when it has custom install/uninstall scripts keeps the custom scripts
✅ Testing Complete - Issue #38504
All tests passed. Version pinning feature V 4.89.0.
Core Features
- ✅ Version pinning (specific, major, auto-update)
- ✅ UI updates correctly
- ✅ Host deployment verified
Permission Gating
- ✅ Observer: blocked (403)
- ✅ Maintainer: allowed
- ✅ Admin: allowed
- ✅ Team-scoped users protected
Security
- ✅ Authentication enforced (401)
- ✅ Invalid inputs handled (400/404/422)
- ✅ Cross-team access blocked (403)
- ✅ Concurrent requests consistent
Ready for release.
Current behavior Right now, .pkg-based FMA apps cannot be downgraded on macOS. Once a host is on a newer version, there is no supported path back to an earlier version through Fleet. This affects all of our .pkg install scripts, not a single app. Downgrade fails for one of two reasons:
The app self-updates and refuses an older version (e.g. Chrome). The .pkg itself contains logic that blocks installing an older version.
Scope — this is limited to the .pkg subset Of the ~960 macOS FMAs, 819 install without any .pkg — they copy an app bundle from a .dmg or extract a .zip, so no .pkg is involved at any stage. These downgrade cleanly today. Only the .pkg apps are affected. Well-known safe (non-.pkg) picks: .dmg → hdiutil mount + cp -R (true drag-install)
Browsers: firefox, brave-browser, vivaldi, opera, tor-browser, mullvad-browser Apps: docker-desktop, chatgpt, claude, discord, telegram, signal, spotify, vlc, obs Dev/DB: iterm2, bbedit, db-browser-for-sqlite, dbeaver-community, mongodb-compass, tableplus Utilities: keepassxc, bitwarden, nordpass, little-snitch, lulu, rectangle, maccy, stats
.zip → unzip/ditto + cp -R
Editors: cursor, zed, sublime-text, sublime-merge, vscodium Affinity: affinity-designer, affinity-photo, affinity-publisher (and @1 variants) Other: abstract, acorn, sketch, bruno, insomnia
How downgrade works today (non-.pkg apps only) For the apps that do support it, the current flow is:
Pin the version — set the lower version (or major version). Required whenever the installed version is ahead of your target, or when you want to stop the host from updating to a later version. Uninstall the currently installed version. Reinstall — from the Software library (.../software?fleet_id=x) or the end user's My device page, click Install again. Verify the installed version matches the pinned version.
Takeaway At the moment, .pkg FMA apps block users from downgrading. The workaround above only applies to the .dmg/.zip install paths. A fix for the .pkg scripts is what this issue is tracking. https://github.com/fleetdm/fleet/issues/48355
✅ QA Verification — .dmg FMA downgrade/rollback (Amazon DCV)
| Fleet version | 4.89.0 |
| Host | qa.fleetdm.com/hosts/592 |
| App | Amazon DCV (nice-dcv-viewer, .dmg, arm64) |
Tested the full update → rollback round trip on a .dmg-based FMA to confirm version pinning + reinstall behave correctly.
Steps
- [x] Enrolled host 592
- [x] Installed lower version
nice-dcv-viewer-2024.0.8004.arm64.dmgand pinned it - [x] Verified
2024.0.8004on the actual host - [x] Moved pin to higher version
nice-dcv-viewer-2025.0.8846.arm64.dmgand reinstalled - [x] Verified update landed (
2025.0.8846) on the host - [x] Moved pin back to
2024.0.8004and reinstalled to roll back - [x] Verified host returned to
2024.0.8004
Result
Update and rollback both work for this .dmg FMA — pinning to a lower version and reinstalling correctly downgrades the app on the host. No version-check blocking like the .pkg case in #48355.
✅ QA Verification — .dmg FMA uninstall + reinstall with "Pin to major version" (Amazon DCV)
| Fleet version | 4.89.0 |
| Host | qa.fleetdm.com/hosts/592 |
| App | Amazon DCV (nice-dcv-viewer, .dmg, arm64) |
| Team | Living on the EDGE |
Same host, same instance, same Fleet version throughout. Focus: the Pin to major version option in the Versions modal.
Available versions in library
nice-dcv-viewer-2025.0.8846.arm64.dmg—2025.0.8846(latest)nice-dcv-viewer-2024.0.8004.arm64.dmg—2024.0.8004
Steps
- [x] Pinned to specific version
2024.0.8004and installed it - [x] Verified
2024.0.8004on the actual host - [x] Uninstalled the app
- [x] Set pin to Pin to major version (2025) and installed
- [x] Verified the
2025major-line version (2025.0.8846) installed on the host
Result
Uninstall followed by Pin to major version + reinstall works correctly for this .dmg FMA — selecting the major-version pin resolves to the latest release in that major line (2025.0.8846) and installs cleanly after the prior version was removed.
Hey @andreasn-work and @shc-sync, we shipped this story in 4.89.
With each version's dawn, Apps updated, pinned, rolled back, Cloud city stays strong.
notifed both customers of the update
Notified customer-rembrandt - closing issue
In Cloud City's glow, Apps pin, update, roll back smooth. Fleet sails, ever flow.