Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Add retryable transport for errors #1704
Add retryable transport for errors #1704
Changes from 4 commits
8d199e7
5ae5432
df9f8d5
e41f935
0da71b9
0b3ba89
c2c341c
e31cac0
88e9ae8
2aa7bfd
bb97a82
61d9a17
27ded6c
218287f
bd787ef
9b98c08
6d9b78d
c2f8580
6ad697e
9bb406a
5f93d2e
4d51e0d
7ad4857
8962435
70a8ec2
9a682ae
1e347cc
0f944d2
09a1dc5
e546022
f3d3ce3
5f83f00
f75c2de
f4a3723
9248f3d
66bbc57
5af0b6f
db8d50e
f402f24
a234ece
6ba0735
f4274eb
e9534c7
b40c2b7
61e196a
bf61de6
7de4a84
679e033
564ed52
8465c92
3221167
c1b5e49
ef547ad
4d63684
053fd0b
fff38a1
4f27468
23b3302
a2c18d9
23634d2
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Can you talk to me a little bit about this code and why you chose 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.
How was this tested?
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 tests I have added on
transport_test.go
were failing due to the body not being reset after the first retry, then I checked the package I use on some of my projects to retry (httpretry) and saw that they have a code for this scenario, so I shameless copied it and the tests succeedI didn't figure out how to test the specific scenario of using the function
GetBody
, the original library also only tests without the GetBody, but if you have an idea on how to test with it I can update the testsThere 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.
Do you have a manual workload you can test this on that will reliably trigger a 500? I'm hesitant to merge/release to a wide audience without a bit more description of the validation process.
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 have a Flux integration that quite often gives me a 500 (a few times a day), I can try linking my branch instead of the default provider there... however, I have never integrated an in development provider, so I will appreciate anything that can guide me through this
I'm also a bit afraid of doing that on this workload, it is not critical, but I would expect there are more changes here that are not tested/stable
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 can create the binary for this provider and point Terraform towards it by seeing our debugging instructions.
We do not have successful automated integration testing at the moment so we've been over-relying on manual testing. I don't feel super comfortable merging without manually testing this extensively first.