Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🌱 refine placement helper function #270

Conversation

haoqing0110
Copy link
Member

Summary

Related issue(s)

Fixes #

@openshift-ci openshift-ci bot requested review from deads2k and mdelder August 29, 2023 03:43
Signed-off-by: haoqing0110 <qhao@redhat.com>
@haoqing0110
Copy link
Member Author

/assign @qiujian16

// ExistingClusterGroups returns the tracker's existing decision cluster names for groups listed in groupKeys.
// Return empty set when groupKeys is empty.
func (pdct *PlacementDecisionClustersTracker) ExistingClusterGroups(groupKeys []GroupKey) ([]GroupKey, map[GroupKey]sets.Set[string]) {
func (pdct *PlacementDecisionClustersTracker) ExistingClusterGroups(groupKeys []GroupKey) ClusterGroupsMap {
Copy link
Member

Choose a reason for hiding this comment

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

can we use ExistingClusterGroups(groupKeys ...GroupKey)?

Copy link
Member Author

@haoqing0110 haoqing0110 Aug 30, 2023

Choose a reason for hiding this comment

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

Have updated the code.

}

// GetClusterSets returns a set containing all clusters from all group sets.
func (g ClusterGroupsMap) GetClusterSets() sets.Set[string] {
Copy link
Member

Choose a reason for hiding this comment

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

ClusterSets here is confusing, GetClusters maybe

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed.

Signed-off-by: haoqing0110 <qhao@redhat.com>
Copy link
Member

@qiujian16 qiujian16 left a comment

Choose a reason for hiding this comment

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

/approve
/lgtm

@openshift-ci openshift-ci bot added the lgtm label Aug 30, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 30, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: haoqing0110, qiujian16

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

The pull request process is described 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

@openshift-merge-robot openshift-merge-robot merged commit 4fab7d4 into open-cluster-management-io:main Aug 30, 2023
10 checks passed
@haoqing0110 haoqing0110 deleted the br_placement-helper branch August 30, 2023 02:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants