kubernetes-sigs / cli-utils

This repo contains binaries that built from libraries in cli-runtime.
Apache License 2.0
155 stars 78 forks source link

fix: Sort reconcile events to fix flakey test #581

Closed karlkfi closed 2 years ago

karlkfi commented 2 years ago

Change the sorting algorithm to fix some flaky tests that became more frequent when client-side throttling was disabled.

With the current impl, only the WaitEvents have unpredictable ordering, reasoning is in comments in the sorting algorithm.

karlkfi commented 2 years ago

This turns out to be a bigger problem than I thought.

It turns out the Prune Success events are being sorted when they don't need to be, because they're (for now) consistently ordered by reverse apply order.

I'm going to have to fix the sorting algorithm again.

karlkfi commented 2 years ago

/retest

k8s-ci-robot commented 2 years ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: karlkfi, mortent

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](https://github.com/kubernetes-sigs/cli-utils/blob/master/OWNERS)~~ [mortent] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment