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

[release-1.3] 🐛 test/e2e: fix ClusterClass changes flake #7582

Merged
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
7 changes: 6 additions & 1 deletion test/e2e/clusterclass_changes.go
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,12 @@ func rebaseClusterClassAndWait(ctx context.Context, input rebaseClusterClassAndW
patchHelper, err := patch.NewHelper(input.Cluster, mgmtClient)
Expect(err).ToNot(HaveOccurred())
input.Cluster.Spec.Topology.Class = newClusterClassName
Expect(patchHelper.Patch(ctx, input.Cluster)).To(Succeed())
// We have to retry the patch. The ClusterClass was just created so the client cache in the
// controller/webhook might not be aware of it yet. If the webhook is not aware of the ClusterClass
// we get a "Cluster ... can't be validated. ClusterClass ... can not be retrieved" error.
Eventually(func() error {
return patchHelper.Patch(ctx, input.Cluster)
}, "1m", "5s").Should(Succeed(), "Failed to patch Cluster")

log.Logf("Waiting for MachineDeployment rollout to complete.")
for _, mdTopology := range input.Cluster.Spec.Topology.Workers.MachineDeployments {
Expand Down