Skip to content

Download a newly-published FMA version when pinned to it - #48144

Merged
cdcme merged 1 commit into
feat/38504-auto-update-pin-rollback-fmafrom
fix-47215-fma-pin-bump
Jun 24, 2026
Merged

Download a newly-published FMA version when pinned to it#48144
cdcme merged 1 commit into
feat/38504-auto-update-pin-rollback-fmafrom
fix-47215-fma-pin-bump

Conversation

@cdcme

@cdcme cdcme commented Jun 23, 2026

Copy link
Copy Markdown
Member

Related issue: Resolves #47215

Summary

Pinning an FMA to a version via GitOps only resolved against versions already cached on the instance. Bumping a pin to a freshly released version failed with specified version is not available because Fleet never downloaded a pinned version it hadn't cached.

Hydrate now falls back to the published app manifest on a cache miss. When the requested version is currently published, Fleet downloads and caches it, so an admin can bump a pin to a new version in a single apply. A version that's neither cached nor published still returns the same error.

Checklist for submitter

  • Timeouts are implemented and retries are limited to avoid infinite loops

Testing

  • Added/updated automated tests
  • QA'd all new/changed functionality manually

@cdcme
cdcme marked this pull request as ready for review June 23, 2026 23:21
@cdcme
cdcme requested a review from a team as a code owner June 23, 2026 23:21

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@cdcme

cdcme commented Jun 23, 2026

Copy link
Copy Markdown
Member Author

@claude review once

@cdcme cdcme linked an issue Jun 23, 2026 that may be closed by this pull request
2 tasks
Comment thread server/mdm/maintainedapps/sync.go
Comment thread server/mdm/maintainedapps/sync_test.go
@codecov

codecov Bot commented Jun 23, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.50000% with 1 line in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (feat/38504-auto-update-pin-rollback-fma@5864788). Learn more about missing BASE report.

Files with missing lines Patch % Lines
server/mdm/maintainedapps/sync.go 97.50% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@                            Coverage Diff                             @@
##             feat/38504-auto-update-pin-rollback-fma   #48144   +/-   ##
==========================================================================
  Coverage                                           ?   67.23%           
==========================================================================
  Files                                              ?     3635           
  Lines                                              ?   229890           
  Branches                                           ?    11936           
==========================================================================
  Hits                                               ?   154577           
  Misses                                             ?    61423           
  Partials                                           ?    13890           
Flag Coverage Δ
backend 68.86% <97.50%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@cdcme
cdcme force-pushed the fix-47215-fma-pin-bump branch from 0575b43 to 1e6997f Compare June 23, 2026 23:49
@fleetdm fleetdm deleted a comment from claude Bot Jun 23, 2026
selected = manifest.Versions[0]
}
} else {
for _, v := range manifest.Versions {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have any plans to start using the versions array on FMA manifests? Currently there is always only one from what I can see.

@cdcme
cdcme merged commit 872e38a into feat/38504-auto-update-pin-rollback-fma Jun 24, 2026
36 checks passed
@cdcme
cdcme deleted the fix-47215-fma-pin-bump branch June 24, 2026 15:32
georgekarrv added a commit that referenced this pull request Jun 26, 2026
#48293)

**Related issue:** Resolves #38504

  **Constituent PRs (merged into this feature branch):**

- #47682 — Fleet UI: APRF Software title details page Library/Inventory
layout
- #47808 — Extend update software installer API to support FMA version
pinning
  - #47944 — Fleet UI: APRF library item accordion component
  - #48081 — Versions modal, multi-row Library, pinned state
  - #48098 — Add `pinned_version` to `edited_software` activity
  - #48123 — Auto-update FMA cron
  - #48144 — Download a newly-published FMA version when pinned to it

  # 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/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] Timeouts are implemented and retries are limited to avoid infinite
loops
- [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


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

* **New Features**
* Added Fleet-maintained app version pinning (Latest, exact, and major)
via a new Versions modal.
* Introduced premium auto-updates for maintained apps with pin-aware
promotion and rollback-safe caching.
  * Added expandable library version rows and a Policies modal.
* **Bug Fixes**
* Improved pin handling, cache/manifest hydration, and safer update
behavior on per-app failures and deduplication.
* **UI/UX**
* Refreshed the Software title details experience with new
accordion/list patterns, redesigned details widget/tooltips, and updated
installer presentation.
* **Documentation**
* Expanded Storybook component/page coverage and adjusted Storybook
canvas padding.
* **Tests**
* Added/updated unit and integration tests for pinning, auto-update
flows, and new modal/UI behavior.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bump pinned Fleet-maintained app version without unpinning (in a single PR)

2 participants