Skip to content

Flaky celery test with pypy-3.8 ubuntu #3521

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

Open
xrmx opened this issue May 21, 2025 · 2 comments
Open

Flaky celery test with pypy-3.8 ubuntu #3521

xrmx opened this issue May 21, 2025 · 2 comments

Comments

@xrmx
Copy link
Contributor

xrmx commented May 21, 2025

=================================== FAILURES ===================================
________________________ TestMetrics.test_basic_metric _________________________

self = <tests.test_metrics.TestMetrics testMethod=test_basic_metric>

    def test_basic_metric(self):
        CeleryInstrumentor().instrument()
        start_time = default_timer()
        task_runtime_estimated = (default_timer() - start_time) * 1000
    
        metrics = self.get_metrics()
        CeleryInstrumentor().uninstrument()
>       self.assertEqual(len(metrics), 1)
E       AssertionError: 0 != 1

instrumentation/opentelemetry-instrumentation-celery/tests/test_metrics.py:46: AssertionError

CI run: https://github.com/open-telemetry/opentelemetry-python-contrib/actions/runs/15156691327/job/42613075177

@jomcgi
Copy link
Contributor

jomcgi commented May 25, 2025

This should be resolved when we drop support for Python 3.8
I've rebased #3399 so should be able to get final reviews / merge soon.

@rbagd
Copy link
Contributor

rbagd commented May 26, 2025

Not sure if this specifically Python 3.8 related, albeit definitely more common. I've hit similar issues in other versions as well.

I've reworked Celery metrics instrumentation recently in this PR, and with that the tests seem more robust to flakiness, albeit one does have to wait for tasks to finish properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants