Handle HTTP_1_1_REQUIRED errors in github provider #3172
Merged
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.
I've been seeing this quite a bit recently. I'm not sure why it happens, but hopefully this helps.
Also, plumb context into the right place.
Summary
I frequently see a pattern of
dial tcp 13.107.42.16:443: i/o timeout
, followed by two failed requests.First:
Then
Then we fail outright because we only do 3 requests in the github provider.
I have no way to easily test this because it relies on triggering Microsoft's bad networking running on GitHub Actions, so I apologize for this being a little janky.
One thing that's very frustrating about this error is that there is not a nicely typed way to check this because (for some reason) none of the http2 error codes are exposed: https://cs.opensource.google/go/go/+/refs/tags/go1.21.0:src/net/http/h2_bundle.go;l=1172-1187;drc=d4f0d896a6856e3d6fc64d0e0714645844c59aa0
It's possible to get at this with using
errors.As
that relies on reflection to compare a different error type and... eh... just checking the string seems better.Release Note
NONE