-
Notifications
You must be signed in to change notification settings - Fork 620
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
Bugfix/check future cancelled #2461
Bugfix/check future cancelled #2461
Conversation
…is causing a CancelledError Calling the exception() method when future is in the cancelled state is causing a CancelledError. we should check the cancelled state first and call f.exception() only if it's not cancelled.
Could you please add a test? Also #2392 looks a different solution of the same issue, like they choose to always pass an exception |
.../opentelemetry-instrumentation-asyncio/src/opentelemetry/instrumentation/asyncio/__init__.py
Show resolved
Hide resolved
instrumentation/opentelemetry-instrumentation-asyncio/tests/test_asyncio_future_cancellation.py
Show resolved
Hide resolved
@xrmx
|
.../opentelemetry-instrumentation-asyncio/src/opentelemetry/instrumentation/asyncio/__init__.py
Show resolved
Hide resolved
instrumentation/opentelemetry-instrumentation-asyncio/tests/test_asyncio_future_cancellation.py
Outdated
Show resolved
Hide resolved
instrumentation/opentelemetry-instrumentation-asyncio/tests/test_asyncio_future_cancellation.py
Outdated
Show resolved
Hide resolved
instrumentation/opentelemetry-instrumentation-asyncio/tests/test_asyncio_future_cancellation.py
Outdated
Show resolved
Hide resolved
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.
Thanks for the PR! Apologies for all the comments
instrumentation/opentelemetry-instrumentation-asyncio/tests/test_asyncio_future_cancellation.py
Outdated
Show resolved
Hide resolved
instrumentation/opentelemetry-instrumentation-asyncio/tests/test_asyncio_future_cancellation.py
Show resolved
Hide resolved
Pull Request is not mergeable
* Calling the exception() method when future is in the cancelled state is causing a CancelledError Calling the exception() method when future is in the cancelled state is causing a CancelledError. we should check the cancelled state first and call f.exception() only if it's not cancelled. * modify lint * modify lint * Update CHANGELOG.md * remove init() * add future cancelled test code * add future cancelled test code * add future cancelled test code * add future cancelled test code * add future cancelled test code * add future cancelled test code * lint * lint * remove if condition * modify test code * lint * lint * remove pytest --------- Co-authored-by: Diego Hurtado <[email protected]>
Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Using python auto instrumentation version 0.44b0 the real trace source is being deprecated.
Calling the exception() method when future is in the cancelled state is causing a CancelledError
Fixes #2460
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Does This PR Require a Core Repo Change?
Checklist:
See contributing.md for styleguide, changelog guidelines, and more.