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

[ACM-12773] Fix flaky test #1533

Merged
merged 1 commit into from
Jul 18, 2024

Conversation

thibaultmg
Copy link
Contributor

CI upgrade to go 1.21 fails due to unsorted list from a map: openshift/release#54478
This PR fixes this.

Signed-off-by: Thibault Mange <[email protected]>
Copy link

@thibaultmg
Copy link
Contributor Author

/cherrypick release-2.11

@openshift-cherrypick-robot
Copy link
Collaborator

@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:

/cherrypick release-2.11

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.

@thibaultmg thibaultmg enabled auto-merge (squash) July 18, 2024 08:49
Copy link

openshift-ci bot commented Jul 18, 2024

[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:
  • OWNERS [saswatamcode,thibaultmg]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@thibaultmg thibaultmg merged commit f53b6b2 into stolostron:main Jul 18, 2024
14 of 16 checks passed
@openshift-cherrypick-robot
Copy link
Collaborator

@thibaultmg: new pull request created: #1534

In response to this:

/cherrypick release-2.11

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)
Copy link
Contributor

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?

Copy link
Contributor Author

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"

@thibaultmg thibaultmg deleted the fix_flaky_util_test branch July 18, 2024 09:19
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.

4 participants