-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Reduce flakiness by ensuring three successful fetches before returning. #1197
Conversation
c01f074
to
9d447d6
Compare
18e6833
to
33e6fb2
Compare
There's a serious risk of this making us run out of iam policy fetch quota, making the tests flakier, so most of this new code is to try to keep things on track even when we run out of quota. Having run all the IAM tests twice, I got 0 flakes. I'll set it running a third time but I expect not to see any further flakes. |
google/iam.go
Outdated
@@ -64,6 +69,36 @@ func iamPolicyReadModifyWrite(updater ResourceIamUpdater, modify iamPolicyModify | |||
log.Printf("[DEBUG]: Setting policy for %s to %+v\n", updater.DescribeResource(), p) | |||
err = updater.SetResourceIamPolicy(p) | |||
if err == nil { | |||
fetchBackoff := 5 * time.Second |
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.
I assume you came to this value from trial and error, right? It feels a bit high since that means that at minimum we've just added 15s to this resource, but I'll defer to your findings
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.
I can try starting at 1 - increasing the backoff as we run out of quota might work out okay.
Yep, that seems to work fine. :) |
…s before returning. (hashicorp#1197)
This change should be a no-op - it only changes a handful of imports.
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks! |
Fixes #1131.