Skip to content

Conversation

@hajnalmt
Copy link
Contributor

Adding a log line about the session's total schedulable capacities.

Recently there has been various changes in the session resource handlings, and it would be generally useful to have a log line about the cached resource, including TotalResource, TotalDeserved and TotalGuaranteed.

Enhance capacity plugin queue attribute logs to include 'capability' for both flat and hierarchical queues and distinguishing the log line in the two cases.

What type of PR is this?

Minor improvements on the session logging to help on debugging activites.

What this PR does / why we need it:

We don't have log lines about the totalResources when the session initializiation happens.
This part of the code changed a lot recently with the introduction of totalDeserved in the picture:
#4354

Furthermore, currently the log message is the same for the capacity plugin when hierarchy is enabled and when it isn't,
I just see a log message in both cases that the.
"The attributes of queue..."
I am regularly testing with and without hierachy now, and I am checking various behaviors since I enable the
hierarchy configuration for the plugin runtime it would be helpful if the two log messages would be different.

Additionally the capability of the queues is not written at the output at all.

Which issue(s) this PR fixes:

I didn't create one.

Does this PR introduce a user-facing change?

NONE

@volcano-sh-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please assign lowang-bh
You can assign the PR to them by writing /assign @lowang-bh in a comment when ready.

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

@gemini-code-assist
Copy link

Summary of Changes

Hello @hajnalmt, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the logging mechanisms within the scheduler to provide more detailed insights into session resource management and capacity plugin queue attributes. The changes introduce a new log entry for session-wide resource capacities upon session opening and enrich existing queue attribute logs with "capability" information, while also distinguishing between flat and hierarchical queue logs. These improvements are designed to facilitate debugging and provide better visibility into resource allocation behaviors, particularly in light of recent scheduler updates.

Highlights

  • Session Resource Logging: Introduced a new log line at verbosity level 4 when a session is opened, displaying the session's "TotalResource", "TotalDeserved", and "TotalGuaranteed" values.
  • Capacity Plugin Queue Logging: Enhanced the log messages for queue attributes in the capacity plugin to include the "capability" field.
  • Differentiated Queue Logging: Modified the log message for hierarchical queues in the capacity plugin to explicitly state "hierarchical queue" for clearer distinction from flat queues.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@volcano-sh-bot volcano-sh-bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Sep 26, 2025
Copy link

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

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 improves logging for sessions and the capacity plugin, which is helpful for debugging. The changes in the capacity plugin correctly add the 'capability' field to logs and differentiate between hierarchical and flat queue logging. However, there's an issue with the new session log line in session.go where it's placed too early in the initialization sequence, causing it to log zero values for TotalDeserved and TotalGuaranteed.

@hajnalmt
Copy link
Contributor Author

Gemini is wrong! This is not true. We don't null them out at the end of the session currently.
https://github.com/volcano-sh/volcano/blob/master/pkg/scheduler/framework/session.go#L373
So the value in the cache will be outputted here. TotalResource is nulled out only but it will be calculated again before this line.

@hajnalmt
Copy link
Contributor Author

/assign @lowang-bh

Please review this would be helpful!

Adding a log line about the session's total schedulable capacities.

Recently there has been various changes in the session resource
handlings, and it would be generally useful to have a log line
about the cached resource, including TotalResource, TotalDeserved
and TotalGuaranteed.

Enhance capacity plugin queue attribute logs to include 'capability'
for both flat and hierarchical queues and distinguishing the log
line in the two cases.

Signed-off-by: Hajnal Máté <[email protected]>
@hajnalmt hajnalmt force-pushed the improve-session-logging branch from 62dd0d4 to 50c32ce Compare October 17, 2025 07:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants