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

🐛 fix the placement decision clusters have random order issue #235

Conversation

haoqing0110
Copy link
Member

Summary

Related issue(s)

Fixes #233

@openshift-ci openshift-ci bot requested review from elgnay and jnpacker July 26, 2023 07:51
@haoqing0110
Copy link
Member Author

/assign @qiujian16
/cc @zhujian7

@codecov
Copy link

codecov bot commented Jul 26, 2023

Codecov Report

Patch coverage: 85.10% and project coverage change: -0.01% ⚠️

Comparison is base (e22faa4) 60.29% compared to head (de571d1) 60.29%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #235      +/-   ##
==========================================
- Coverage   60.29%   60.29%   -0.01%     
==========================================
  Files         131      131              
  Lines       13543    13540       -3     
==========================================
- Hits         8166     8164       -2     
+ Misses       4625     4623       -2     
- Partials      752      753       +1     
Flag Coverage Δ
unit 60.29% <85.10%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
pkg/common/options/agent.go 66.66% <ø> (ø)
pkg/common/options/options.go 100.00% <ø> (ø)
...llers/crdstatuccontroller/crd_status_controller.go 37.31% <ø> (ø)
...sterletcontroller/klusterlet_cleanup_controller.go 55.10% <ø> (ø)
...llers/ssarcontroller/klusterlet_ssar_controller.go 76.98% <ø> (-0.07%) ⬇️
...nt/controllers/scheduling/cluster_event_handler.go 59.25% <ø> (ø)
pkg/placement/debugger/debugger.go 52.63% <ø> (ø)
pkg/registration/clientcert/cert_controller.go 44.39% <ø> (ø)
pkg/registration/clientcert/certificate.go 40.90% <ø> (ø)
...stration/spoke/managedcluster/status_controller.go 53.06% <ø> (ø)
... and 35 more

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@qiujian16
Copy link
Member

/approve

/assign @zhujian7

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 26, 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

for _, cluster := range clusterNames.UnsortedList() {
clusterNameList := clusterNameSet.UnsortedList()
sort.Strings(clusterNameList)
for _, cluster := range clusterNameList {
matched = append(matched, clusterapiv1beta1.ClusterDecision{
Copy link
Member

@zhujian7 zhujian7 Jul 26, 2023

Choose a reason for hiding this comment

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

Not sure if sorting the matched is better, because if the matched gets some results from matched, status := filterClustersBySelector(d.ClusterSelector, clusters, clusterNameSet), are they in order?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good suggestion. Need to sort all the matched before dividing into groups.

@haoqing0110 haoqing0110 force-pushed the br_placement-test branch 2 times, most recently from 395eedf to 6abe010 Compare July 26, 2023 13:58
@zhujian7
Copy link
Member

/lgtm

@openshift-ci openshift-ci bot added the lgtm label Jul 26, 2023
Signed-off-by: haoqing0110 <qhao@redhat.com>
@openshift-ci openshift-ci bot removed the lgtm label Jul 26, 2023
@qiujian16
Copy link
Member

/lgtm

@openshift-ci openshift-ci bot added the lgtm label Jul 27, 2023
@openshift-merge-robot openshift-merge-robot merged commit 4f37499 into open-cluster-management-io:main Jul 27, 2023
@haoqing0110 haoqing0110 deleted the br_placement-test branch July 27, 2023 02:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Flaky unit test for the placement scheduling
4 participants