Skip to content

Celery provider 3.17.0 also breaks Airflow 2.11 #63043

@potiuk

Description

@potiuk

Body

Unfortunately, the latest celery provider 3.17.0 also breaks apache-airflow 2.11.

When you run docker-compose tests with celery 3.17.0 where celery executor is used, you observe this error:

Please see
https://docs.celeryq.dev/en/latest/internals/protocol.html
for more information.

The full contents of the message body was:
b'[[["airflow", "tasks", "run", "example_bash_operator", "runme_0", "scheduled__2026-03-06T00:00:00+00:00", "--local", "--subdir", "/home/airflow/.local/lib/python3.10/site-packages/airflow/example_dags/example_bash_operator.py"]], {}, {"callbacks": null, "errbacks": null, "chain": null, "chord": null}]' (302b)

The full contents of the message headers:
{'lang': 'py', 'task': 'execute_command', 'id': 'a17f87c8-7c6d-4099-9124-7f3d62282137', 'shadow': None, 'eta': None, 'expires': None, 'group': None, 'group_index': None, 'retries': 0, 'timelimit': [None, None], 'root_id': 'a17f87c8-7c6d-4099-9124-7f3d62282137', 'parent_id': None, 'argsrepr': "[['airflow', 'tasks', 'run', 'example_bash_operator', 'runme_0', 'scheduled__2026-03-06T00:00:00+00:00', '--local', '--subdir', '/home/airflow/.local/lib/python3.10/site-packages/airflow/example_dags/example_bash_operator.py']]", 'kwargsrepr': '{}', 'origin': 'gen117@ccc05270b612', 'ignore_result': False, 'replaced_task_nesting': 0, 'stamped_headers': None, 'stamps': {}}

The delivery info for this task is:
{'exchange': '', 'routing_key': 'default'}
Traceback (most recent call last):
  File "/home/airflow/.local/lib/python3.10/site-packages/celery/worker/consumer/consumer.py", line 668, in on_task_received
    strategy = strategies[type_]
KeyError: 'execute_command'
[2026-03-07 17:06:43,451: ERROR/MainProcess] Received unregistered task of type 'execute_command'.
The message has been ignored and discarded.

Did you remember to import the module containing this task?
Or maybe you're using relative imports?

Please see
https://docs.celeryq.dev/en/latest/internals/protocol.html
for more information.

The full contents of the message body was:
b'[[["airflow", "tasks", "run", "example_bash_operator", "runme_0", "test_dag_run_id", "--local", "--subdir", "/home/airflow/.local/lib/python3.10/site-packages/airflow/example_dags/example_bash_operator.py"]], {}, {"callbacks": null, "errbacks": null, "chain": null, "chord": null}]' (281b)

The full contents of the message headers:
{'lang': 'py', 'task': 'execute_command', 'id': 'e3d7d3d8-aa93-4c52-97b7-73b916c0869d', 'shadow': None, 'eta': None, 'expires': None, 'group': None, 'group_index': None, 'retries': 0, 'timelimit': [None, None], 'root_id': 'e3d7d3d8-aa93-4c52-97b7-73b916c0869d', 'parent_id': None, 'argsrepr': "[['airflow', 'tasks', 'run', 'example_bash_operator', 'runme_0', 'test_dag_run_id', '--local', '--subdir', '/home/airflow/.local/lib/python3.10/site-packages/airflow/example_dags/example_bash_operator.py']]", 'kwargsrepr': '{}', 'origin': 'gen122@ccc05270b612', 'ignore_result': False, 'replaced_task_nesting': 0, 'stamped_headers': None, 'stamps': {}}

The delivery info for this task is:
{'exchange': '', 'routing_key': 'default'}
Traceback (most recent call last):
  File "/home/airflow/.local/lib/python3.10/site-packages/celery/worker/consumer/consumer.py", line 668, in on_task_received

    strategy = strategies[type_]
KeyError: 'execute_command'
[2026-03-07 17:06:43,456: ERROR/MainProcess] Received unregistered task of type 'execute_command'.
The message has been ignored and discarded.

