Skip to content

feat(scheduler): inherit podGroup annotations#233

Merged
Syspretor merged 4 commits intosgl-project:mainfrom
JasonHe-WQ:feat/podgroup-annotation
Mar 26, 2026
Merged

feat(scheduler): inherit podGroup annotations#233
Syspretor merged 4 commits intosgl-project:mainfrom
JasonHe-WQ:feat/podgroup-annotation

Conversation

@JasonHe-WQ
Copy link
Copy Markdown
Contributor

@JasonHe-WQ JasonHe-WQ commented Mar 23, 2026

Ⅰ. Motivation

align with lws controllers' behaviour

Ⅱ. Modifications

coped annotations with volcano prefix from rbg to pod group

Ⅲ. Does this pull request fix one issue?

impl #232

Ⅳ. List the added test cases (unit test/integration test) if any, please explain if no tests are needed.

Ⅴ. Describe how to verify it

VI. Special notes for reviews

For some annotations, it may be covered by volcano scheduler when scheduled, e.g. volcano.sh/job-allocated-hypernode.

Therefore, we may need to use another map to store these annotations.

Or we can simplify the impl to only support copy from rbg when create and ignore update.

We don't update annos on podgroup when update rbg since some update may break scheduling policy and hard to investigate

Checklist

  • Format your code make fmt.
  • Add unit tests or integration tests.
  • Update the documentation related to the change.

@gemini-code-assist
Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 updates the Volcano PodGroup manager to propagate Volcano-scoped annotations (those prefixed with volcano.sh/) from a RoleBasedGroup onto the corresponding Volcano PodGroup, aligning behavior with other controllers.

Changes:

  • Add logic to collect and set volcano.sh/* annotations from the RBG onto the Volcano PodGroup metadata.
  • Introduce a small helper (inheritVolcanoAnnotations) to filter annotations by prefix.
  • Add a unit test validating that Volcano-prefixed annotations are copied on PodGroup creation.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
pkg/scheduler/volcano/manager.go Copies Volcano-prefixed annotations from RBG into the created Volcano PodGroup and adds a helper for filtering.
pkg/scheduler/podgroup_manager_test.go Adds a test ensuring Volcano-prefixed annotations are copied to PodGroup annotations on create.

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

Comment thread pkg/scheduler/volcano/manager.go Outdated
Comment thread pkg/scheduler/volcano/manager.go
@JasonHe-WQ JasonHe-WQ force-pushed the feat/podgroup-annotation branch 2 times, most recently from 06bd30b to afd4765 Compare March 23, 2026 06:47
@JasonHe-WQ JasonHe-WQ force-pushed the feat/podgroup-annotation branch from afd4765 to c79c256 Compare March 23, 2026 06:53
Comment thread pkg/scheduler/podgroup_manager_test.go
Comment thread pkg/scheduler/volcano/manager.go
Comment thread pkg/scheduler/volcano/manager.go Outdated
@JasonHe-WQ JasonHe-WQ changed the title feat(podgroup): set annotations copied from rbg with prefix volcano [WIP]feat(podgroup): set annotations copied from rbg with prefix volcano Mar 24, 2026
@JasonHe-WQ JasonHe-WQ changed the title [WIP]feat(podgroup): set annotations copied from rbg with prefix volcano [WIP]feat(podgroup): feat(scheduler): inherit podGroup annotations Mar 26, 2026
@JasonHe-WQ JasonHe-WQ changed the title [WIP]feat(podgroup): feat(scheduler): inherit podGroup annotations feat(podgroup): feat(scheduler): inherit podGroup annotations Mar 26, 2026
@JasonHe-WQ JasonHe-WQ force-pushed the feat/podgroup-annotation branch from ca97a6f to 052b7be Compare March 26, 2026 07:01
@JasonHe-WQ JasonHe-WQ changed the title feat(podgroup): feat(scheduler): inherit podGroup annotations feat(scheduler): inherit podGroup annotations Mar 26, 2026
@cheyang cheyang requested a review from Copilot March 26, 2026 07:41
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.


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

Comment thread pkg/scheduler/podgroup_manager_test.go Outdated
Comment thread pkg/scheduler/podgroup_manager_test.go Outdated
Comment thread pkg/scheduler/podgroup_manager_test.go Outdated
@JasonHe-WQ JasonHe-WQ force-pushed the feat/podgroup-annotation branch from b86d4d8 to 53ed71f Compare March 26, 2026 07:52
Copy link
Copy Markdown
Collaborator

@cheyang cheyang left a comment

Choose a reason for hiding this comment

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

/lgtm

@Syspretor Syspretor merged commit e39b645 into sgl-project:main Mar 26, 2026
9 checks passed
@JasonHe-WQ JasonHe-WQ deleted the feat/podgroup-annotation branch March 26, 2026 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants