镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Fix GitOps reporting software attached to a title by name as deleted - #55547

Merged
cdcme merged 5 commits into
fleetdm:mainfrom
ynaamane:fix-55539-fma-name-title-deletion
Oct 30, 2026
Merged

cdcme merged 5 commits into
fleetdm:mainfrom
ynaamane:fix-55539-fma-name-title-deletion

Conversation

@ynaamane

@ynaamane ynaamane commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Related issue: Resolves #55539

A title matched by name (for example a macOS title without a bundle identifier) was reported as deleted on every GitOps run. The apply keeps the title softwareInstallerTitleSelect resolves, including its name fallback, while the deletion report compared the payload's identifier with the title's unique_identifier. The report now skips candidates whose title an incoming payload resolves to with the title lookup the apply runs (softwareInstallerTitleSelect, through GetExistingSoftwareInstallerTitleID); it only runs when there are candidates.

  • ee/server/service/software_installers.go
  • server/datastore/mysql/software_installers.go and server/fleet/datastore.go (comments only)

Checklist for submitter

  • Changes file added for user-visible changes in changes/, orbit/changes/ or ee/fleetd-chrome/changes.
    See Changes files for more information.

Testing

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

TestBatchSetSoftwareInstallersKeepsTitleAttachedByName (MySQL integration) adds an inventory title with no bundle identifier and batches dummy_installer.pkg twice: main reports the title as deleted on the second batch, this branch reports nothing, and an empty payload still reports it.

AI

AI: Claude Code (claude-opus-5-5)

AI: Claude Code (claude-sonnet-5-5)

Summary by CodeRabbit

  • Bug Fixes
    • Fixed GitOps incorrectly reporting Fleet-maintained apps or packages as deleted when incoming software matches an existing title by name, bundle identifier, or upgrade code. This includes macOS titles without bundle identifiers.
    • Batch uploads now report genuine pending deletions while preserving titles matched by incoming packages. Failed title lookups return an error instead of a deletion result.

@ynaamane
ynaamane requested a review from a team as a code owner October 14, 2026 09:23
@coderabbitai

coderabbitai Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: fleetdm/fleet/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f1536a46-2ade-4bad-a041-f72c4e4f9936
📥 Commits

Reviewing files that changed from the base of the PR and between a9eeb2b and 9a31430.

📒 Files selected for processing: 4
  • ee/server/service/software_installers_test.go
  • server/datastore/mysql/software_installers.go
  • server/fleet/datastore.go
  • server/service/integration_enterprise_software_batch_test.go
🚧 Files skipped from review as they are similar to previous changes: 2
  • server/datastore/mysql/software_installers.go
  • server/fleet/datastore.go

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

Walkthrough

Batch software upload deletion reporting now resolves incoming packages to existing software titles and excludes those title IDs from pending-deletion results. Lookup errors other than NotFound fail the batch. Unit and integration tests cover name-attached titles, dry-run and normal uploads, repeat applies, removal, and lookup errors. Datastore comments and a changelog entry describe name-attached title handling.

Priority: ➖ Normal

Severity of issue fixed: Medium

Merge Risk: ⚪ Minimal · up to 9a314

The change preserves name-matched titles in deletion reports, with no established merge-blocking issue remaining.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 5 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly summarizes the primary change: preventing GitOps from reporting software attached to a title by name as deleted.
Description check Passed The description identifies the related issue, explains the root cause and fix, lists the main files, documents automated testing, and includes the required AI section. It also transparently leaves man…
Linked Issues check Passed The change satisfies issue #55539. When deletion candidates exist, softwareBatchUpload resolves each incoming package with GetExistingSoftwareInstallerTitleID and removes the resolved title IDs fr…
Out of Scope Changes check Passed The changes stay within issue #55539. The service code fixes deletion filtering. The automated tests verify name attachment and deletion reporting. The datastore comments and changelog document the be…
Full details: Description check

Explanation

The description identifies the related issue, explains the root cause and fix, lists the main files, documents automated testing, and includes the required AI section. It also transparently leaves manual QA unchecked. The duplicate AI entries are a minor formatting issue.

Full details: Linked Issues check

Explanation

The change satisfies issue #55539. When deletion candidates exist, softwareBatchUpload resolves each incoming package with GetExistingSoftwareInstallerTitleID and removes the resolved title IDs from the deletion report. This covers name matching when the payload identifier differs from the title unique_identifier. The service test covers dry-run and error handling. The MySQL integration test covers repeated batches and an empty payload.

