Skip to content

fix(symbolicator): use requests implementation instead of abstract class #92092

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

Merged
merged 1 commit into from
May 22, 2025

Conversation

oioki
Copy link
Member

@oioki oioki commented May 22, 2025

Fixes this issue:

>>> from sentry.lang.native.sources import get_gcp_token
>>> t = get_gcp_token(client_email)
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/.venv/lib/python3.13/site-packages/cachetools/__init__.py", line 702, in wrapper
    v = func(*args, **kwargs)
  File "/usr/src/sentry/src/sentry/lang/native/sources.py", line 630, in get_gcp_token
    target_credentials.refresh(Request())
                               ~~~~~~~^^
TypeError: Can't instantiate abstract class Request without an implementation for abstract method '__call__'

We need to use requests implementation instead of abstract class

@oioki oioki requested a review from Litarnus May 22, 2025 05:26
@oioki oioki requested a review from a team as a code owner May 22, 2025 05:26
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label May 22, 2025
Copy link

codecov bot commented May 22, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

⚠️ Parser warning

The parser emitted a warning. Please review your JUnit XML file:

Warning while parsing testcase attributes: Limit of string is 1000 chars, for name, we got 2083 at 1:156310 in /home/runner/work/sentry/sentry/.artifacts/pytest.junit.xml
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #92092      +/-   ##
==========================================
+ Coverage   84.08%   87.87%   +3.79%     
==========================================
  Files       10170    10172       +2     
  Lines      582941   582963      +22     
  Branches    22603    22603              
==========================================
+ Hits       490140   512294   +22154     
+ Misses      92348    70216   -22132     
  Partials      453      453              

@oioki oioki merged commit 9750d94 into master May 22, 2025
61 checks passed
@oioki oioki deleted the fix/symbolicate-fix-abstract-class-invocation branch May 22, 2025 07:22
roaga pushed a commit that referenced this pull request May 22, 2025
…class (#92092)

Fixes this issue:
```
>>> from sentry.lang.native.sources import get_gcp_token
>>> t = get_gcp_token(client_email)
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/.venv/lib/python3.13/site-packages/cachetools/__init__.py", line 702, in wrapper
    v = func(*args, **kwargs)
  File "/usr/src/sentry/src/sentry/lang/native/sources.py", line 630, in get_gcp_token
    target_credentials.refresh(Request())
                               ~~~~~~~^^
TypeError: Can't instantiate abstract class Request without an implementation for abstract method '__call__'
```

We need to use `requests` implementation instead of abstract class
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: Backend Automatically applied to PRs that change backend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants