-
Notifications
You must be signed in to change notification settings - Fork 36
NO-ISSUE:UPSTREAM: <carry>: Fix: Race condition in ClusterExtension cleanup #533
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,6 +14,7 @@ import ( | |
| appsv1 "k8s.io/api/apps/v1" | ||
| corev1 "k8s.io/api/core/v1" | ||
| apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" | ||
| "k8s.io/apimachinery/pkg/api/errors" | ||
| "k8s.io/apimachinery/pkg/api/meta" | ||
| metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
| "k8s.io/apimachinery/pkg/util/rand" | ||
|
|
@@ -472,6 +473,24 @@ var _ = Describe("[sig-olmv1][OCPFeatureGate:NewOLMOwnSingleNamespace] OLMv1 ope | |
| Expect(k8sClient.Delete(ctx, watchNSObj, client.PropagationPolicy(deletePolicy))).To(Succeed(), "failed to delete watch namespace %q", watchNamespace) | ||
| } | ||
| Expect(k8sClient.Delete(ctx, installNS, client.PropagationPolicy(deletePolicy))).To(Succeed(), "failed to delete install namespace %q", installNamespace) | ||
|
|
||
| By(fmt.Sprintf("waiting for namespace %s to be fully deleted before next scenario", installNamespace)) | ||
| Eventually(func(g Gomega) { | ||
| ns := &corev1.Namespace{} | ||
| err := k8sClient.Get(ctx, client.ObjectKey{Name: installNamespace}, ns) | ||
| g.Expect(err).To(HaveOccurred(), "expected namespace %s to be deleted", installNamespace) | ||
| g.Expect(errors.IsNotFound(err)).To(BeTrue(), "expected NotFound error for namespace %s", installNamespace) | ||
| }).WithTimeout(2 * time.Minute).WithPolling(2 * time.Second).Should(Succeed()) | ||
|
|
||
| if watchNSObj != nil { | ||
| By(fmt.Sprintf("waiting for watch namespace %s to be fully deleted before next scenario", watchNamespace)) | ||
| Eventually(func(g Gomega) { | ||
| ns := &corev1.Namespace{} | ||
| err := k8sClient.Get(ctx, client.ObjectKey{Name: watchNamespace}, ns) | ||
| g.Expect(err).To(HaveOccurred(), "expected namespace %s to be deleted", watchNamespace) | ||
| g.Expect(errors.IsNotFound(err)).To(BeTrue(), "expected NotFound error for namespace %s", watchNamespace) | ||
| }).WithTimeout(2 * time.Minute).WithPolling(2 * time.Second).Should(Succeed()) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do we need to wait to delete the NS before running the other scenario? Each scenario has its own unique bundles (CE, etc.), so they can run in parallel and are not marked as SERIAL. Therefore, they should not impact |
||
| } | ||
| } | ||
| }) | ||
| }) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
5 minutes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those tests report a signal for Sippy; to avoid a bad signal, we use bug timeouts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can check the other cases
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The timeouts should be generous — set them to 5 minutes with a pool size of 3.
Those return signals to Sippy and block other teams.
So, we cannot fail due to it. And yes, it was merged before and should be 5 minutes as the others