Skip to content

Fix feature gates string representation#4757

Open
immanuwell wants to merge 1 commit into
kubernetes-sigs:mainfrom
immanuwell:fix-feature-gates-string
Open

Fix feature gates string representation#4757
immanuwell wants to merge 1 commit into
kubernetes-sigs:mainfrom
immanuwell:fix-feature-gates-string

Conversation

@immanuwell
Copy link
Copy Markdown
Contributor

@immanuwell immanuwell commented May 24, 2026

Issue

No related issue found.

Description

Tiny fix for FeatureGates.String(). It was printing the whole FeatureStatus, so values looked like GlobalAcceleratorController={false true} instead of GlobalAcceleratorController=false. That goes sideways when the string is parsed back as key=bool, and pflag can hit this path for flag/default rendering.

Repro, before this change:

go test ./pkg/config -run TestDefaultFeatureGatesString -count=1

It fails with invalid mapStringBool: GlobalAcceleratorController={false true}.

Now the output is stable, sorted, and parseable. fwiw this is local CLI/config plumbing, no AWS quota or resource ceiling involved.

Checklist

  • Added tests that cover your change (if possible)
  • Added/modified documentation as required (not needed)
  • Manually tested
  • Made sure the title of the PR is a good description that can go into the release notes

Tests:

go test ./pkg/config -run TestDefaultFeatureGatesString -count=1
go test ./pkg/config ./pkg/algorithm ./webhooks/... -count=1
go test $(go list ./... | rg -v '/test/e2e|/conformance')

go test ./... also runs conformance/e2e locally and needs kube config plus cluster-name, so that one fails here for env setup only.

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label May 24, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

Hi @immanuwell. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels May 24, 2026
Copy link
Copy Markdown
Collaborator

@zac-nixon zac-nixon left a comment

Choose a reason for hiding this comment

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

/approved
/lgtm

Thanks for the fix!

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 28, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: immanuwell, zac-nixon

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 28, 2026
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 56.75%. Comparing base (22cdb42) to head (f3162aa).
⚠️ Report is 62 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4757      +/-   ##
==========================================
+ Coverage   56.09%   56.75%   +0.65%     
==========================================
  Files         388      390       +2     
  Lines       30932    31139     +207     
==========================================
+ Hits        17352    17673     +321     
+ Misses      12566    12435     -131     
- Partials     1014     1031      +17     

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants