Skip to content

Cherry pick to 4.82: add more deprecation logs and mute by default#40394

Merged
sgress454 merged 1 commit intorc-minor-fleet-v4.82.0from
sgress454/cherry-pick-mute-deprecations-warnings-to-4.82
Feb 24, 2026
Merged

Cherry pick to 4.82: add more deprecation logs and mute by default#40394
sgress454 merged 1 commit intorc-minor-fleet-v4.82.0from
sgress454/cherry-pick-mute-deprecations-warnings-to-4.82

Conversation

@sgress454
Copy link
Copy Markdown
Contributor

Cherry pick of #40305 to 4.82.0.

(cherry picked from commit 772fb12)

<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
**Related issue:** Resolves #40122

# Details

* Adds deprecation warnings to `fleetctl apply`
* Adds alias conflict errors (i.e. using both new and deprecated keys in
the same spec) to `fleetctl apply`
* Adds logic around all deprecated field warnings to check the topic
first
* Disables deprecation warnings by default for `fleet serve`, `fleetctl
gitops` and `fleetctl apply`
* Enables deprecation warnings for dogfood via env var

To turn on warnings:
* In `fleet serve`, use either
`--logging_enable_topics=deprecated-field-names` or the
`FLEET_LOGGING_ENABLE_TOPICS=deprecated-field-names` env var
* In `fleetctl gitops` / `fleetctl apply` use either
`--enable-log-topics=deprecated-field-names` or
`FLEET_ENABLE_LOG_TOPICS=deprecated-field-names`

# Checklist for submitter

If some of the following don't apply, delete the relevant line.

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

## Testing

- [X] Added/updated automated tests
- [X] QA'd all new/changed functionality manually

tested in `fleetctl apply`, `fleet serve` and `fleet gitops` that
warnings are suppressed by default and added when the appropriate env
var or CLI option is used

(cherry picked from commit 772fb12)
@sgress454 sgress454 changed the title Add more deprecation logs and mute by default (#40305) Cherry pick to 4.82: add more deprecation logs and mute by default Feb 24, 2026
@sgress454
Copy link
Copy Markdown
Contributor Author

sgress454 commented Feb 24, 2026

@rfairburn +1 for the cherry-pick to 4.82 when you have a moment 🙏 <- nvm, not blocked since it's not the main branch

@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 24, 2026

Codecov Report

❌ Patch coverage is 79.76190% with 17 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (rc-minor-fleet-v4.82.0@bd5c4c5). Learn more about missing BASE report.

Files with missing lines Patch % Lines
pkg/spec/spec.go 78.04% 5 Missing and 4 partials ⚠️
server/service/appconfig.go 40.00% 5 Missing and 1 partial ⚠️
cmd/fleet/serve.go 0.00% 1 Missing ⚠️
server/platform/endpointer/json_key_rewriter.go 87.50% 1 Missing ⚠️
Additional details and impacted files
@@                    Coverage Diff                    @@
##             rc-minor-fleet-v4.82.0   #40394   +/-   ##
=========================================================
  Coverage                          ?   66.37%           
=========================================================
  Files                             ?     2456           
  Lines                             ?   196759           
  Branches                          ?     8577           
=========================================================
  Hits                              ?   130597           
  Misses                            ?    54347           
  Partials                          ?    11815           
Flag Coverage Δ
backend 68.14% <79.76%> (?)

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 sgress454 merged commit 84852f0 into rc-minor-fleet-v4.82.0 Feb 24, 2026
50 checks passed
@sgress454 sgress454 deleted the sgress454/cherry-pick-mute-deprecations-warnings-to-4.82 branch February 24, 2026 15:56
@georgekarrv georgekarrv mentioned this pull request Mar 3, 2026
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