Full details: Out of Scope Changes check

Explanation

The changes stay within issue #55539. The service code fixes deletion filtering. The automated tests verify name attachment and deletion reporting. The datastore comments and changelog document the behavior. No unrelated executable behavior is reported.

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.35%. Comparing base (aacba24) to head (9a31430).

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #55547   +/-   ##
=======================================
  Coverage   77.35%   77.35%           
=======================================
  Files        4322     4322           
  Lines      269605   269617   +12     
  Branches    15952    15952           
=======================================
+ Hits       208560   208573   +13     
+ Misses      60855    60854    -1     
  Partials      190      190           
Flag Coverage Δ
backend 78.63% <100.00%> (+<0.01%) ⬆️

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 commented Oct 15, 2026

Copy link
Copy Markdown
Member

@ynaamane Could you add a MySQL integration test? The unit test hard-codes the title the lookup returns, so it would still pass if the real lookup picked a different title than the apply. I can reproduce the bug on main by adding a title with no bundle ID and batching dummy_installer.pkg twice.

Could you also update the comment in GetSoftwareInstallersPendingDeletion? It still says it matches the way BatchSetSoftwareInstallers does.

@ynaamane

Copy link
Copy Markdown
Contributor Author

Added TestBatchSetSoftwareInstallersKeepsTitleAttachedByName to the enterprise integration suite. It adds an inventory title with no bundle ID, batches dummy_installer.pkg (the apply attaches it to that title), then batches it again with dry run on and off and expects no deleted packages; an empty payload still reports the title. It fails on main and passes on this branch.

Updated the comment in GetSoftwareInstallersPendingDeletion, and the interface doc that said the same: the query only matches (unique_identifier, source), and the caller drops titles a payload attaches to by name.

@cdcme

cdcme commented Oct 16, 2026

Copy link
Copy Markdown
Member

@ynaamane Thanks! If you get the conflicts resolved, I can get this approved & merged!

@ynaamane
ynaamane force-pushed the fix-55539-fma-name-title-deletion branch from a9eeb2b to 9a31430 Compare October 18, 2026 18:11
@ynaamane

Copy link
Copy Markdown
Contributor Author

Rebased on main and resolved the conflict: the test split moved the new integration test, so it now sits next to yours in integration_enterprise_software_batch_test.go, unchanged.
Nothing else in the diff changed, and the test still fails on main and passes on this branch.

@ynaamane

Copy link
Copy Markdown
Contributor Author

@cdcme Friendly ping: this still merges cleanly into main and is ready whenever you have a moment.

@cdcme
cdcme merged commit c04ab0e into fleetdm:main Oct 30, 2026
40 of 42 checks passed
@cdcme

cdcme commented Oct 30, 2026

Copy link
Copy Markdown
Member

Thanks @ynaamane for the contribution! 👏

@ynaamane

Copy link
Copy Markdown
Contributor Author

Thanks for the review and the merge, @cdcme!

allenhouchins added a commit that referenced this pull request Nov 6, 2026
**Related issue:** NA

Adds Fleet's November 2026 newsletter
(`articles/newsletter-2026-11.md`), which covers October 2026. It
publishes at `fleetdm.com/newsletters/newsletter-2026-11`.

- **Email subject line:** `Fleet news: November 2026`
- **Category:** `newsletter`, singular, which the website build accepts
(#52120). No website changes are needed.
- **Author:** Aube Paul (`robinedev`), matching the September and
October issues.

## Open questions for reviewers

- **New "📺 Fleet Virtual Summit" section** for the November 10 LinkedIn
Live event, placed before workshops. Keep it or fold it into the
workshops section. If it stays, it's a new entry in the newsletter's
section emoji table.
- **The roadmap preview is linked even though November isn't a quarter's
first month.** The October preview published October 13, after the
October issue went out, so readers haven't seen it in the newsletter
yet.
- **Article and guide picks are editorial**, not based on traffic
numbers. Reorder them if you have analytics. There were no case studies
in October.
- **The community section has one post, and it's personal.** Henry
Stamerjohann's MacSysAdmin talk. Fleet's company-page post about the
"Apple in the enterprise" research is another option, but it repeats the
research article in "Worth reading." No engagement numbers were
available.
- **Community contributors with five or more merged PRs in October:**
Prajwal Janbandhu (8, in the thank-you line), Michael Alt (6,
highlighted), Dhvanit (6, returning, not named), and Shreyash Agare (5,
returning, not named). Confirm none of them is a contractor whose
account isn't in the org.
- **Several first-time contributors only edited the handbook.** None
appear in Fleet's Slack, so they stay in the thank-you line.

## How each section was sourced

- **Shipped:** the Fleet 4.93.0 and 4.94.0 release articles,
cross-checked against tagged releases. The three highlights are macOS
patch notifications (Premium), Android zero-touch enrollment (Premium),
and self-service configuration profiles (not Premium), so the section
isn't all Premium. Patch releases 4.93.1 and 4.93.2 are covered by the
"See every release" link.
- **Planned:** the release planning board (view 10, filtered to
milestone 4.95.0), not the milestone fallback. There are 22 stories, all
assigned. 5.0.0 is due December 4, so November holds one release.
- **Workshops:** fleetdm.com/workshops, with the next five after the
send date.
- **Community contributions:** PRs merged in public `fleetdm` repos in
October by authors outside the `fleetdm` org, minus bots.

## Left out on purpose

- **"Windows: force standard account"** was in the planned section in
both September and October and hasn't shipped. It's not on the 4.95.0
board, so it isn't mentioned a third time.
- **Multiple versions of the same App Store app** is named in the 4.94.0
release article's title, but the article marks it as moved to 4.95. It's
listed under "Also on deck" instead of "shipped."
- **Amsterdam workshop (November 3):** past by the time this sends.
- **Fleet staff or contractors whose accounts aren't in the org:**
@TraiLynne and @thomcrowe. Both are confirmed in Fleet's Slack.
- **Other October content:** the warehouse inventory article and
Retriever guide, the PHP2Shell and eMudhra pieces, and every `industry
news` article. The routine doesn't feature that category.

<details>
<summary>Suggested <code>~/fleet-newsletters/contributors.tsv</code>
lines (append once confirmed)</summary>

```
TraiLynne	fleet	Trai Lynne Compton, Fleet staff (Slack); not an org member
thomcrowe	fleet	Thom Crowe, Fleet contractor (website); not an org member
```

</details>

<details>
<summary>Ledger append block: run only after this issue is
sent</summary>

`~/fleet-newsletters/ledger.jsonl` didn't exist before this issue.
Repeats were checked against the September and October issues in the
repo instead. This block creates the ledger and records every item in
this issue.

```bash
mkdir -p ~/fleet-newsletters && cat >> ~/fleet-newsletters/ledger.jsonl <<'EOF'
{"issue":"2026-11","section":"shipped","id":"4.93.0"}
{"issue":"2026-11","section":"shipped","id":"4.94.0"}
{"issue":"2026-11","section":"planned","id":"51599"}
{"issue":"2026-11","section":"planned","id":"39176"}
{"issue":"2026-11","section":"planned","id":"51979"}
{"issue":"2026-11","section":"planned","id":"53284"}
{"issue":"2026-11","section":"planned","id":"33062"}
{"issue":"2026-11","section":"planned","id":"52534"}
{"issue":"2026-11","section":"planned","id":"47904"}
{"issue":"2026-11","section":"events","id":"fleet-virtual-summit-2026"}
{"issue":"2026-11","section":"events","id":"2003719976388"}
{"issue":"2026-11","section":"events","id":"2003716644422"}
{"issue":"2026-11","section":"events","id":"2002266719658"}
{"issue":"2026-11","section":"events","id":"2002266872114"}
{"issue":"2026-11","section":"events","id":"2002267524064"}
{"issue":"2026-11","section":"articles","id":"apple-in-the-enterprise-2026"}
{"issue":"2026-11","section":"articles","id":"nvidia-gtc-2026"}
{"issue":"2026-11","section":"articles","id":"tailworm-what-to-do-about-tailscale-ssh-before-the-fix-ships"}
{"issue":"2026-11","section":"articles","id":"revert-a-bad-change-in-gitops"}
{"issue":"2026-11","section":"articles","id":"block-chrome-extensions"}
{"issue":"2026-11","section":"articles","id":"block-edge-extensions"}
{"issue":"2026-11","section":"articles","id":"block-firefox-extensions"}
{"issue":"2026-11","section":"articles","id":"block-safari-extensions"}
{"issue":"2026-11","section":"articles","id":"use-claude-code-with-fleet"}
{"issue":"2026-11","section":"articles","id":"roadmap-preview-october-2026"}
{"issue":"2026-11","section":"social","id":"7513481631123394560"}
{"issue":"2026-11","section":"community","id":"#50836"}
{"issue":"2026-11","section":"community","id":"#53407"}
{"issue":"2026-11","section":"community","id":"#53670"}
{"issue":"2026-11","section":"community","id":"#53768"}
{"issue":"2026-11","section":"community","id":"#53810"}
{"issue":"2026-11","section":"community","id":"#53824"}
{"issue":"2026-11","section":"community","id":"#54019"}
{"issue":"2026-11","section":"community","id":"#54181"}
{"issue":"2026-11","section":"community","id":"#54296"}
{"issue":"2026-11","section":"community","id":"#54411"}
{"issue":"2026-11","section":"community","id":"#54502"}
{"issue":"2026-11","section":"community","id":"#54509"}
{"issue":"2026-11","section":"community","id":"#54592"}
{"issue":"2026-11","section":"community","id":"#54685"}
{"issue":"2026-11","section":"community","id":"#54708"}
{"issue":"2026-11","section":"community","id":"#54726"}
{"issue":"2026-11","section":"community","id":"#54785"}
{"issue":"2026-11","section":"community","id":"#55056"}
{"issue":"2026-11","section":"community","id":"#55058"}
{"issue":"2026-11","section":"community","id":"#55072"}
{"issue":"2026-11","section":"community","id":"#55089"}
{"issue":"2026-11","section":"community","id":"#55097"}
{"issue":"2026-11","section":"community","id":"#55127"}
{"issue":"2026-11","section":"community","id":"#55249"}
{"issue":"2026-11","section":"community","id":"#55266"}
{"issue":"2026-11","section":"community","id":"#55353"}
{"issue":"2026-11","section":"community","id":"#55471"}
{"issue":"2026-11","section":"community","id":"#55492"}
{"issue":"2026-11","section":"community","id":"#55547"}
{"issue":"2026-11","section":"community","id":"#55841"}
{"issue":"2026-11","section":"community","id":"#55900"}
{"issue":"2026-11","section":"community","id":"#55903"}
{"issue":"2026-11","section":"community","id":"#55946"}
{"issue":"2026-11","section":"community","id":"#56072"}
{"issue":"2026-11","section":"community","id":"#56085"}
{"issue":"2026-11","section":"community","id":"#56148"}
{"issue":"2026-11","section":"community","id":"#56214"}
{"issue":"2026-11","section":"community","id":"#56266"}
{"issue":"2026-11","section":"community","id":"#56287"}
{"issue":"2026-11","section":"community","id":"#56376"}
{"issue":"2026-11","section":"community","id":"#56403"}
{"issue":"2026-11","section":"community","id":"#56486"}
{"issue":"2026-11","section":"community","id":"#56498"}
{"issue":"2026-11","section":"community","id":"#56575"}
{"issue":"2026-11","section":"community","id":"#56596"}
{"issue":"2026-11","section":"community","id":"#56609"}
{"issue":"2026-11","section":"community","id":"#56657"}
{"issue":"2026-11","section":"community","id":"#56708"}
{"issue":"2026-11","section":"community","id":"#56719"}
{"issue":"2026-11","section":"community","id":"#56983"}
{"issue":"2026-11","section":"community","id":"#56984"}
{"issue":"2026-11","section":"community","id":"#56985"}
EOF
```

</details>

## Testing

- [x] Confirmed the markdown passes the website build's metadata checks:
required meta tags, ISO `publishedOn`, description at 139 of 150
characters, `category` set to `newsletter`, H1 matching `articleTitle`,
and no Vue-template braces.
- [x] Verified all 54 fleetdm.com, GitHub, and Eventbrite links return
200. LinkedIn returns 999 to automated requests, so the profile links
come from the handbook and the post link was opened in a browser.
- [x] Checked the copy against Fleet's content style: no em dashes,
sentence-case headings, Oxford commas, and Fleet Premium labels carried
through from the release articles.
- [ ] QA'd all new/changed functionality manually

## AI

**AI:** Claude Code (claude-opus-5-5)

---------

Co-authored-by: robinedev <aubedev@outlook.com>
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.

GitOps: Fleet-maintained app reported as "deleted software" on every run when its title has no bundle identifier

2 participants