Skip to content
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

Fix Celery tests in POTel #3772

Draft
wants to merge 26 commits into
base: potel-base
Choose a base branch
from
Draft

Conversation

antonpirker
Copy link
Member

No description provided.

Copy link

codecov bot commented Nov 13, 2024

❌ 141 Tests Failed:

Tests completed Failed Passed Skipped
16733 141 16592 3851
View the top 3 failed tests by shortest run time
 tests.integrations.sanic.test_sanic
Stack Traces | 0s run time
.../hostedtoolcache/Python/3.8.18.../x64/lib/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1014: in _gcd_import
    ???
<frozen importlib._bootstrap>:991: in _find_and_load
    ???
<frozen importlib._bootstrap>:961: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:219: in _call_with_frames_removed
    ???
<frozen importlib._bootstrap>:1014: in _gcd_import
    ???
<frozen importlib._bootstrap>:991: in _find_and_load
    ???
<frozen importlib._bootstrap>:975: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:671: in _load_unlocked
    ???
<frozen importlib._bootstrap_external>:843: in exec_module
    ???
<frozen importlib._bootstrap>:219: in _call_with_frames_removed
    ???
.../integrations/sanic/__init__.py:3: in <module>
    pytest.importorskip("sanic")
.tox/py3.8-sanic-latest/lib/python3.8.../site-packages/sanic/__init__.py:6: in <module>
    from sanic.app import Sanic
.tox/py3.8-sanic-latest/lib/python3.8.../site-packages/sanic/app.py:50: in <module>
    from sanic.application.state import ApplicationState, ServerStage
.tox/py3.8-sanic-latest/lib/python3.8.../sanic/application/state.py:12: in <module>
    from sanic.log import VerbosityFilter, logger
.tox/py3.8-sanic-latest/lib/python3.8.../site-packages/sanic/log.py:1: in <module>
    from sanic.logging.color import Colors
.tox/py3.8-sanic-latest/lib/python3.8.../sanic/logging/color.py:8: in <module>
    from sanic.helpers import is_atty
.tox/py3.8-sanic-latest/lib/python3.8.../site-packages/sanic/helpers.py:21: in <module>
    STATUS_CODES: dict[int, bytes] = {
E   TypeError: 'type' object is not subscriptable
tests.integrations.opentelemetry.test_utils test_extract_span_data[OTel Span FaaS-status3-attributes3-expected3]
Stack Traces | 0.002s run time
.../integrations/opentelemetry/test_utils.py:87: in test_extract_span_data
    assert result == expected
E   AssertionError: assert {'op': 'OTel Span FaaS', 'description': 'OTel Span FaaS', 'status': None, 'http_status_code': None, 'origin': None} == {'op': 'pubsub', 'description': 'OTel Span FaaS', 'status': None, 'http_status_code': None, 'origin': None}
E     
E     Common items:
E     {'description': 'OTel Span FaaS',
E      'http_status_code': None,
E      'origin': None,
E      'status': None}
E     Differing items:
E     {'op': 'OTel Span FaaS'} != {'op': 'pubsub'}
E     
E     Full diff:
E       {
E           'description': 'OTel Span FaaS',
E           'http_status_code': None,
E     -     'op': 'pubsub',
E     +     'op': 'OTel Span FaaS',
E           'origin': None,
E           'status': None,
E       }
tests.integrations.opentelemetry.test_utils test_extract_span_data[OTel Span FaaS-status3-attributes3-expected3]
Stack Traces | 0.002s run time
.../integrations/opentelemetry/test_utils.py:87: in test_extract_span_data
    assert result == expected
E   AssertionError: assert {'op': 'OTel Span FaaS', 'description': 'OTel Span FaaS', 'status': None, 'http_status_code': None, 'origin': None} == {'op': 'pubsub', 'description': 'OTel Span FaaS', 'status': None, 'http_status_code': None, 'origin': None}
E     
E     Common items:
E     {'description': 'OTel Span FaaS',
E      'http_status_code': None,
E      'origin': None,
E      'status': None}
E     Differing items:
E     {'op': 'OTel Span FaaS'} != {'op': 'pubsub'}
E     
E     Full diff:
E       {
E           'description': 'OTel Span FaaS',
E           'http_status_code': None,
E     -     'op': 'pubsub',
E     +     'op': 'OTel Span FaaS',
E           'origin': None,
E           'status': None,
E       }

To view more test analytics, go to the Test Analytics Dashboard
📢 Thoughts on this report? Let us know!

Comment on lines 223 to 228
assert execution_event["spans"][0] == ApproxDict({
"trace_id": str(span.trace_id),
"same_process_as_parent": True,
"op": "queue.process",
"description": "dummy_task",
})
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This just makes the diff of failing tests way easier to read

sentry_sdk/tracing.py Outdated Show resolved Hide resolved
@antonpirker antonpirker marked this pull request as draft December 4, 2024 14:39
@antonpirker antonpirker changed the title Fix Celery tests in Potel Fix Celery tests in POTel Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants