-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Add xfail test for default queue/exchange fallback ignoring task_default_* settings #9765
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
Add xfail test for default queue/exchange fallback ignoring task_default_* settings #9765
Conversation
…o routing is used This test verifies that Celery currently ignores task_default_exchange_type and task_default_queue_type for the default 'celery' queue/exchange, falling back to 'direct' and 'classic' respectively. Marked as xfail with strict=True to track future fix.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9765 +/- ##
==========================================
- Coverage 78.52% 78.47% -0.05%
==========================================
Files 153 153
Lines 19130 19130
Branches 2533 2533
==========================================
- Hits 15021 15012 -9
- Misses 3821 3826 +5
- Partials 288 292 +4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Waits for both rabbit and redis ports Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
We need to figure out to fix this intermittent issue later.... raise TimeoutError(f"Timeout of {timeout}s exceeded") .tox/3.9-smoke/lib/python3.9/site-packages/pytest_docker_tools/utils.py:37: TimeoutError |
auvipy
left a comment
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.
how about increasing the timeout?
Description
This PR adds a regression-style test to demonstrate that Celery falls back to creating a celery queue of type classic and an exchange of type direct, even when task_default_queue_type and task_default_exchange_type are explicitly set.
The test is marked with @pytest.mark.xfail(strict=True) to:
Related Discussion
This issue was raised in the Celery GitHub discussion: #9742
Why it matters
When using quorum queues or non-direct exchanges (e.g. topic), users expect Celery to respect the configured defaults. This test makes the fallback behavior visible and prevents silent reintroduction if fixed upstream.
Fixing this likely involves changes in Kombu’s handling of default queue declarations when tasks are published without explicit routing.