-
Notifications
You must be signed in to change notification settings - Fork 415
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
Installing ddtrace breaks tests with the jsonschema library #9950
Comments
Thanks for reporting this, @fr-ser - it's a weird one! We'll look into it. |
By now I know that the error is fixed with Python 3.9 if that helps |
Even weirder, when I just run using [EDIT] ...never mind, tox was controlling the version of Python! I can confirm that if I bump to 3.11 inside tox, it works fine. It's just with 3.8 that I see the problem. |
- Install ddtrace at the test.in level - Add tests for new and existing middleware functionality - Test with Python 3.11, not 3.8. This isn't just because we're upgrading to 3.11 across our repos, but also because I ran into a really weird bug with ddtrace and/or jsonschema that only occurs with Python 3.8: DataDog/dd-trace-py#9950
- Detect and log anomalous traces in DatadogDiagnosticMiddleware. - Drop Python 3.8 support and change to Python 3.11 minimum due to testing needs. - Add tests for existing middleware code Manual testing: 1. Install in devstack, add middleware to lms/envs/devstack.py, and enable Waffle flag. 2. Make some requests and observe lack of new logging. 3. Add `self.dd_tracer.current_root_span().finish()` to start of `process_view` (faking an anomalous trace) and reinstall in devstack 4. Make some more requests and observe log output like the following: `Anomalous Datadog local root span (duration already set): id = 66abf66b000000001168265a391d04a3; duration = 0.108 sec; worker age = 1.560 sec` Unit test improvements: - Install ddtrace at the test.in level - Add tests for new and existing middleware functionality - Test with Python 3.11, not 3.8. This isn't just because we're upgrading to 3.11 across our repos, but also because I ran into a really weird bug with ddtrace and/or jsonschema that only occurs with Python 3.8: DataDog/dd-trace-py#9950
Summary of problem
Just installing (not even using) the newest version of ddtrace causes the tests to break, when the
jsonschema
package is used.Which version of dd-trace-py are you using?
2.9.3
Which version of pip are you using?
pip 23.3.2 (python 3.8)
Which libraries and their versions are you using?
`pip freeze`
attrs==23.2.0 exceptiongroup==1.2.2 importlib_resources==6.4.0 iniconfig==2.0.0 jsonschema==4.23.0 jsonschema-specifications==2023.12.1 packaging==24.1 pkgutil_resolve_name==1.3.10 pluggy==1.5.0 pytest==8.3.2 referencing==0.35.1 rpds-py==0.19.1 tomli==2.0.1 zipp==3.19.2How can we reproduce your problem?
Here is a repository with a reproducible example: https://github.com/fr-ser/bug-example-ddtrace-jsonschema
Here is a summary of that repo:
poetry install --no-root
poetry run pytest
poetry remove ddtrace
poetry run pytest
What is the result that you get?
What is the result that you expected?
No error
The text was updated successfully, but these errors were encountered: