Skip to content

feat: Allow request control plugins to return ext_proc dynamic metadata#2156

Merged
k8s-ci-robot merged 1 commit intokubernetes-sigs:mainfrom
fcfort:push-ztoqlzylpvrw
Jan 21, 2026
Merged

feat: Allow request control plugins to return ext_proc dynamic metadata#2156
k8s-ci-robot merged 1 commit intokubernetes-sigs:mainfrom
fcfort:push-ztoqlzylpvrw

Conversation

@fcfort
Copy link
Copy Markdown
Contributor

@fcfort fcfort commented Jan 15, 2026

What type of PR is this?

/kind feature

What this PR does / why we need it:

Here we create a mechanism to pass in the usage struct to the ResponseBodyComplete callback and also a mechanism for returning dynamic_metadata out of the callback and into the ext_proc's ProcessingResponse object. This will be used by the new plugin introduced in #2114.

See #2019 for more details.

Which issue(s) this PR fixes:

This contributes to #2019, but does not fix it.

Does this PR introduce a user-facing change?:

No user-facing change.

@k8s-ci-robot k8s-ci-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Jan 15, 2026
@netlify
Copy link
Copy Markdown

netlify Bot commented Jan 15, 2026

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

Name Link
🔨 Latest commit 484ffc0
🔍 Latest deploy log https://app.netlify.com/projects/gateway-api-inference-extension/deploys/6970ef88e40f10000800f6c0
😎 Deploy Preview https://deploy-preview-2156--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 added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jan 15, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

Hi @fcfort. 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 the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jan 15, 2026
@linux-foundation-easycla
Copy link
Copy Markdown

linux-foundation-easycla Bot commented Jan 15, 2026

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: fcfort / name: Frank (484ffc0)

@k8s-ci-robot k8s-ci-robot added 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. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Jan 15, 2026
@fcfort fcfort force-pushed the push-ztoqlzylpvrw branch from 5f93208 to efea3a8 Compare January 15, 2026 21:16
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 15, 2026
Copy link
Copy Markdown
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.

/ok-to-test

Comment thread go.mod Outdated
github.com/cespare/xxhash/v2 v2.3.0
github.com/elastic/crd-ref-docs v0.2.0
github.com/envoyproxy/go-control-plane/envoy v1.36.0
github.com/envoyproxy/go-control-plane/envoy v1.35.0
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.

it seems lots of pkgs are being downgraded, why?

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.

I don't actually know how these files get changed. Should I revert the changes to go.mod / go.sum?

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.

It should be automatic, can you revert the changes and then run go build again?

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.

Done.

@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 15, 2026
@fcfort fcfort force-pushed the push-ztoqlzylpvrw branch from efea3a8 to af17094 Compare January 16, 2026 15:45
// Currently, this is only used by conformance test.
ReqMetadata map[string]any
// Token usage counts parsed from the response body.
Usage handlerstypes.Usage
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.

This creates a dependency on the handlers pkg for the plugins, it doesn't seem ideal.

@kfswain @nirrozenbaum I feel the interfaces and types for the framework should be grouped in one place under epp/framework (renaming epp/plugins) with a separate pkg for each subsystem under it. With this, a plugin should only have a dependency on this epp/framework pkg. wdyt?

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.

generally I agree.
I have tried that a while ago and got to a circular dependency, cause scheduler needs to reference plugins, and profile handler plugin references scheduler profiles (its return value).
we can reorganize the scheduler package to get it fixed

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I love that idea. If we can make it work in practice that would be great.

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.

yes, we can.
that would still include some awkward references but it would work.

e.g.,
epp/framework would reference epp/scheduler/profile
and
epp/scheduler would reference epp/framework.

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.

that’s not ideal but doable.
LMKWYT.

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.

One way to avoid the circular dependency is to move pkg/epp/requestcontrol/types.go to pkg/epp/requestcontrol/types/types.go so that it is in a separate package. This does end up touching another dozen or so files. Is that what you'd like?

Copy link
Copy Markdown
Contributor

@ahg-g ahg-g Jan 21, 2026

Choose a reason for hiding this comment

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

It will also impact out of tree plugins if we move the existing types. I plan to re-organize all of that as discussed above, and so I don't want to force people to change twice.

Can we define two types and copy? once we do the refactor, we will converge on one.

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.

Created #2190 to track the work, I will take a first stab at doing that for the scheduler and requestcontrol pkgs.

@fcfort we can merge your PR as is and we will move the types as part of the above suggested refactor.

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.

Sounds good!

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.

First PR focused on the scheduling layer: #2192

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 16, 2026
@fcfort fcfort force-pushed the push-ztoqlzylpvrw branch from af17094 to 484ffc0 Compare January 21, 2026 15:23
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 21, 2026
@ahg-g
Copy link
Copy Markdown
Contributor

ahg-g commented Jan 21, 2026

/lgtm
/approve

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ahg-g, fcfort

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 Jan 21, 2026
@k8s-ci-robot k8s-ci-robot merged commit 1fecaf9 into kubernetes-sigs:main Jan 21, 2026
9 checks passed
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/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. 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.

5 participants