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

DRY up backoff.Backoff set up and proper use of context.Context #1658

Merged
merged 5 commits into from
Aug 2, 2023

Conversation

monde
Copy link
Collaborator

@monde monde commented Aug 1, 2023

This PR DRY's up setting up backoff.Backoff where we needed to do API retries in various resources. It also correctly makes use of the calling context when setting up backoff which we hadn't be doing in most of the instances. The refactor was originally to make our VCR test recording run more quickly but exposed that we weren't making proper use of context with backoffs.

A time operations interface is added to the config to allow changing clock behavior to be more efficient in a test environment.

This is a refactor that sets up saving about 28% time recording VCR tests and speeds up replaying by 4x.

@monde monde marked this pull request as draft August 2, 2023 00:07
@MikeMondragon-okta MikeMondragon-okta force-pushed the disable_backoff_for_vcr_tests branch from b0a10a3 to fab2f72 Compare August 2, 2023 20:45
@monde monde marked this pull request as ready for review August 2, 2023 20:46
@MikeMondragon-okta MikeMondragon-okta merged commit fae0233 into master Aug 2, 2023
@monde monde deleted the disable_backoff_for_vcr_tests branch August 15, 2023 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants