-
Notifications
You must be signed in to change notification settings - Fork 50
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
Gracefully handle rate limiting error on hcp_vault_secrets_secret
resource.
#812
Conversation
hcp_vault_secrets_secret
resource.
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.
looks great!
var err error | ||
for attempt := 0; attempt < retryCount; attempt++ { | ||
getResp, err = client.VaultSecrets.OpenAppSecret(getParams, nil) | ||
if err != nil { |
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.
Is it possible to build a generic module that retries with the right backoff based on status code so that others can also use it?
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.
generic wrapper is doable but is probably a little bigger undertaking at this point. let me revisit it after this so that the issue highlighted is fixed. Given various req/reso possibilities, it will need some thinking.
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.
Thanks. This can be implemented later in subsequent PR.
* main: New Resource: Waypoint Add-on (#807) Gracefully handle rate limiting error on `hcp_vault_secrets_secret` resource. (#812) HCPIE-1244: Improve Identity-Specific Testing (#810) Fix code ownership for vault secrets files (#814) [COMPLIANCE] Add Copyright and License Headers (#799) update tests to use real tf no-code modules (#811)
🛠️ Description
This PR does two things:
TestAccVaultSecretsResourceSecret
acceptance test.🏗️ Acceptance tests
Output from acceptance testing:
Modified rate limit to 1 / minute
HCP provider that is public (current behavior when api rate limit is hit)
HCP provider with this PR fix (latest behavior)
Newly added DEBUG log line.