-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add retries to all resources and datasources (#286)
* Work Pool resource: retry Create and Read Adds retries for Create and Read on the Work Pool resource. * Use hashicorp/retryablehttp for retries Uses the hashicorp/retryablehttp package to get an HTTP client with retries and exponential backoff out of the box. This is implemented within our client package, meaning calls to the CRUD methods from both resources and datasources will inherit that functionality. * Remove unused client functions * Expand comment for retryablehttp usage * Exit on error for blockSchemaClient.List * Increase the retry interval and maximum Blocks, and other resources, need more time to resolve objects so let's bump up the defaults to accommodate that. * Bump min retry wait seconds to 3 Still saw failures in acceptance tests in CI * Bump retry seconds to 3 Was still seeing errors in the acceptance tests * Remove time/retry overrides, add retry check func - Adds a function to define how to determine whether or not to retry, extending the default function so we can accept 409s and retry 404s. We can adapt this function over time as well. - Removes the time and retry overrides, as those were not the reason that block tests were failing - the requests themselves were passing, and didn't need retries - what they needed was to retry 404s and not retry 409s. * Use the stdlib http.Client Uses the stdlib http.Client interface so we don't need to specify the retryablehttp variant in every client method.
- Loading branch information
1 parent
f2f4ccd
commit 956d9c6
Showing
7 changed files
with
68 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.