Skip to content

Nested group(chain(group)) fails #5496

@p-eli

Description

@p-eli

Checklist

  • I have read the relevant section in the
    contribution guide
    on reporting bugs.
  • I have checked the issues list
    for similar or identical bug reports.
  • I have checked the pull requests list
    for existing proposed fixes.
  • I have checked the commit log
    to find out if the bug was already fixed in the master branch.
  • I have included all related issues and possible duplicate issues
    in this issue (If there are none, check this box anyway).

Mandatory Debugging Information

  • I have included the output of celery -A proj report in the issue.
    (if you are not able to do this, then at least specify the Celery
    version affected).
  • I have verified that the issue exists against the master branch of Celery.
  • I have included the contents of pip freeze in the issue.
  • I have included all the versions of all the external dependencies required
    to reproduce this bug.

Optional Debugging Information

  • I have tried reproducing the issue on more than one Python version
    and/or implementation.
  • I have tried reproducing the issue on more than one message broker and/or
    result backend.
  • I have tried reproducing the issue on more than one version of the message
    broker and/or result backend.
  • I have tried reproducing the issue on more than one operating system.
  • I have tried reproducing the issue on more than one workers pool.
  • I have tried reproducing the issue with autoscaling, retries,
    ETA/Countdown & rate limits disabled.
  • I have tried reproducing the issue after downgrading
    and/or upgrading Celery and its dependencies.

Related Issues and Possible Duplicates

Related Issues

  • None

Possible Duplicates

Environment & Settings

Celery version: 4.3.0

celery report Output:

software -> celery:4.3.0 (rhubarb) kombu:4.5.0 py:3.5.3
billiard:3.6.0.0 redis:3.2.1
platform -> system:Linux arch:64bit
kernel version:4.19.32-1-MANJARO imp:CPython
loader -> celery.loaders.app.AppLoader
settings -> transport:redis results:redis://redis:6379/1

broker_url: redis://redis:6379/1
result_backend: redis://redis:6379/1

Steps to Reproduce

Minimally Reproducible Test Case

Details

from celery import  group, chain
from tasks import task as t

# failing sequence
task = group([ t.si(),t.si(), chain( t.si(), group([ t.si(), t.si()]))])

# working sequence
task = group([ t.si(),t.si(), chain( t.si(), group([ t.si(), t.si()]), t.si())])

async_result = task.apply_async()
result = async_result.get()

Expected Behavior

Calling get return group result.

Actual Behavior

All task finish success but calling .get() fail with traceback:

Traceback (most recent call last):
  File "/my_app.py", line 111, in add_to_queue
    result = async_result.get()
  File "/root/.cache/pypoetry/virtualenvs/my_app/lib/python3.7/site-packages/celery/result.py", line 697, in get
    on_interval=on_interval,
  File "/root/.cache/pypoetry/virtualenvs/my_app/lib/python3.7/site-packages/celery/result.py", line 815, in join_native
    on_message, on_interval):
  File "/root/.cache/pypoetry/virtualenvs/my_app/lib/python3.7/site-packages/celery/backends/asynchronous.py", line 137, in iter_native
    if node._cache:
AttributeError: 'GroupResult' object has no attribute '_cache'

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions