Skip to content
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

Create new http request on each retry #125

Merged
merged 1 commit into from
Oct 23, 2024
Merged

Conversation

eamonnotoole
Copy link
Contributor

In this PR we change the behaviour in issuertoken to:

  • create a new http request object on each retry
  • set Close on each request so that the underlying tcp connection is always closed

We do this because we are seeing issues with retries on 502 responses from IAM. Retries don't seem to make any difference, in other words we continue to receive 502 responses on each retry.

We also log each retry so that the terraform provider logs will record the retries.

AislingHPE
AislingHPE previously approved these changes Oct 23, 2024
In this PR we change the behaviour in issuertoken to:
- create a new http request object on each retry
- set Close on each request so that the underlying tcp connection is
  always closed

We do this because we are seeing issues with retries on 502 responses
from IAM.  Retries don't seem to make any difference, in other words we
continue to receive 502 responses on each retry.

We fix unit-tests.

We also log each retry so that the terraform provider logs will record
the retries.

Signed-off-by: Eamonn O'Toole <[email protected]>
@eamonnotoole eamonnotoole marked this pull request as ready for review October 23, 2024 11:55
@eamonnotoole eamonnotoole merged commit acabdfc into main Oct 23, 2024
4 checks passed
@eamonnotoole eamonnotoole deleted the new-request-on-retry branch October 23, 2024 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants