Skip to content

fix(nodeorder): log correct plugin weight in NodeOrderFn#5510

Open
A69SHUBHAM wants to merge 1 commit into
volcano-sh:masterfrom
A69SHUBHAM:fix-nodeorder-log-weight
Open

fix(nodeorder): log correct plugin weight in NodeOrderFn#5510
A69SHUBHAM wants to merge 1 commit into
volcano-sh:masterfrom
A69SHUBHAM:fix-nodeorder-log-weight

Conversation

@A69SHUBHAM

Copy link
Copy Markdown

What this PR does

The debug log inside NodeOrderFn() reports imageLocalityWeight for every score plugin, even though the scheduler computes the score using each plugin's own configured weight (p.weight).

This PR updates the debug log to report the actual plugin weight used during score calculation, making V(5) scheduler logs consistent with the scheduler's behavior.

Why is this change needed?

When multiple score plugins are configured with different weights, the current debug output can be misleading during troubleshooting because it always reports the ImageLocality weight regardless of which plugin generated the score.

Does this PR introduce any user-facing changes?

No.

This change only corrects debug logging and does not affect scheduler behavior or score calculation.

Fixes #5509

Copilot AI review requested due to automatic review settings June 25, 2026 18:42
@volcano-sh-bot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign thor-wl for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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

@volcano-sh-bot volcano-sh-bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Jun 25, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request corrects a logging statement in the NodeOrderPlugin by replacing the incorrect reference pp.weight.imageLocalityWeight with p.weight to match the actual weight variable used in the score calculation. There are no review comments, so I have no feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Copilot AI left a comment

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.

Pull request overview

This PR fixes misleading V(5) debug logging in the nodeorder scheduler plugin so that the logged weight matches the actual per-score-plugin weight (p.weight) used in the score calculation.

Changes:

  • Update NodeOrderFn() debug log to print the current score plugin’s configured weight (p.weight) instead of always printing imageLocalityWeight.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@@ -323,7 +323,7 @@ func (pp *NodeOrderPlugin) NodeOrderFn(task *api.TaskInfo, node *api.NodeInfo, k

// If imageLocalityWeight is provided, host.Score is multiplied with weight, if not, host.Score is added to total score.
Signed-off-by: A69SHUBHAM <spacekrai0@gmail.com>
@A69SHUBHAM A69SHUBHAM force-pushed the fix-nodeorder-log-weight branch from 5bd6b5b to a5b4b36 Compare June 25, 2026 18:54
@A69SHUBHAM

Copy link
Copy Markdown
Author

/cc @hajnalmt

Would appreciate a review when you have time. Thanks!

@volcano-sh-bot volcano-sh-bot requested a review from hajnalmt June 27, 2026 06:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

nodeorder: NodeOrderFn debug log reports incorrect plugin weight

3 participants