Skip to content

fix(env): Remove deprecated auto-gomaxprocs flag#5251

Open
SoloJacobs wants to merge 1 commit into
prometheus:mainfrom
SoloJacobs:deprecate
Open

fix(env): Remove deprecated auto-gomaxprocs flag#5251
SoloJacobs wants to merge 1 commit into
prometheus:mainfrom
SoloJacobs:deprecate

Conversation

@SoloJacobs
Copy link
Copy Markdown
Contributor

@SoloJacobs SoloJacobs commented May 23, 2026

The auto-gomaxprocs flag was deprecated in v0.32. It has had no effect
since v0.29, when we moved to Go 1.25, which natively handles container
CPU quotas without the need for the automaxprocs library.

See https://go.dev/blog/container-aware-gomaxprocs

Signed-off-by: Solomon Jacobs solomonjacobs@protonmail.com

Pull Request Checklist

Which user-facing changes does this PR introduce?

[CHANGE] The '--enable-feature=auto-gomaxprocs' option has been removed. This flag had no effect since v0.29 and was deprecated in v0.32. It can be safely removed from any startup scripts. #5090 

Summary by CodeRabbit

  • Chores
    • Removed the deprecated auto-gomaxprocs feature flag and associated startup deprecation warnings.

Review Change Stack

The `auto-gomaxprocs` flag was deprecated in v0.32. It has had no effect
since v0.29, when we moved to Go 1.25, which natively handles container
CPU quotas without the need for the automaxprocs library.

See https://go.dev/blog/container-aware-gomaxprocs

Signed-off-by: Solomon Jacobs <solomonjacobs@protonmail.com>
@SoloJacobs SoloJacobs requested a review from a team as a code owner May 23, 2026 15:19
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 23, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 450c950d-7f42-4a66-a9da-0baf8a9808a4

📥 Commits

Reviewing files that changed from the base of the PR and between 79ecbb4 and 6687f31.

📒 Files selected for processing (2)
  • cmd/alertmanager/main.go
  • featurecontrol/featurecontrol.go
💤 Files with no reviewable changes (2)
  • featurecontrol/featurecontrol.go
  • cmd/alertmanager/main.go

📝 Walkthrough

Walkthrough

This PR removes the deprecated auto-gomaxprocs feature flag from alertmanager. The constant definition, interface method, implementation details, and parsing logic are deleted from the featurecontrol package, and the deprecation warning that checked this flag at startup is removed from main.go.

Changes

Remove auto-gomaxprocs feature flag

Layer / File(s) Summary
Feature flag removal from featurecontrol package
featurecontrol/featurecontrol.go
FeatureAutoGOMAXPROCS constant is removed, AllowedFlags list is updated, EnableAutoGOMAXPROCS() method is removed from the Flagger interface, the internal field and method are removed from Flags struct, the enableAutoGOMAXPROCS() option helper is deleted, the NewFlags switch case no longer recognizes the feature flag, and the NoopFlags stub implementation is removed.
Startup path cleanup
cmd/alertmanager/main.go
The deprecation warning block that checked EnableAutoGOMAXPROCS() at startup is removed, so execution flows directly from auto-GOMEMLIMIT setup to data directory creation.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: removing a deprecated feature flag. It is specific, concise, and directly related to the changeset.
Description check ✅ Passed The PR description provides context, explains the deprecation, includes a release-notes entry marked as a breaking change, and confirms the commits are signed-off.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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 and usage tips.

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.

1 participant