-
Notifications
You must be signed in to change notification settings - Fork 4.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
Hotfix: Upgrade go-autorest to v9.5.2 #617
Conversation
the part that I know about (sender.go) looks good.
…On Mon, Dec 11, 2017 at 1:07 PM, Su Shi ***@***.***> wrote:
@metacpp <https://github.com/metacpp> requested your review on:
hashicorp/terraform-provider-azurerm#617
<#617>
Hotfix: Upgrade go-autorest to v9.5.1.
—
You are receiving this because your review was requested.
Reply to this email directly, view it on GitHub
<#617 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABOrrLUUW8HE67bKZlRUBDAQwURiMms-ks5s_ZmtgaJpZM4Q-CNq>
.
|
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.
LGTM - just running the tests now 👍
Looks like there's a bug in this:
|
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.
The acceptance tests have showed that this panics when the connection is reset/dropped (whereas the current version of Go-AutoRest will instead return an error, which can be handled gracefully).
Can we update this to check that resp
isn't nil before accessing it, so that we can handle this in a more graceful fashion?
return resp, err | ||
} | ||
delayed := DelayWithRetryAfter(resp, r.Cancel) | ||
if !delayed { | ||
DelayForBackoff(backoff, attempt, r.Cancel) | ||
} | ||
// don't count a 429 against the number of attempts | ||
// so that we continue to retry until it succeeds | ||
if resp.StatusCode != http.StatusTooManyRequests { |
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.
👋🏻 @jhendrixMSFT @marstr we're seeing a crash here - we handle checking for this internally to see if there was a dropped connection from Azure (which happens often enough that we need to handle it) - any chance that we could check if resp != nil
before checking the status code?
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 will get this fixed and release a v9.5.2 today.
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.
awesome - thanks @jhendrixMSFT :)
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.
The fix is in an the release has been tagged. https://github.com/Azure/go-autorest/releases/tag/v9.5.2
The above test passes now.
|
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.
LGTM
CHANGELOG.md
Outdated
IMPROVEMENTS: | ||
|
||
* Too Many Request: Upgrade go-autorest to v9.5.2 to keep retrying all the time while meeting 429 status code. ([#617](https://github.com/terraform-providers/terraform-provider-azurerm/pull/617)) | ||
|
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.
@metacpp heads up that we don't manage this file through PR's (also there is no v0.3.4 of the Provider) - so I'm going to push a commit to revert this file/change (and update it as we normally would)
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.
LGTM - thanks for re-vendoring this 👍
Meant to add - ran the test suite and this seems fine with the changes in AutoRest v9.5.2 👍 |
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 👉 [email protected]. Thanks! |
No description provided.