{{ message }}
Repository navigation
Fix chord errbacks given as a single signature - #10907
Open
avanish-garg wants to merge 2 commits into
Open
avanish-garg wants to merge 2 commits into
avanish-garg wants to merge 2 commits into
Conversation
link_error may hold a single signature or a list of them, and every
other reader wraps it with maybe_list(). chord_error_from_stack() and
_handle_group_chord_error() iterated it directly, so a chord body with
a single errback (e.g. body.set(link_error=eb.s())) iterated the
signature's keys: the errback never ran and one bogus task per key
('task', 'args', 'kwargs', ...) was published instead.
auvipy
self-requested a review
October 21, 2026 09:59
MehrazRumman
left a comment
Contributor
There was a problem hiding this comment.
Checked at d34bda9.
- The fix is right.
link_errorcan hold a single signature (sig.set(link_error=eb.s())), and aSignatureis adict, so iterating it yielded its keys.maybe_list(...) or []matches howcanvas.pyalready reads the option (lines 836 and 1201). After this change, those two sites inbackends/base.pywere the only remaining direct reads ofoptions['link_error']incelery/. The Redis backend's chord error path goes throughchord_error_from_stack, so it is covered too. t/unit/backends/test_base.pypasses (197 passed). The twosingle_signaturecases fail againstmain, and thelistcases pass on both.
CI: the three failed smoke jobs (test_worker_heartbeats, test_rpc_backend, test_task_queue_max_priority) never started their tests. Each one failed while downloading the useblacksmith/setup-docker-builder action ("download has timed out ... after 3 attempts"), and that cancelled the rest of the smoke matrix. It's a runner problem, not this change; a re-run should clear it.
Looks good to me.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Note: Before submitting this pull request, please review our contributing
guidelines.
Description
Fixes #10906
link_errormay hold a single signature or a list, and every other reader wraps it withmaybe_list().Backend.chord_error_from_stack()andBackend._handle_group_chord_error()iterated the option directly. A chord body with one errback, such astsum.s().set(link_error=eb.s()), therefore had the signature's keys iterated. The errback never ran, and one bogus task per key ('task','args','kwargs', ...) was published, showing up on the worker as "Received unregistered task of type 'task'". For a group body this happened once per body task.Changes:
celery/backends/base.py: both sites now passmaybe_list(<callback>.options.get("link_error")) or [], the same idiom used incanvas.pyandapp/task.py.t/unit/backends/test_base.py:test_chord_error_from_stack_accepts_a_single_errbackandtest_handle_group_chord_error_accepts_a_single_errback, each parametrized over a single signature and a list. The single-signature cases fail onmainand pass with this change.Testing:
pytest t/unit/backends t/unit/tasks: 1953 passed, 49 skipped, 1 xfailed..pre-commit-config.yaml, are clean on the changed files.No unregistered-task errors are logged on this branch.