Skip to content

Conversation

@majiayu000
Copy link

Summary

This PR fixes #2013

Changes

  • pkg/epp/flowcontrol/config_test.go
  • pkg/epp/flowcontrol/contracts/registry.go
  • pkg/epp/flowcontrol/controller/internal/processor.go
  • pkg/epp/flowcontrol/framework/mocks/mocks.go
  • pkg/epp/flowcontrol/framework/policies.go
  • pkg/epp/flowcontrol/registry/config.go
  • pkg/epp/flowcontrol/registry/config_test.go
  • pkg/epp/flowcontrol/registry/registry.go
  • pkg/epp/flowcontrol/registry/registry_test.go
  • pkg/epp/flowcontrol/registry/shard.go
  • pkg/epp/flowcontrol/registry/shard_test.go

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>
@k8s-ci-robot k8s-ci-robot added the do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. label Dec 27, 2025
@k8s-ci-robot
Copy link
Contributor

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:

  • 2fec162 flowcontrol: remove PriorityName from PriorityBandConfig
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. I understand the commands that are listed here.

@netlify
Copy link

netlify bot commented Dec 27, 2025

Deploy Preview for gateway-api-inference-extension ready!

Name Link
🔨 Latest commit 2fec162
🔍 Latest deploy log https://app.netlify.com/projects/gateway-api-inference-extension/deploys/694f9d2efb547a0008999197
😎 Deploy Preview https://deploy-preview-2042--gateway-api-inference-extension.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Dec 27, 2025

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: majiayu000 / name: lif (2fec162)

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: majiayu000
Once this PR has been reviewed and has the lgtm label, please assign ahg-g for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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
Copy link
Contributor

Welcome @majiayu000!

It looks like this is your first PR to kubernetes-sigs/gateway-api-inference-extension 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/gateway-api-inference-extension has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@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 Dec 27, 2025
@k8s-ci-robot
Copy link
Contributor

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 /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/L Denotes a PR that changes 100-499 lines, ignoring generated files. cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Dec 27, 2025
@ahg-g
Copy link
Contributor

ahg-g commented Jan 5, 2026

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jan 5, 2026
Copy link
Contributor

@ahg-g ahg-g left a 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)
Copy link
Contributor

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)
Copy link
Contributor

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

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

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Flow Control]: Cleanup: Remove PriorityName from PriorityBandConfig

3 participants