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

fix(http2): Check for h2 existence #3690

Merged
merged 4 commits into from
Oct 31, 2024
Merged

fix(http2): Check for h2 existence #3690

merged 4 commits into from
Oct 31, 2024

Conversation

BYK
Copy link
Member

@BYK BYK commented Oct 24, 2024

The new HTTP2Transport needs httpcore and h2 and we only checked for httpcore. This caused runtime errors and dropping of all events during testing as the test platform had httpcore installed but not h2. This patch adds both as conditions for the new transport implementation. Ideally, when we switch out the old transport, we'd silently check for h2 existence only and set the http2 option accordingly.

The new `HTTP2Transport` needs `httpcore` _and_ `h2` and we only checked for `httpcore`. This caused runtime errors and dropping of all events during testing as the test platform had `httpcore` installed but not `h2`. This patch adds both as conditions for the new transport implementation. Ideally, when we switch out the old transport, we'd silently check for `h2` existence only and set the `http2` option accordingly.
@BYK BYK requested a review from sentrivana October 24, 2024 20:47
Copy link

codecov bot commented Oct 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.28%. Comparing base (02d0934) to head (55d3c2f).
Report is 1 commits behind head on master.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3690   +/-   ##
=======================================
  Coverage   84.28%   84.28%           
=======================================
  Files         133      133           
  Lines       14260    14261    +1     
  Branches     2405     2405           
=======================================
+ Hits        12019    12020    +1     
  Misses       1490     1490           
  Partials      751      751           
Files with missing lines Coverage Δ
sentry_sdk/transport.py 84.09% <100.00%> (+0.04%) ⬆️

... and 2 files with indirect coverage changes

@BYK BYK enabled auto-merge (squash) October 31, 2024 12:53
Copy link
Member

@asottile-sentry asottile-sentry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@BYK BYK merged commit ce9986c into master Oct 31, 2024
136 checks passed
@BYK BYK deleted the byk/fix/graceful-http2 branch October 31, 2024 12:57
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.

2 participants