Skip to content

simplify bbr plugins and update tests accordingly#2783

Merged
k8s-ci-robot merged 2 commits into
kubernetes-sigs:mainfrom
nirrozenbaum:bbr-updates
Apr 6, 2026
Merged

simplify bbr plugins and update tests accordingly#2783
k8s-ci-robot merged 2 commits into
kubernetes-sigs:mainfrom
nirrozenbaum:bbr-updates

Conversation

@nirrozenbaum
Copy link
Copy Markdown
Contributor

What type of PR is this?
/kind cleanup

What this PR does / why we need it:
cleanup and simplify bbr plugins.

Which issue(s) this PR fixes:

Fixes #

Does this PR introduce a user-facing change?:

None

Signed-off-by: Nir Rozenbaum <nrozenba@redhat.com>
@k8s-ci-robot k8s-ci-robot added the kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. label Apr 5, 2026
@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 5, 2026

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

Name Link
🔨 Latest commit c92b5c9
🔍 Latest deploy log https://app.netlify.com/projects/gateway-api-inference-extension/deploys/69d351310031760008248aa5
😎 Deploy Preview https://deploy-preview-2783--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.

@k8s-ci-robot k8s-ci-robot requested a review from danehans April 5, 2026 20:10
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: nirrozenbaum

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 requested a review from shmuelk April 5, 2026 20:10
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Apr 5, 2026
Comment thread cmd/bbr/runner/runner.go Outdated
Comment thread pkg/bbr/handlers/request_test.go Outdated
func NewBodyFieldToHeaderPlugin(fieldName, headerName string) (*BodyFieldToHeaderPlugin, error) {
if fieldName == "" {
return nil, errors.New("body fieldName is required in BodyFieldToHeader plugin")
return nil, fmt.Errorf("fieldName is required for plugin '%s'", BodyFieldToHeaderPluginType)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

may want to define default field and header names instead of erroring. The header should be part of the "protocol" of setting up HTTP routes and the field name is expected based on the API (OpenAI?) so both could have sensible defaults here. Can still error when processing if these are not found in the actual request.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

mmm yes and no.
you are correct that this is very much connected to the http routes (we need to use the header to route).
at the same time, there is no "well defined" BBR protocol anywhere.

This plugin was implemented in a generic way allowing to promote any given body field to any given header.
it feels wrong to put a default value in a general purpose plugin, as it could be error prone.
e.g., what if user defines two plugin instances and defines only fieldName?
both plugins will use the same default header name and will override each other (last wins).
I preferred being explicit here.

Signed-off-by: Nir Rozenbaum <nrozenba@redhat.com>
@nirrozenbaum nirrozenbaum requested a review from elevran April 6, 2026 06:45
@elevran
Copy link
Copy Markdown
Contributor

elevran commented Apr 6, 2026

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 6, 2026
@k8s-ci-robot k8s-ci-robot merged commit 337abbf into kubernetes-sigs:main Apr 6, 2026
11 checks passed
nirrozenbaum added a commit to llm-d/llm-d-inference-payload-processor that referenced this pull request Apr 28, 2026
…teway-api-inference-extension#2783)

* simplify bbr plugins and update tests accordingly

Signed-off-by: Nir Rozenbaum <nrozenba@redhat.com>

* code review comments

Signed-off-by: Nir Rozenbaum <nrozenba@redhat.com>

---------

Signed-off-by: Nir Rozenbaum <nrozenba@redhat.com>
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. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. 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.

3 participants