Skip to content

Conversation

pabhi18
Copy link
Contributor

@pabhi18 pabhi18 commented Jul 2, 2025

This PR adds unit tests for picker plugins in the scheduler framework.

  • Validates behavior of picker plugins under:
    • Single highest-scoring pod
    • Multiple pods with equal scores
    • Empty input list

Fixes #1097

Copy link

netlify bot commented Jul 2, 2025

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

Name Link
🔨 Latest commit cab9bea
🔍 Latest deploy log https://app.netlify.com/projects/gateway-api-inference-extension/deploys/6866182053c035000868f4fd
😎 Deploy Preview https://deploy-preview-1103--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 cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jul 2, 2025
@k8s-ci-robot k8s-ci-robot requested review from danehans and kfswain July 2, 2025 08:58
@k8s-ci-robot
Copy link
Contributor

Welcome @pabhi18!

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

Hi @pabhi18. 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.

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 Jul 2, 2025
@nirrozenbaum
Copy link
Contributor

/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 Jul 2, 2025
@pabhi18
Copy link
Contributor Author

pabhi18 commented Jul 2, 2025

/retest

limitations under the License.
*/

package picker_test
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: use package picker.

@nirrozenbaum
Copy link
Contributor

@pabhi18 this is great, thank you!

I have one minor comment on the structuring - can you update the structure to align with other packages?
(use tests array, each entry with name, input, output, picker, etc.)
see example here:

func TestFilter(t *testing.T) {
tests := []struct {
name string
req *types.LLMRequest
filter framework.Filter
input []types.Pod
output []types.Pod
}{
.

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jul 3, 2025
@pabhi18
Copy link
Contributor Author

pabhi18 commented Jul 3, 2025

Hi @nirrozenbaum, I’ve updated the tests to follow the format you mentioned and also renamed the package to picker

@nirrozenbaum
Copy link
Contributor

This is great!

/lgtm
/approve

Congrats @pabhi18 on your first inference gateway PR!

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 3, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: nirrozenbaum, pabhi18

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 Jul 3, 2025
@k8s-ci-robot k8s-ci-robot merged commit 8b3dbe9 into kubernetes-sigs:main Jul 3, 2025
9 checks passed
@pabhi18
Copy link
Contributor Author

pabhi18 commented Jul 3, 2025

Thank you! @nirrozenbaum

EyalPazz pushed a commit to EyalPazz/gateway-api-inference-extension that referenced this pull request Jul 9, 2025
* Add unit tests for picker plugin

* Fix import formatting in test

* Refactor picker tests to follow table-driven format
BenjaminBraunDev pushed a commit to BenjaminBraunDev/gateway-api-inference-extension that referenced this pull request Aug 12, 2025
* Add unit tests for picker plugin

* Fix import formatting in test

* Refactor picker tests to follow table-driven format
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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

unit test for picker package

3 participants