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

Allow retrying HTTP/2 uploads for release assets #3253

Merged
merged 1 commit into from Mar 19, 2021
Merged

Conversation

mislav
Copy link
Contributor

@mislav mislav commented Mar 17, 2021

The Request.GetBody func allows the retry mechanism to reopen the file that's being uploaded as the request body in case the body of the previous request has already started to be read.

Fixes part of #3252

Ref. https://github.com/golang/net/blob/d523dce5a7f4b994f7ed0531dbe44cd8fd803e26/http2/transport.go#L554

The `Request.GetBody` func allows the retry mechanism to reopen the file
that's being uploaded as the request body in case the body of the
previous request has already started to be read.

Hopefully fixes the error:

    http2: Transport: cannot retry err [stream error: stream ID 1; REFUSED_STREAM]
    after Request.Body was written; define Request.GetBody to avoid this error

Ref. https://github.com/golang/net/blob/d523dce5a7f4b994f7ed0531dbe44cd8fd803e26/http2/transport.go#L554
@mislav mislav requested a review from a team March 17, 2021 15:00
@mislav mislav added this to Backlog 🗒 in The GitHub CLI via automation Mar 17, 2021
@mislav mislav moved this from Backlog 🗒 to Needs review 🤔 in The GitHub CLI Mar 17, 2021
The GitHub CLI automation moved this from Needs review 🤔 to Needs to be merged 🎉 Mar 17, 2021
@mislav mislav merged commit 84f0f59 into trunk Mar 19, 2021
The GitHub CLI automation moved this from Needs to be merged 🎉 to Pending Release 🥚 Mar 19, 2021
@mislav mislav deleted the http2-upload-retry branch March 19, 2021 15:10
@github-actions github-actions bot moved this from Pending Release 🥚 to Done 💤 in The GitHub CLI Mar 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
The GitHub CLI
  
Done 💤
Development

Successfully merging this pull request may close these issues.

None yet

3 participants