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(strawberry): prepare for upstream extension removal #3649

Conversation

DoctorJohn
Copy link
Contributor

As suggested by @szokeasaurusrex in strawberry-graphql/strawberry#3590, Strawberry is preparing to fully remove its deprecated SentryTracingExtension in favor of the integration provided by the Sentry SDK.

This PR prepares the Sentry Strawberry integration for that removal by:

  • fixing that the integration would assume Strawberry is not installed if the extension cannot be imported
  • making sure tests with Strawberry versions before and after the removal still work

I also checked that removing the extension does not otherwise affect the integration: The extension's sync and async variants are imported to replace them and to guess whether sync or async code is used. Both still works if the imports are defaulted to None.

@DoctorJohn DoctorJohn force-pushed the prepare-removal-of-strawberry-sentry-tracing-extension branch from 744f8e9 to 6f2c648 Compare October 13, 2024 23:38
Copy link
Contributor

@sentrivana sentrivana left a comment

Choose a reason for hiding this comment

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

Thank you @DoctorJohn. Looks good to me.

Copy link

codecov bot commented Oct 22, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 2 lines in your changes missing coverage. Please review.

Project coverage is 84.29%. Comparing base (8d48961) to head (5cdf6a8).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
sentry_sdk/integrations/strawberry.py 66.66% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3649      +/-   ##
==========================================
- Coverage   84.36%   84.29%   -0.07%     
==========================================
  Files         133      133              
  Lines       14227    14231       +4     
  Branches     2398     2398              
==========================================
- Hits        12002    11996       -6     
- Misses       1482     1496      +14     
+ Partials      743      739       -4     
Files with missing lines Coverage Δ
sentry_sdk/integrations/strawberry.py 84.47% <66.66%> (-1.11%) ⬇️

... and 3 files with indirect coverage changes

@sentrivana sentrivana merged commit 336b177 into getsentry:master Oct 22, 2024
133 of 136 checks passed
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