Skip to content
Open
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
27 changes: 13 additions & 14 deletions test/framework/cluster_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -496,20 +496,19 @@ func VerifyMachinesReady(ctx context.Context, input VerifyMachinesReadyInput) {
client.MatchingLabels{
clusterv1.ClusterNameLabel: input.Name,
})).To(Succeed())

g.Expect(machineList.Items).ToNot(BeEmpty(), "No machines found for cluster %s", input.Name)

for _, machine := range machineList.Items {
readyConditionFound := false
for _, condition := range machine.Status.Conditions {
if condition.Type == clusterv1.ReadyCondition {
readyConditionFound = true
g.Expect(condition.Status).To(Equal(metav1.ConditionTrue), "The Ready condition on Machine %q should be set to true; message: %s", machine.Name, condition.Message)
g.Expect(condition.Message).To(BeEmpty(), "The Ready condition on Machine %q should have an empty message", machine.Name)
break
}
}, 5*time.Minute, 10*time.Second).Should(Succeed(), "Failed to list Machines to check the Ready condition for Cluster %s", klog.KRef(input.Namespace, input.Name))

Expect(machineList.Items).ToNot(BeEmpty(), "No machines found for cluster %s", input.Name)
Copy link
Member

@sbueringer sbueringer Nov 20, 2025

Choose a reason for hiding this comment

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

I'm not sure if this is desirable in that way considering the Prow CI infrastructure.

I would expect a certain amount of flakiness purely because of the infra we run on.

We can give this a try early next cycle though and then keep an eye on k8s-triage

Alternative to this would be to just reduce the timeout to e.g. 30s/1m. It would allow some sort of flakiness but not entire rollout sequences in progress.

Side note: In general we probably want to do the same for VerifyClusterCondition / VerifyClusterAvailable

for _, machine := range machineList.Items {
readyConditionFound := false
for _, condition := range machine.Status.Conditions {
if condition.Type == clusterv1.ReadyCondition {
readyConditionFound = true
Expect(condition.Status).To(Equal(metav1.ConditionTrue), "The Ready condition on Machine %q should be set to true; message: %s", machine.Name, condition.Message)
Expect(condition.Message).To(BeEmpty(), "The Ready condition on Machine %q should have an empty message", machine.Name)
break
}
g.Expect(readyConditionFound).To(BeTrue(), "Machine %q should have a Ready condition", machine.Name)
}
}, 5*time.Minute, 10*time.Second).Should(Succeed(), "Failed to verify Machines Ready condition for Cluster %s", klog.KRef(input.Namespace, input.Name))
Expect(readyConditionFound).To(BeTrue(), "Machine %q should have a Ready condition", machine.Name)
}
}
Loading