Repository navigation
Closed
Labels
Description
How do you use Sentry?
Cloud
Version
1.29.0
python version: 3.9
Steps to Reproduce
import requests
from flask import Flask
import sentry_sdk
from sentry_sdk.integrations.flask import FlaskIntegration
dsn = "XXXXX"
sentry_sdk.init(
dsn=dsn,
integrations=[
FlaskIntegration(),
],
# Set traces_sample_rate to 1.0 to capture 100%
# of transactions for performance monitoring.
# We recommend adjusting this value in production.
traces_sample_rate=0.1,
)
headers = {
"Content-Type": "application/json; charset=utf-8",
}
data = {
"variables": {"email": "xxx"},
}
response = requests.post(
"http://localhost:8089/v1/graphql",
headers=headers,
json=data,
)
x = response.json()
if you run the snippet above the response.content will come back as "", where if you run this:
import requests
from flask import Flask
# import sentry_sdk
# from sentry_sdk.integrations.flask import FlaskIntegration
#
# dsn = "httXXXXXXXX3611"
#
# sentry_sdk.init(
# dsn=dsn,
# integrations=[
# FlaskIntegration(),
# ],
# # Set traces_sample_rate to 1.0 to capture 100%
# # of transactions for performance monitoring.
# # We recommend adjusting this value in production.
# traces_sample_rate=0.1,
# )
headers = {
"Content-Type": "application/json; charset=utf-8",
}
data = {
"variables": {"email": "xxx"},
}
response = requests.post(
"http://localhost:8089/v1/graphql",
headers=headers,
json=data,
)
x = response.json()
The response comes back as expected.
I am running the query against a hasura instance, but I assume it has something to do with this new feature, so I assume all requests to all graphql servers are affected:
Pip freeze:
annotated-types==0.5.0
asttokens==2.2.1
async-timeout==4.0.2
black==23.7.0
blinker==1.6.2
boto3==1.28.16
botocore==1.31.16
CacheControl==0.13.1
cachetools==5.3.1
certifi==2023.7.22
cffi==1.15.1
cfgv==3.3.1
charset-normalizer==3.2.0
click==8.1.6
colorama==0.4.6
contourpy==1.1.0
cryptography==41.0.2
cycler==0.11.0
Deprecated==1.2.14
distlib==0.3.7
dnspython==2.4.1
email-validator==2.0.0.post2
exceptiongroup==1.1.2
executing==1.2.0
filelock==3.12.2
firebase-admin==6.0.1
Flask==2.3.2
Flask-Cors==3.0.10
fonttools==4.41.1
google-api-core==2.11.1
google-api-python-client==2.95.0
google-auth==2.22.0
google-auth-httplib2==0.1.0
google-cloud-core==2.3.3
google-cloud-firestore==2.3.4
google-cloud-storage==2.10.0
google-crc32c==1.5.0
google-resumable-media==2.5.0
googleapis-common-protos==1.60.0
grpcio==1.56.2
grpcio-status==1.56.2
gunicorn==21.2.0
httplib2==0.22.0
icecream==2.1.3
identify==2.5.26
idna==3.4
importlib-metadata==6.8.0
importlib-resources==6.0.0
iniconfig==2.0.0
itsdangerous==2.1.2
Jinja2==3.1.2
jmespath==1.0.1
jwcrypto==1.5.0
kiwisolver==1.4.4
MarkupSafe==2.1.3
matplotlib==3.7.2
msgpack==1.0.5
mypy-extensions==1.0.0
nodeenv==1.8.0
numpy==1.25.2
opencv-python-headless==4.8.0.74
packaging==23.1
pathspec==0.11.2
Pillow==10.0.0
pip==22.3.1
platformdirs==3.10.0
pluggy==1.2.0
pre-commit==3.3.3
proto-plus==1.22.3
protobuf==4.23.4
psycopg2-binary==2.9.6
pyasn1==0.5.0
pyasn1-modules==0.3.0
pycparser==2.21
pydantic==2.1.1
pydantic_core==2.4.0
Pygments==2.15.1
PyJWT==2.8.0
pyparsing==3.0.9
pytest==7.4.0
python-dateutil==2.8.2
python-dotenv==1.0.0
python-jwt==4.0.0
PyYAML==6.0.1
redis==4.6.0
requests==2.31.0
rsa==4.9
s3transfer==0.6.1
scipy==1.11.1
sentry-sdk==1.29.0
setuptools==65.5.1
six==1.16.0
tomli==2.0.1
typing_extensions==4.7.1
uritemplate==4.1.1
urllib3==1.26.16
virtualenv==20.24.2
Werkzeug==2.3.6
wheel==0.38.4
wrapt==1.15.0
zipp==3.16.2
Downgrading to 1.28.1 fixes the issue
Expected Result
Populated "text" field in requests response object
Actual Result
The response is "stuck" in the raw HTTPResponse from urllib3
Reacted by Andreas Profous and Björn Petersen
Metadata
Metadata
Assignees
Labels
Projects
- StatusShow more project fieldsNo status



Activity
sentrivana commentedon Aug 1, 2023
Hey @reinoldus, thanks for the report! Please downgrade to 1.28.1 for now, we're working on a fix.
sentrivana commentedon Aug 1, 2023
1.29.1 released now that should fix the issue.
lpfann commentedon Aug 1, 2023
Now we get a different issue with 1.29.1: (using sgqlc library)
@sentrivana
sentrivana commentedon Aug 1, 2023
@lpfann Thanks for reporting, looking into it. (In the meantime, downgrading to 1.28.1 will get rid of the issue.)
MattLJoslin commentedon Aug 1, 2023
We're also seeing the same set of issues. Downgrading to 1.28.1 seems to fix for now.
sentrivana commentedon Aug 1, 2023
@lpfann Having trouble reproducing this -- anything specific about your setup? Maybe a small code sample?
MattLJoslin commentedon Aug 1, 2023
We are using
graphql-core==3.2.1
gql==3.4.0
requests==2.28.2
urllib3==1.26.16
this is a rough snippet of the code that is causing this issue
import requests
from gql import gql as gql_parse
from gql.client import Client
from gql.transport.requests import RequestsHTTPTransport
query_str = """"""
data_url = ""
variables = {}
userpass_data_headers = {}
reqsession = requests.Session()
adapter = requests.adapters.HTTPAdapter(pool_connections=100, pool_maxsize=100)
reqsession.mount('https://', adapter)
sync_transport = RequestsHTTPTransport(
url=data_url, headers=userpass_data_headers
)
_client = Client(
transport=sync_transport, fetch_schema_from_transport=True
)
session = _client.enter()
query = gql_parse(query_str)
data_obj = session.execute(query, variable_values=variables)
sentrivana commentedon Aug 1, 2023
Thanks a lot @MattLJoslin! This will help.
I'll revert the feature that caused this for now so that more folks don't run into issues -- we'll revisit it later. Really sorry for the issues this caused.
sentrivana commentedon Aug 1, 2023
1.29.2 is now out and will get you all the good stuff from 1.29.0 without the GraphQL issues.
MattLJoslin commentedon Aug 1, 2023
Thanks for the quick responses! We are still looking forward to this feature since we almost exclusively use graphql in our services, but appreciate the rollback :)