You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would expect the orig_task to be replaced with replacement_chord and give expected output.
This is the expected output that I do see if task_allow_error_cb_on_chord_header is False, or if the orig_task is called without the link_error= callback:
$ poetry run python celery_bug.py
hello world
RESULT: body: ['header: arg0', 'header: arg1', 'header: arg2', 'header: arg3', 'header: arg4']]
Actual Behavior
Instead, I get this AttributeError:
$ poetry run python celery_bug.py
hello world
Traceback (most recent call last):
File "celery_bug.py", line 39, in <module>
main()
File "celery_bug.py", line 35, in main
print(f"RESULT: {res.get()}")
File "/Users/robertgalloway/Library/Caches/pypoetry/virtualenvs/rpg-play-aJQQ1jqR-py3.8/lib/python3.8/site-packages/celery/result.py", line 251, in get
return self.backend.wait_for_pending(
File "/Users/robertgalloway/Library/Caches/pypoetry/virtualenvs/rpg-play-aJQQ1jqR-py3.8/lib/python3.8/site-packages/celery/backends/asynchronous.py", line 223, in wait_for_pending
return result.maybe_throw(callback=callback, propagate=propagate)
File "/Users/robertgalloway/Library/Caches/pypoetry/virtualenvs/rpg-play-aJQQ1jqR-py3.8/lib/python3.8/site-packages/celery/result.py", line 365, in maybe_throw
self.throw(value, self._to_remote_traceback(tb))
File "/Users/robertgalloway/Library/Caches/pypoetry/virtualenvs/rpg-play-aJQQ1jqR-py3.8/lib/python3.8/site-packages/celery/result.py", line 358, in throw
self.on_ready.throw(*args, **kwargs)
File "/Users/robertgalloway/Library/Caches/pypoetry/virtualenvs/rpg-play-aJQQ1jqR-py3.8/lib/python3.8/site-packages/vine/promises.py", line 235, in throw
reraise(type(exc), exc, tb)
File "/Users/robertgalloway/Library/Caches/pypoetry/virtualenvs/rpg-play-aJQQ1jqR-py3.8/lib/python3.8/site-packages/vine/utils.py", line 27, in reraise
raise value
AttributeError: 'dict' object has no attribute 'clone'
I suspect the error is related to this code in the _chord.link_error() method:
ifself.app.conf.task_allow_error_cb_on_chord_header:
fortaskinmaybe_list(self.tasks) or []:
task.link_error(errback.clone(immutable=True))
The text was updated successfully, but these errors were encountered:
…nature`s (#8841)
* Another fix for `link_error` signatures being `dict`s instead of `Signature`s
Related to #8678
* whitespace
* typo
* adding unittest
* typo
Checklist
main
branch of Celery.contribution guide
on reporting bugs.
for similar or identical bug reports.
for existing proposed fixes.
to find out if the bug was already fixed in the main branch.
in this issue (If there are none, check this box anyway).
Mandatory Debugging Information
celery -A proj report
in the issue.(if you are not able to do this, then at least specify the Celery
version affected).
main
branch of Celery.pip freeze
in the issue.to reproduce this bug.
Optional Debugging Information
and/or implementation.
result backend.
broker and/or result backend.
ETA/Countdown & rate limits disabled.
and/or upgrading Celery and its dependencies.
Related Issues and Possible Duplicates
Related Issues
#8456
Possible Duplicates
Environment & Settings
Celery version: 5.3.6 (emerald-rush)
celery report
Output:Steps to Reproduce
Required Dependencies
Python Packages
pip freeze
Output:Other Dependencies
N/A
Minimally Reproducible Test Case
Expected Behavior
I would expect the
orig_task
to be replaced withreplacement_chord
and give expected output.This is the expected output that I do see if
task_allow_error_cb_on_chord_header
isFalse
, or if theorig_task
is called without thelink_error=
callback:Actual Behavior
Instead, I get this
AttributeError
:I suspect the error is related to this code in the
_chord.link_error()
method:The text was updated successfully, but these errors were encountered: