-
Notifications
You must be signed in to change notification settings - Fork 219
fix: [Flow Control]: Cleanup: Remove PriorityName from PriorityBandConfig #2042
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
fix: [Flow Control]: Cleanup: Remove PriorityName from PriorityBandConfig #2042
Conversation
Remove the PriorityName field from PriorityBandConfig struct and all its usages throughout the codebase. This is a cleanup task as the field was redundant - priority bands are uniquely identified by their numerical Priority level. Changes: - Remove PriorityName field from PriorityBandConfig struct - Remove PriorityName from PriorityBandStats struct in contracts - Remove PriorityName() method from PriorityBandAccessor interface - Remove PriorityName() implementation from priorityBandAccessor - Remove PriorityNameV from MockPriorityBandAccessor - Remove duplicate name validation from Config.validate() - Update NewPriorityBandConfig to no longer require name parameter - Update Stats() methods to not set PriorityName - Replace priorityName log fields with priority in processor logs - Update all test files to reflect the API changes Fixes: kubernetes-sigs#2013 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: majiayu000 <1835304752@qq.com>
|
Keywords which can automatically close issues and at(@) or hashtag(#) mentions are not allowed in commit messages. The list of commits with invalid commit messages:
DetailsInstructions 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. I understand the commands that are listed here. |
✅ Deploy Preview for gateway-api-inference-extension ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
|
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: majiayu000 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Welcome @majiayu000! |
|
Hi @majiayu000. Thanks for your PR. I'm waiting for a github.com member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions 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. |
|
/ok-to-test |
ahg-g
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, a couple of nits
| } | ||
|
|
||
| band, err := sp.shard.PriorityBandAccessor(key.Priority) | ||
| _, err = sp.shard.PriorityBandAccessor(key.Priority) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Getting the band here is not needed anymore, so lets remove this and the error checking below.
| return fmt.Errorf("priority band %d (%s) configuration error: %w", | ||
| p.Priority, p.PriorityName, err) | ||
| return fmt.Errorf("priority band %d configuration error: %w", | ||
| p.Priority, err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit, move this line up
Summary
This PR fixes #2013
Changes
pkg/epp/flowcontrol/config_test.gopkg/epp/flowcontrol/contracts/registry.gopkg/epp/flowcontrol/controller/internal/processor.gopkg/epp/flowcontrol/framework/mocks/mocks.gopkg/epp/flowcontrol/framework/policies.gopkg/epp/flowcontrol/registry/config.gopkg/epp/flowcontrol/registry/config_test.gopkg/epp/flowcontrol/registry/registry.gopkg/epp/flowcontrol/registry/registry_test.gopkg/epp/flowcontrol/registry/shard.gopkg/epp/flowcontrol/registry/shard_test.go