Skip to content

Conversation

nirrozenbaum
Copy link
Contributor

This PR deprecates PostCycle extension point from scheduling framework.
instead of calling PostCycle in prefix plugin, this was changed to PreRequest.

Additionally, the use of CycleState was replaced with PluginState, since PreRequest is not part of the scheduling cycle and therefore the state cannot be shared between the extension point with that mechanism.

tests were updated accordingly.

please pay attention that I do plan on having all the extension points defined in the same plugins package, which is currently not the case (I don't like the fact that prefix plugin imports requestcontrol).
due to the fact that a release is close, this change will be pushed at the beginning of the next release cycle (after first RC of current release) to avoid big changes in plugins before the release.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Aug 17, 2025
@k8s-ci-robot
Copy link
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

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 Aug 17, 2025
Copy link

netlify bot commented Aug 17, 2025

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

Name Link
🔨 Latest commit c6baa12
🔍 Latest deploy log https://app.netlify.com/projects/gateway-api-inference-extension/deploys/68a463def0499e00083305be
😎 Deploy Preview https://deploy-preview-1392--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 size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Aug 17, 2025
@nirrozenbaum
Copy link
Contributor Author

cc @liu-cong

Signed-off-by: Nir Rozenbaum <[email protected]>
Signed-off-by: Nir Rozenbaum <[email protected]>
primaryProfileResult := schedulingResult.ProfileResults[schedulingResult.PrimaryProfileName]
targetPod := primaryProfileResult.TargetPods[0].GetPod() // get the first pod of the primary profile

state, err := plugins.ReadPluginStateKey[*SchedulingContextState](p.pluginState, request.RequestId, PrefixCachePluginType)
Copy link
Contributor

Choose a reason for hiding this comment

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

We should also clean up the per-request state after reading, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, fixed it. good catch!

my original intention was to do explicitly delete on successful request handling and let the cleanup go routine clean entries only of requests that failed in the middle.

I think it would be useful to add a generic ReadAndDeletePluginStateKey function to avoid this confusion, but will leave that for a follow up to keep this PR tightly scoped on the PostCycle deprecation.

Signed-off-by: Nir Rozenbaum <[email protected]>
@liu-cong
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 19, 2025
@k8s-ci-robot k8s-ci-robot merged commit f36111c into kubernetes-sigs:main Aug 19, 2025
10 checks passed
@nirrozenbaum nirrozenbaum deleted the deprecate-post-cycle branch August 20, 2025 07:41
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. 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