fix: ensure execute_command is registered with Celery app at worker s…#63050
fix: ensure execute_command is registered with Celery app at worker s…#63050kalluripradeep wants to merge 4 commits intoapache:v2-11-testfrom
Conversation
potiuk
left a comment
There was a problem hiding this comment.
Nice! Thanks for investigation!
280c641 to
1eb4a9e
Compare
|
I added |
|
Nope. @kalluripradeep -> it does not seem to fix the problem. |
potiuk
left a comment
There was a problem hiding this comment.
Looks like the problem is not fixed
|
same error: |
|
@potiuk — the fix is correct but the docker-compose test installs |
Yes. Initially the cahnge was to "airflow-core" - but since you changed it now to providers, it needs to be done for main and indeed next versioin of celery provider. Which is what I kind of expected. Closing it - open a new one for main and in the meantime #63046 should be merged to release 2.11.2 |
@potiuk — opened #63110 targeting main with the same fix plus a regression test. Module-level import of |
When the Celery worker starts, it imports
appfromcelery_executor.pybutcelery_executor_utils.pywas never imported at module level. This meansexecute_commandnever gets registered as a Celery task when the worker boots, and thecelery_import_modulessignal handler never connects.This worked before because older Celery versions were more lenient about when tasks got registered. Celery provider 3.17.0 exposed this — workers start receiving messages before
_process_tasks()is ever called, soexecute_commandis unknown and messages get discarded:KeyError: 'execute_command'
Received unregistered task of type 'execute_command'. The message has been ignored and discarded.
Fix is a single import in
celery_executor.pysocelery_executor_utilsis loaded when the worker importsappat startup.Fixes #63043