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

Handle HTTP_1_1_REQUIRED errors in github provider #3172

Merged
merged 1 commit into from
Aug 9, 2023

Conversation

jonjohnsonjr
Copy link
Contributor

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:

stream error: stream ID 1; HTTP_1_1_REQUIRED; received from peer

Then

stream error: stream ID 3; HTTP_1_1_REQUIRED; received from peer

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

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.

Signed-off-by: Jon Johnson <jon.johnson@chainguard.dev>
@codecov
Copy link

codecov bot commented Aug 8, 2023

Codecov Report

Merging #3172 (e8dc8ca) into main (665e53b) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #3172   +/-   ##
=======================================
  Coverage   30.54%   30.54%           
=======================================
  Files         155      155           
  Lines        9809     9809           
=======================================
  Hits         2996     2996           
  Misses       6365     6365           
  Partials      448      448           

@hectorj2f hectorj2f merged commit c049cef into sigstore:main Aug 9, 2023
28 checks passed
@github-actions github-actions bot added this to the v2.2.0 milestone Aug 9, 2023
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.

3 participants