Skip to content

Conversation

@nirrozenbaum
Copy link
Contributor

@nirrozenbaum nirrozenbaum commented Nov 3, 2025

What type of PR is this?
/kind cleanup

What this PR does / why we need it:
This PR is fixing few logging issues in the scheduling package.

  1. scheduler is logging twice the same set of key value pairs.
    for example (request-id and targetModelName are logged twice):
{"level":"Level(-4)","ts":"2025-11-03T13:26:36Z","caller":"scheduling/scheduler.go:60","msg":"Running profile handler, Pick profiles","x-request-id":"35ca6232-5ed4-4f6a-9460-f08839e5c750","objectiveKey":"","incomingModelName":"meta-llama/Llama-3.1-8B-Instruct","targetModelName":"meta-llama/Llama-3.1-8B-Instruct","priority":0,"requestId":"35ca6232-5ed4-4f6a-9460-f08839e5c750","targetModel":"meta-llama/Llama-3.1-8B-Instruct","plugin":"single-profile-handler/single-profile-handler"}
{"level":"Level(-4)","ts":"2025-11-03T13:26:36Z","caller":"scheduling/scheduler.go:64","msg":"Completed running profile handler Pick profiles successfully","x-request-id":"35ca6232-5ed4-4f6a-9460-f08839e5c750","objectiveKey":"","incomingModelName":"meta-llama/Llama-3.1-8B-Instruct","targetModelName":"meta-llama/Llama-3.1-8B-Instruct","priority":0,"requestId":"35ca6232-5ed4-4f6a-9460-f08839e5c750","targetModel":"meta-llama/Llama-3.1-8B-Instruct","plugin":"single-profile-handler/single-profile-handler","result":{"default":{}}}

This is happening because the scheduler uses WithValues for values that were already added to the logger.

  1. picker is trying to log a map and that appears as an unsupported type error in the log:
{"level":"Level(-4)","ts":"2025-11-03T11:54:46Z","caller":"framework/scheduler_profile.go:184","msg":"Running picker plugin","x-request-id":"95dbab2a-662a-4bfb-9596-0bcd314d49ae","objectiveKey":"","incomingModelName":"meta-llama/Llama-3.1-8B-Instruct","targetModelName":"meta-llama/Llama-3.1-8B-Instruct","priority":0,"plugin":"max-score-picker/max-score-picker","pods-weighted-scoreError":"json: unsupported type: map[types.Pod]float64"}

switched to using slice instead which should work as expected.

  1. made minor tweaks to the log levels. log lines that print potentially enormous amount of data are using log level 4 (e.g., candidate pods, selected pods, scores per pod). log lines that are printed once per request handling process are using log level 3.

Which issue(s) this PR fixes:

Fixes #

Does this PR introduce a user-facing change?:

None

@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 Nov 3, 2025
@netlify
Copy link

netlify bot commented Nov 3, 2025

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

Name Link
🔨 Latest commit 68f5c5d
🔍 Latest deploy log https://app.netlify.com/projects/gateway-api-inference-extension/deploys/690906a63b78a90008921bfc
😎 Deploy Preview https://deploy-preview-1806--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 Nov 3, 2025
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Nov 3, 2025
@kfswain
Copy link
Collaborator

kfswain commented Nov 4, 2025

/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 Nov 4, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kfswain, 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:
  • OWNERS [kfswain,nirrozenbaum]

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 merged commit 4ea731f into kubernetes-sigs:main Nov 4, 2025
12 of 13 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/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/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.

3 participants