Skip to content

chore(role-instanceset): change spec podManagement field type#207

Merged
cheyang merged 1 commit intosgl-project:mainfrom
Syspretor:refactor/change-podmanagement-field-type
Mar 16, 2026
Merged

chore(role-instanceset): change spec podManagement field type#207
cheyang merged 1 commit intosgl-project:mainfrom
Syspretor:refactor/change-podmanagement-field-type

Conversation

@Syspretor
Copy link
Copy Markdown
Collaborator

Ⅰ. Motivation

Ⅱ. Modifications

Ⅲ. Does this pull request fix one issue?

fixes #XXXX

Ⅳ. 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

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
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
/approve

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 v1alpha2 API types to use constants.PodManagementPolicyType directly for podManagementPolicy, removing the local v1alpha2 alias/forwarded constants.

Changes:

  • Removed the v1alpha2 PodManagementPolicyType type alias and related forwarded constants from roleinstanceset_types.go.
  • Updated PodManagementPolicy fields in RoleInstanceSet and RoleSpec to use constants.PodManagementPolicyType directly.
  • Added the pkg/constants import to rolebasedgroup_types.go.

Reviewed changes

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

File Description
api/workloads/v1alpha2/roleinstanceset_types.go Removes the v1alpha2 alias/forwarders and switches the spec field to constants.PodManagementPolicyType.
api/workloads/v1alpha2/rolebasedgroup_types.go Updates RoleSpec’s PodManagementPolicy field type and adds the needed import.

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

Comment on lines 26 to 31
const (
DefaultRoleInstanceSetMaxUnavailable = "10%"
)

// PodManagementPolicyType is an alias for constants.PodManagementPolicyType.
type PodManagementPolicyType = constants.PodManagementPolicyType

const (
OrderedReadyPodManagement = constants.OrderedReadyPodManagement
ParallelPodManagement = constants.ParallelPodManagement
)

// RoleInstanceSetSpec defines the desired state of RoleInstanceSet
type RoleInstanceSetSpec struct {
@cheyang cheyang merged commit 77e2f78 into sgl-project:main Mar 16, 2026
12 checks passed
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.

3 participants