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

chore: add stress test that validates retries #587

Merged
merged 1 commit into from
Jun 7, 2022

Conversation

karlkfi
Copy link
Contributor

@karlkfi karlkfi commented Jun 6, 2022

  • 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.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jun 6, 2022
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jun 6, 2022
@karlkfi karlkfi requested review from Liujingfang1 and removed request for haiyanmeng June 6, 2022 20:28
@@ -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)
Copy link
Member

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?

Copy link
Contributor Author

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.

Copy link
Contributor Author

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

Copy link
Member

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.

@karlkfi karlkfi force-pushed the karl-stress-retry branch 4 times, most recently from a3b8e93 to 42805ed Compare June 7, 2022 17:44
Copy link
Member

@mortent mortent left a comment

Choose a reason for hiding this comment

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

/approve

@k8s-ci-robot
Copy link
Contributor

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 7, 2022
- 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.
@karlkfi karlkfi force-pushed the karl-stress-retry branch from 42805ed to 9dcbe66 Compare June 7, 2022 17:57
@Liujingfang1
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 7, 2022
@k8s-ci-robot k8s-ci-robot merged commit a323326 into kubernetes-sigs:master Jun 7, 2022
@karlkfi karlkfi deleted the karl-stress-retry branch June 7, 2022 23:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants