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

🐛 Ensure DockerMachinePool providerIDList is deterministic #10998

Merged
merged 1 commit into from
Aug 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion test/framework/resourceversion_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func ValidateResourceVersionStable(ctx context.Context, proxy ClusterProxy, name
}, 1*time.Minute, 15*time.Second).Should(Succeed(), "Resource versions never became stable")

// Verify resource versions are stable for a while.
byf("Check Resource versions remains stable")
byf("Check Resource versions remain stable")
Consistently(func(g Gomega) {
objectsWithResourceVersion, err := getObjectsWithResourceVersion(ctx, proxy, namespace, ownerGraphFilterFunction)
g.Expect(err).ToNot(HaveOccurred())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ package controllers
import (
"context"
"fmt"
"sort"
"time"

"github.com/pkg/errors"
Expand Down Expand Up @@ -302,6 +303,8 @@ func (r *DockerMachinePoolReconciler) reconcileNormal(ctx context.Context, clust
dockerMachinePool.Spec.ProviderIDList = append(dockerMachinePool.Spec.ProviderIDList, *dockerMachine.Spec.ProviderID)
}
}
// Ensure the providerIDList is deterministic (getDockerMachines doesn't guarantee a specific order)
sort.Strings(dockerMachinePool.Spec.ProviderIDList)

dockerMachinePool.Status.Replicas = int32(len(dockerMachineList.Items))

Expand Down
Loading