-
Notifications
You must be signed in to change notification settings - Fork 79
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
chore: add stress test that validates retries #587
Conversation
@@ -114,7 +114,7 @@ func thousandDeploymentsTest(ctx context.Context, c client.Client, invConfig inv | |||
Expect(e.ErrorEvent.Err).To(BeNil()) | |||
} | |||
for _, e := range destroyerEvents { | |||
Expect(e.PruneEvent.Error).To(BeNil(), "PruneEvent: %v", e.PruneEvent) | |||
Expect(e.DeleteEvent.Error).To(BeNil(), "DeleteEvent: %v", e.DeleteEvent) |
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.
Why change PruneEvent
to DeleteEvent
?
Is there a reason that we run the same for loop 3 times instead of combining them?
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.
Why change PruneEvent to DeleteEvent?
For the Destroyer there are no PruneEvents. It replaces them with DeleteEvents. The PruneEvents are only used by the Applier. This change fixes the test to catch the right event errors.
Personally, I think they should all be DeleteEvents, since there's no real difference between them, but that's tech debt from years ago that we haven't gotten around to cleaning up.
Is there a reason that we run the same for loop 3 times instead of combining them?
No particular reason. That was just the existing behavior. I could clean it up like I did in the other test. That would make it easier to debug by printing the whole event list.
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.
added an function to clean it up
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.
Yeah, distinguishing between PruneEvent and DeleteEvent seemed like a good idea at the time. But agree with @karlkfi that they should all just be DeleteEvents.
a3b8e93
to
42805ed
Compare
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.
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: karlkfi, mortent The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
- Duplicate the 1,000 Deployment test, but use a 1m reconcile timeout in a retry loop. - This verifies that the applier and destroyer are re-entrant at scale.
42805ed
to
9dcbe66
Compare
/lgtm |
a retry loop.