Skip to content

Graceful handling for HTTP/2 GoAway frames. - #733

Merged
lovelydinosaur merged 7 commits into
masterfrom
refactor-http2-stream-events
Jun 26, 2023
Merged

Graceful handling for HTTP/2 GoAway frames.#733
lovelydinosaur merged 7 commits into
masterfrom
refactor-http2-stream-events

Conversation

@lovelydinosaur

@lovelydinosaurlovelydinosaur commented Jun 16, 2023

Copy link
Copy Markdown
Contributor

Closes#730.

  • Raise ConnectionNotAvailable when appropriate with GoAway frames for requests that can gracefully be retried.
  • Some code refactoring
    • Stricter typing for ._events.
    • Stricter typing for ._connection_terminated.
    • Make logic in ._receive_events() clearer by having a switch on the event class.
  • New test cases for HTTP/2 GoAway frame behaviour with connection pools.
  • Behavior for some existing test cases switches from RemoteProtocolError to ConnectionNotAvailable.

@lovelydinosaurlovelydinosaur changed the title Refactor HTTP/2 stream events.Graceful handling for HTTP/2 GoAway frames.Jun 16, 2023
@lovelydinosaurlovelydinosaur added bug Something isn't working and removed refactor labels Jun 16, 2023
@lovelydinosaur
lovelydinosaur requested a review from a teamJune 16, 2023 18:17
@lovelydinosaur

Copy link
Copy Markdown
ContributorAuthor

Okay, this is a bit of a chunky one for review.
I'm happy to take it step-by-step instead if that's preferred.

Comment threadhttpcore/_sync/http2.py Outdated
@lovelydinosaur
lovelydinosaur requested a review from a teamJune 21, 2023 10:17
Comment threadhttpcore/_async/http2.py Outdated
@lovelydinosaur
lovelydinosaur merged commit 8d31f0b into masterJun 26, 2023
@lovelydinosaur
lovelydinosaur deleted the refactor-http2-stream-events branch June 26, 2023 09:19
@lovelydinosaur

Copy link
Copy Markdown
ContributorAuthor

🙏🏼 Thanks, @Pliner.

@zanieb

Copy link
Copy Markdown
Contributor

Wonderful. Thanks for taking this on @tomchristie !

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugSomething isn't working

Development

Successfully merging this pull request may close these issues.

Graceful handling for HTTP/2 GoAway frames.

3 participants

@lovelydinosaur@zanieb@Pliner