-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Parse 409 error strings to determine retriable status #1552
Parse 409 error strings to determine retriable status #1552
Conversation
Hi! I'm the modular magician, I work on Magic Modules. Pull request statusesNo diff detected in Ansible. New Pull RequestsI built this PR into one or more new PRs on other repositories, and when those are closed, this PR will also be merged and closed. |
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.
You still seemed apprehensive about using this approach in the issue- have you changed your mind or do you think we can approach this another way? This approach LGTM though.
third_party/terraform/utils/utils.go
Outdated
if gerr, ok := err.(*googleapi.Error); ok && (gerr.Code == 409 || gerr.Code == 429 || gerr.Code == 500 || gerr.Code == 502 || gerr.Code == 503) { | ||
if gerr.Code == 409 && !strings.Contains(gerr.Body, "operationInProgress") { |
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.
nit: Should this be broken out to a separate block? Needing to guard against nearly every 409
type makes me feel like we should have a block if gerr.Code == 409 && strings.Contains(gerr.Body, "operationInProgress"
.
Haha - TBH I do dislike this approach but the alternatives appear to be: From what I can see the error |
👍 |
Hi! I'm the modular magician, I work on Magic Modules. Pull request statusesterraform-provider-google-beta already has an open PR. New Pull RequestsI didn't open any new pull requests because of this PR. |
Tracked submodules are build/terraform-beta build/terraform-mapper build/terraform build/ansible build/inspec.
7b808b5
to
0d00c21
Compare
Fixes hashicorp/terraform-provider-google#3279
[all]
[terraform]
[terraform-beta]
[ansible]
[inspec]