-
Notifications
You must be signed in to change notification settings - Fork 231
chore: fix a flaky test #9699
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
base: main
Are you sure you want to change the base?
chore: fix a flaky test #9699
Conversation
Auto Cherry-pick Instructions
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #9699 +/- ##
==========================================
+ Coverage 59.60% 59.69% +0.09%
==========================================
Files 551 551
Lines 59739 59740 +1
==========================================
+ Hits 35607 35662 +55
+ Misses 20888 20832 -56
- Partials 3244 3246 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
@@ -335,7 +335,7 @@ func ClearResourcesWithRemoveFinalizerOption[T intctrlutil.Object, PT intctrluti | |||
pobj := PT(&obj) | |||
if pobj.GetDeletionTimestamp().IsZero() { | |||
d, _ := json.Marshal(pobj) | |||
panic("expected DeletionTimestamp is not nil, obj: " + string(d)) | |||
ginkgo.GinkgoWriter.Printf("Warning: deleted obj's DeletionTimestamp is nil. This may due to an old reconciliation process is not done. obj: %s", string(d)) |
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.
If we remove the panic, nobody will notice or care about the warning. Cases may fail due to the residual resources, which are also flaky and hard to debug.
@leon-inf what's your opinion
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.
+1, we shouldn't simply remove the panic here. Regarding the specific issue, we should add a mechanism to coordinate the timing of deleting the component and its sub-resources.
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.
I can try delete Component object without removing the finalizer, so that we can make sure no component's reconciliation is still in progress.
fixes #9448