Did you remember to import the module containing this task?
Or maybe you're using relative imports?

Please see
https://docs.celeryq.dev/en/latest/internals/protocol.html
for more information.

The full contents of the message body was:
b'[[["airflow", "tasks", "run", "example_bash_operator", "runme_2", "test_dag_run_id", "--local", "--subdir", "/home/airflow/.local/lib/python3.10/site-packages/airflow/example_dags/example_bash_operator.py"]], {}, {"callbacks": null, "errbacks": null, "chain": null, "chord": null}]' (281b)

The full contents of the message headers:
{'lang': 'py', 'task': 'execute_command', 'id': '45e1b0a8-8654-4a4b-bce9-a8d38f28f029', 'shadow': None, 'eta': None, 'expires': None, 'group': None, 'group_index': None, 'retries': 0, 'timelimit': [None, None], 'root_id': '45e1b0a8-8654-4a4b-bce9-a8d38f28f029', 'parent_id': None, 'argsrepr': "[['airflow', 'tasks', 'run', 'example_bash_operator', 'runme_2', 'test_dag_run_id', '--local', '--subdir', '/home/airflow/.local/lib/python3.10/site-packages/airflow/example_dags/example_bash_operator.py']]", 'kwargsrepr': '{}', 'origin': 'gen121@ccc05270b612', 'ignore_result': False, 'replaced_task_nesting': 0, 'stamped_headers': None, 'stamps': {}}

The delivery info for this task is:
{'exchange': '', 'routing_key': 'default'}
Traceback (most recent call last):
  File "/home/airflow/.local/lib/python3.10/site-packages/celery/worker/consumer/consumer.py", line 668, in on_task_received
    strategy = strategies[type_]
KeyError: 'execute_command'
[2026-03-07 17:06:43,462: ERROR/MainProcess] Received unregistered task of type 'execute_command'.
The message has been ignored and discarded.

Did you remember to import the module containing this task?
Or maybe you're using relative imports?

Please see
https://docs.celeryq.dev/en/latest/internals/protocol.html
for more information.

The full contents of the message body was:
b'[[["airflow", "tasks", "run", "example_bash_operator", "also_run_this", "scheduled__2026-03-06T00:00:00+00:00", "--local", "--subdir", "/home/airflow/.local/lib/python3.10/site-packages/airflow/example_dags/example_bash_operator.py"]], {}, {"callbacks": null, "errbacks": null, "chain": null, "chord": null}]' (308b)

The full contents of the message headers:
{'lang': 'py', 'task': 'execute_command', 'id': '39ddc219-4568-4920-94de-c77561d5e7f6', 'shadow': None, 'eta': None, 'expires': None, 'group': None, 'group_index': None, 'retries': 0, 'timelimit': [None, None], 'root_id': '39ddc219-4568-4920-94de-c77561d5e7f6', 'parent_id': None, 'argsrepr': "[['airflow', 'tasks', 'run', 'example_bash_operator', 'also_run_this', 'scheduled__2026-03-06T00:00:00+00:00', '--local', '--subdir', '/home/airflow/.local/lib/python3.10/site-packages/airflow/example_dags/example_bash_operator.py']]", 'kwargsrepr': '{}', 'origin': 'gen124@ccc05270b612', 'ignore_result': False, 'replaced_task_nesting': 0, 'stamped_headers': None, 'stamps': {}}

The delivery info for this task is:
{'exchange': '', 'routing_key': 'default'}
Traceback (most recent call last):
  File "/home/airflow/.local/lib/python3.10/site-packages/celery/worker/consumer/consumer.py", line 668, in on_task_received
    strategy = strategies[type_]
KeyError: 'execute_command'

You can see example failures here: https://github.com/apache/airflow/actions/runs/22802372551/job/66147065379?pr=61091#step:5:237

What I believe happens, when airflow 2.11.2 starts, it does not fully initiailize celery executor - it's probably connected to the recent changes about executor intiialization.

Committer

  • I acknowledge that I am a maintainer/committer of the Apache Airflow project.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions