Skip to content

Add support for skipping handler registration and QoS manager initialization based on configuration in Volcano Agent - #4409

Merged
volcano-sh-bot merged 1 commit into
volcano-sh:masterfrom
ShuhanYan:users/shuhan/0626featuregate
Jul 16, 2025
Merged

volcano-sh-bot merged 1 commit into
volcano-sh:masterfrom
ShuhanYan:users/shuhan/0626featuregate

Conversation

@ShuhanYan

Copy link
Copy Markdown
Contributor

What type of PR is this?

/kind feature

What this PR does / why we need it:

This PR adds support for skipping handler registration and QoS manager initialization based on configuration in Volcano Agent, which is needed when the user only need a set of feature, and cannot enable some feature as they cannot run it on specified OS.

  1. If a feature is not listed in supported-features, skip the registration of its corresponding handler.
  2. If networkQoS is not in supported-features, skip the initialization of the QoS manager.
  3. If the QoS manager is not initialized, skip its health check.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

test:
when the supported-features=OverSubscription,Eviction
image
the initialization of network QoS manager will be skipped
image
meanwhile the health check can pass
image
and unrelated handler will be skip
image

Does this PR introduce a user-facing change?

NONE

Copilot AI review requested due to automatic review settings June 26, 2025 23:06
@volcano-sh-bot

Copy link
Copy Markdown
Contributor

Welcome @ShuhanYan!

It looks like this is your first PR to volcano-sh/volcano.

Thank you, and welcome to Volcano. 😃

@volcano-sh-bot volcano-sh-bot added the kind/feature Categorizes issue or PR as related to a new feature. label Jun 26, 2025
@volcano-sh-bot volcano-sh-bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jun 26, 2025

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 adds conditional support for skipping the registration of handlers and the initialization of the QoS manager based on configuration flags in the Volcano Agent. Key changes include:

  • Adding a nil-check around network QoS health check.
  • Conditionally registering event handlers based on supported features.
  • Introducing conditional initialization of the NetworkQoSManager in the agent run logic.
  • Adding a new Makefile target for building the vc-agent image.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
pkg/agent/healthcheck/healthcheck.go Adds a guard to skip QoS health checks if the network QoS manager is not initialized.
pkg/agent/events/eventsmgr.go Adds a feature check to conditionally register or log the skipping of event handlers.
cmd/agent/app/agent.go Updates the NetworkQoSManager initialization based on feature support.
Makefile Introduces a new target for building the vc-agent image.

Comment thread pkg/agent/events/eventsmgr.go Resolved
@JesseStutler

Copy link
Copy Markdown
Member

/ok-to-test
Please use git commit -s to sign your commit

@volcano-sh-bot volcano-sh-bot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Jun 28, 2025
@ShuhanYan
ShuhanYan force-pushed the users/shuhan/0626featuregate branch from 537512a to 4f028c8 Compare July 2, 2025 20:15
@ShuhanYan

Copy link
Copy Markdown
Contributor Author

@JesseStutler Thanks for reminder! signed

@JesseStutler

Copy link
Copy Markdown
Member

Great! Thanks for your contribution. It's very useful.
LGTM. But please squash your commits into one, thanks :)

Signed-off-by: shuhanyan <shuhan.yan@outlook.com>

Update pkg/agent/events/eventsmgr.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: shuhanyan <shuhan.yan@outlook.com>
@ShuhanYan
ShuhanYan force-pushed the users/shuhan/0626featuregate branch from 4f028c8 to 3971475 Compare July 11, 2025 21:50
@ShuhanYan

Copy link
Copy Markdown
Contributor Author

sure, updated

@JesseStutler

Copy link
Copy Markdown
Member

/lgtm

@volcano-sh-bot volcano-sh-bot added the lgtm Indicates that a PR is ready to be merged. label Jul 14, 2025
@Monokaix

Copy link
Copy Markdown
Member

/approve

@volcano-sh-bot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Monokaix

The full list of commands accepted by this bot can be found here.

The pull request process is described 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 approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 16, 2025
@volcano-sh-bot
volcano-sh-bot merged commit d074c9d into volcano-sh:master Jul 16, 2025
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. kind/feature Categorizes issue or PR as related to a new feature. lgtm 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.

5 participants