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

Celery docker-tests fail #3338

Closed
jeremydvoss opened this issue Jun 7, 2023 · 1 comment
Closed

Celery docker-tests fail #3338

jeremydvoss opened this issue Jun 7, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@jeremydvoss
Copy link
Contributor

Non-contrib sibling issue for this

Describe your environment Checks that previously passed have started failing and block my pr:

=================================== FAILURES ===================================
__________________________ test_fn_exception_expected __________________________

celery_app = <Celery celery.tests at 0x7fbb1d780b50>
memory_exporter = <opentelemetry.sdk.trace.export.in_memory_span_exporter.InMemorySpanExporter object at 0x7fbb1d926f80>

    def test_fn_exception_expected(celery_app, memory_exporter):
        @celery_app.task(throws=(MyException,))
        def fn_exception():
            raise MyException("Task class is failing")
    
        result = fn_exception.apply()
    
        assert result.failed() is True
        assert "Task class is failing" in result.traceback
    
        spans = memory_exporter.get_finished_spans()
        assert len(spans) == 1
    
        span = spans[0]
    
>       assert span.status.is_ok is True
E       assert False is True
E        +  where False = <opentelemetry.trace.status.Status object at 0x7fbb1d7d6d40>.is_ok
E        +    where <opentelemetry.trace.status.Status object at 0x7fbb1d7d6d40> = <opentelemetry.sdk.trace.ReadableSpan object at 0x7fbb1d7d7b20>.status

celery/test_celery_functional.py:306: AssertionError
______________________ test_class_task_exception_excepted ______________________

celery_app = <Celery celery.tests at 0x7fbb1d6c9240>
memory_exporter = <opentelemetry.sdk.trace.export.in_memory_span_exporter.InMemorySpanExporter object at 0x7fbb1d683910>

    def test_class_task_exception_excepted(celery_app, memory_exporter):
        class BaseTask(celery_app.Task):
            throws = (MyException,)
    
            def run(self):
                raise MyException("Task class is failing")
    
        task = BaseTask()
        # register the Task class if it's available (required in Celery 4.0+)
        register_task = getattr(celery_app, "register_task", None)
        if register_task is not None:
            register_task(task)
    
        result = task.apply()
    
        assert result.failed() is True
        assert "Task class is failing" in result.traceback
    
        spans = memory_exporter.get_finished_spans()
        assert len(spans) == 1
    
        span = spans[0]
    
>       assert span.status.is_ok is True
E       assert False is True
E        +  where False = <opentelemetry.trace.status.Status object at 0x7fbb1d6fb910>.is_ok
E        +    where <opentelemetry.trace.status.Status object at 0x7fbb1d6fb910> = <opentelemetry.sdk.trace.ReadableSpan object at 0x7fbb1d6fbc40>.status

celery/test_celery_functional.py:446: AssertionError

Steps to reproduce
Make a pr

What is the expected behavior?
Checks pass

What is the actual behavior?
Checks fail

Additional context
Possibly related to open-telemetry/opentelemetry-python-contrib#653

@shalevr
Copy link
Member

shalevr commented Jun 11, 2023

It's an issue for Python contrib. I think we can close this issue here.

@shalevr shalevr closed this as completed Jun 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants