-
Notifications
You must be signed in to change notification settings - Fork 68
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
[ACM-12773] Fix flaky test #1533
Conversation
Signed-off-by: Thibault Mange <[email protected]>
Quality Gate passedIssues Measures |
/cherrypick release-2.11 |
@thibaultmg: once the present PR merges, I will cherry-pick it on top of release-2.11 in a new PR and assign it to you. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: saswatamcode, thibaultmg 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 |
@thibaultmg: new pull request created: #1534 In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
@@ -747,6 +747,7 @@ func getClusterList(userMetricsAccess map[string][]string) []string { | |||
for clusterName := range userMetricsAccess { | |||
clusterList = append(clusterList, clusterName) | |||
} | |||
slices.Sort(clusterList) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why would this be tripped by go1.21 update? Is there a test that asserts a sorted slice?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know how this is triggered. But I ran it two times and it failed in each. I remember that go removed the random keys ordering when looping through maps, maybe this is it 🤷 . In any case, I don't think it hurts having a. consistent ordering.
There is a test that expects the cluster list to be in order. Although, it is not its purpose, but it checks the list of clusters as "c1,c2"
CI upgrade to go 1.21 fails due to unsorted list from a map: openshift/release#54478
This PR fixes this.