-
Notifications
You must be signed in to change notification settings - Fork 803
starlette: Remove maximum version constraint #3456
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
Conversation
… unit tests. Fixed some warnings in unit tests.
|
@aabmass could you review as well and are you able to upgrade the requirements? I'm not comfortable enough to update the lockfiles. |
instrumentation/opentelemetry-instrumentation-starlette/tests/test_starlette_instrumentation.py
Outdated
Show resolved
Hide resolved
...entelemetry-instrumentation-starlette/src/opentelemetry/instrumentation/starlette/package.py
Show resolved
Hide resolved
…trap/test-requirements. Use setUp/tearDown iso decorator on test class
|
We should test the min version. |
|
@Kludex those oldest tests were indeed failing. I've increased the minimal version to 0.37.2. This one is a year old and didn't cause any problems with me. Is this acceptable? Older versions were causing this issue for me Kludex/starlette#2770 |
This reverts commit 08df2be.
|
PR is ready to be reviewed again @emdneto, if anything needs a change, feel free to put me to work again ;) |
instrumentation/opentelemetry-instrumentation-starlette/test-requirements.oldest.txt
Outdated
Show resolved
Hide resolved
instrumentation/opentelemetry-instrumentation-starlette/test-requirements.oldest.txt
Outdated
Show resolved
Hide resolved
That maybe be fixed by using an older httpx in the requirements. |
Conditional dependencies are not supported in |
Signed-off-by: emdneto <[email protected]>
…-contrib into issue/3317
Signed-off-by: emdneto <[email protected]>
Signed-off-by: emdneto <[email protected]>
Signed-off-by: emdneto <[email protected]>
Signed-off-by: emdneto <[email protected]>
Co-authored-by: Riccardo Magliocchetti <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the changelog fixed
instrumentation/opentelemetry-instrumentation-starlette/tests/test_starlette_instrumentation.py
Show resolved
Hide resolved
|
I know this is not the right place, so please don't ask me to create an issue... But can't we somehow modify the starlette instrumentation to work with FastAPI and just have one instead of 2? It's a subclass anyway, and it seems it covers the same points. Happy to talk or hack this at PyCon IT (cc @xrmx) |
Sure, we can discuss it at PyCon IT. |
…58b0 This PR updates the upstream OpenTelemetry Python dependency to its September 2025 release, upgrading from version 1.33.1/0.54b1 to 1.37.0/0.58b0. It also resolves several conflicts between the following OTel PRs and existing ADOT patches: starlette: Remove maximum version constraint open-telemetry/opentelemetry-python-contrib#3456 Make a BatchProcessor class which both BatchSpanRecordProcessor and BatchLogRecordProcessor can use open-telemetry/opentelemetry-python#4562 Make exporter timeout encompass retries/backoffs, add jitter to backoffs, cleanup code a bit open-telemetry/opentelemetry-python#4564 Update BatchSpanProcessor to use new BatchProcessor class open-telemetry/opentelemetry-python#4580 Fix issue where deadlock can occur over logging._lock open-telemetry/opentelemetry-python#4636 Tests Performed tox -e lint tox -e spellcheck tox -e 3.9-test-aws-opentelemetry-distro tox -e 3.10-test-aws-opentelemetry-distro tox -e 3.11-test-aws-opentelemetry-distro tox -e 3.12-test-aws-opentelemetry-distro tox -e 3.13-test-aws-opentelemetry-distro Smoke/contract tests: ./gradlew appsignals-tests:contract-tests:contractTests
…58b0 This PR updates the upstream OpenTelemetry Python dependency to its September 2025 release, upgrading from version 1.33.1/0.54b1 to 1.37.0/0.58b0. It also resolves several conflicts between the following OTel PRs and existing ADOT patches: starlette: Remove maximum version constraint open-telemetry/opentelemetry-python-contrib#3456 Make a BatchProcessor class which both BatchSpanRecordProcessor and BatchLogRecordProcessor can use open-telemetry/opentelemetry-python#4562 Make exporter timeout encompass retries/backoffs, add jitter to backoffs, cleanup code a bit open-telemetry/opentelemetry-python#4564 Update BatchSpanProcessor to use new BatchProcessor class open-telemetry/opentelemetry-python#4580 Fix issue where deadlock can occur over logging._lock open-telemetry/opentelemetry-python#4636 Tests Performed tox -e lint tox -e spellcheck tox -e 3.9-test-aws-opentelemetry-distro tox -e 3.10-test-aws-opentelemetry-distro tox -e 3.11-test-aws-opentelemetry-distro tox -e 3.12-test-aws-opentelemetry-distro tox -e 3.13-test-aws-opentelemetry-distro Smoke/contract tests: ./gradlew appsignals-tests:contract-tests:contractTests
…58b0 This PR updates the upstream OpenTelemetry Python dependency to its September 2025 release, upgrading from version 1.33.1/0.54b1 to 1.37.0/0.58b0. It also resolves several conflicts between the following OTel PRs and existing ADOT patches: starlette: Remove maximum version constraint open-telemetry/opentelemetry-python-contrib#3456 Make a BatchProcessor class which both BatchSpanRecordProcessor and BatchLogRecordProcessor can use open-telemetry/opentelemetry-python#4562 Make exporter timeout encompass retries/backoffs, add jitter to backoffs, cleanup code a bit open-telemetry/opentelemetry-python#4564 Update BatchSpanProcessor to use new BatchProcessor class open-telemetry/opentelemetry-python#4580 Fix issue where deadlock can occur over logging._lock open-telemetry/opentelemetry-python#4636 Tests Performed tox -e lint tox -e spellcheck tox -e 3.9-test-aws-opentelemetry-distro tox -e 3.10-test-aws-opentelemetry-distro tox -e 3.11-test-aws-opentelemetry-distro tox -e 3.12-test-aws-opentelemetry-distro tox -e 3.13-test-aws-opentelemetry-distro Smoke/contract tests: ./gradlew appsignals-tests:contract-tests:contractTests
…58b0 This PR updates the upstream OpenTelemetry Python dependency to its September 2025 release, upgrading from version 1.33.1/0.54b1 to 1.37.0/0.58b0. It also resolves several conflicts between the following OTel PRs and existing ADOT patches: starlette: Remove maximum version constraint open-telemetry/opentelemetry-python-contrib#3456 Make a BatchProcessor class which both BatchSpanRecordProcessor and BatchLogRecordProcessor can use open-telemetry/opentelemetry-python#4562 Make exporter timeout encompass retries/backoffs, add jitter to backoffs, cleanup code a bit open-telemetry/opentelemetry-python#4564 Update BatchSpanProcessor to use new BatchProcessor class open-telemetry/opentelemetry-python#4580 Fix issue where deadlock can occur over logging._lock open-telemetry/opentelemetry-python#4636 Tests Performed tox -e lint tox -e spellcheck tox -e 3.9-test-aws-opentelemetry-distro tox -e 3.10-test-aws-opentelemetry-distro tox -e 3.11-test-aws-opentelemetry-distro tox -e 3.12-test-aws-opentelemetry-distro tox -e 3.13-test-aws-opentelemetry-distro Smoke/contract tests: ./gradlew appsignals-tests:contract-tests:contractTests
…58b0 (#524) This PR updates the upstream OpenTelemetry Python dependency to its September 2025 release; Upgrading from version 1.33.1/0.54b1 to 1.37.0/0.58b0. It also resolves several conflicts between the following OTel PRs and existing ADOT patches: starlette: Remove maximum version constraint open-telemetry/opentelemetry-python-contrib#3456 Make a BatchProcessor class which both BatchSpanRecordProcessor and BatchLogRecordProcessor can use open-telemetry/opentelemetry-python#4562 Make exporter timeout encompass retries/backoffs, add jitter to backoffs, cleanup code a bit open-telemetry/opentelemetry-python#4564 Update BatchSpanProcessor to use new BatchProcessor class open-telemetry/opentelemetry-python#4580 Fix issue where deadlock can occur over logging._lock open-telemetry/opentelemetry-python#4636 Tests Performed tox -e lint tox -e spellcheck tox -e 3.9-test-aws-opentelemetry-distro tox -e 3.10-test-aws-opentelemetry-distro tox -e 3.11-test-aws-opentelemetry-distro tox -e 3.12-test-aws-opentelemetry-distro tox -e 3.13-test-aws-opentelemetry-distro Smoke/contract tests: ./gradlew appsignals-tests:contract-tests:contractTests By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Description
Remove maximum version constraint on starlette, by fixing unit tests. Fixed some warnings in unit tests.
Problem was that the environment was patched only during the
setUpexecution, and not during the tests themselves. By putting the patch decorator on the class itself, the environment variables are patched during the test class, as is done in another place in the same file.This PR also includes some small changes to reduce the amount of warnings encountered in the unit tests.
routeandroute_websocketdecoratorsStarletteInstrumentor._uninstrumentcan clear all instrumented apps, use adiscardi.s.o.removein the deletor of_InstrumentedStarletteto prevent aKeyErrorbeing raisedFixes #3317
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
All existing unit tests pass with the newest version of starlette (0.46.2)
Does This PR Require a Core Repo Change?
Checklist:
See contributing.md for styleguide, changelog guidelines, and more.