Skip to content

Simple fix in the rewriter to exclude renaming on software items - #46489

Merged
lucasmrod merged 1 commit into
44970-fix-get-fleetsfrom
44970-fix-apply
Jun 1, 2026
Merged

Simple fix in the rewriter to exclude renaming on software items#46489
lucasmrod merged 1 commit into
44970-fix-get-fleetsfrom
44970-fix-apply

Conversation

@lucasmrod

Copy link
Copy Markdown
Member

Resolves #44970 (2/2).

The issue is that in fleetctl apply the setup_experience field in software items was being converted to macos_setup (which we don't want because that rename should only happen in MDM).

I tried to make the change as simple as possible and isolated to software (I checked and it seems there are no renames under software spec). Supporting some context aware renaming (or prevention of renaming) requires a bigger refactor on the rewriter functionality.

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

Testing

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

@lucasmrod
lucasmrod requested a review from a team as a code owner May 29, 2026 20:12

@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.

@codecov

codecov Bot commented May 29, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 79.31034% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 66.81%. Comparing base (74f5e18) to head (0901940).

Files with missing lines Patch % Lines
server/platform/endpointer/json_key_rewriter.go 79.31% 3 Missing and 3 partials ⚠️
Additional details and impacted files
@@                  Coverage Diff                  @@
##           44970-fix-get-fleets   #46489   +/-   ##
=====================================================
  Coverage                 66.81%   66.81%           
=====================================================
  Files                      2804     2804           
  Lines                    223602   223631   +29     
  Branches                  11400    11400           
=====================================================
+ Hits                     149393   149413   +20     
- Misses                    60638    60643    +5     
- Partials                  13571    13575    +4     
Flag Coverage Δ
backend 68.53% <79.31%> (+<0.01%) ⬆️
backend-activity 86.35% <ø> (ø)

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

☔ View full report in Codecov by Sentry.
📢 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.

@sgress454

Copy link
Copy Markdown
Contributor

Doing this in the decoder does seem to be the best of all the options. I wish it was a bit more abstract, because I imagine we'll keep this rewriter forever (even after Fleet 5, we may have other keys we want to deprecate) and having this hard-coded solution in there could bite us later. But maybe the learning there is next time we refactor the rewriter to be path-aware.

@lucasmrod
lucasmrod merged commit a7c3a14 into 44970-fix-get-fleets Jun 1, 2026
38 checks passed
@lucasmrod
lucasmrod deleted the 44970-fix-apply branch June 1, 2026 14:18
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.

2 participants