Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chain with a single task group #9012

Open
11 of 19 tasks
edwardreed81 opened this issue May 8, 2024 · 0 comments
Open
11 of 19 tasks

Chain with a single task group #9012

edwardreed81 opened this issue May 8, 2024 · 0 comments

Comments

@edwardreed81
Copy link

Checklist

  • I have verified that the issue exists against the main branch of Celery.
  • This has already been asked to the discussions forum first.
  • 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 main branch.
  • I have included all related issues and possible duplicate issues
    in this issue (If there are none, check this box anyway).
  • I have tried to reproduce the issue with pytest-celery and added the reproduction script below.

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 main 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

  • None

Environment & Settings

Celery version: 5.3.6 (emerald-rush)

celery report Output:

software -> celery:5.3.6 (emerald-rush) kombu:5.3.6 py:3.11.8
            billiard:4.2.0 py-amqp:5.2.0
platform -> system:Linux arch:64bit, ELF
            kernel version:6.1.66-1-lts imp:CPython
loader   -> celery.loaders.app.AppLoader
settings -> transport:amqp results:db+sqlite:///None

result_backend: 'db+sqlite:///None'
task_serializer: 'pickle'
result_serializer: 'pickle'
accept_content: ['pickle', 'json']
deprecated_settings: None

Steps to Reproduce

Required Dependencies

  • Minimal Python Version: N/A or Unknown
  • Minimal Celery Version: N/A or Unknown
  • Minimal Kombu Version: N/A or Unknown
  • Minimal Broker Version: N/A or Unknown
  • Minimal Result Backend Version: N/A or Unknown
  • Minimal OS and/or Kernel Version: N/A or Unknown
  • Minimal Broker Client Version: N/A or Unknown
  • Minimal Result Backend Client Version: N/A or Unknown

Python Packages

pip freeze Output:

amqp==5.2.0
annotated-types==0.6.0
anyio==4.3.0
argon2-cffi==23.1.0
argon2-cffi-bindings==21.2.0
arrow==1.3.0
asciitree==0.3.3
asttokens==2.4.1
async-lru==2.0.4
attrs==23.2.0
autograd==1.6.2
autograd-gamma==0.5.0
Babel==2.14.0
beautifulsoup4==4.12.3
bidict==0.23.1
billiard==4.2.0
bleach==6.1.0
Bottleneck==1.3.8
celery==5.3.6
certifi==2024.2.2
cffi==1.16.0
charset-normalizer==3.3.2
click==8.1.7
click-didyoumean==0.3.1
click-plugins==1.1.1
click-repl==0.3.0
cloudpickle==3.0.0
comm==0.2.1
contourpy==1.2.1
cycler==0.12.1
dask==2024.4.0
debugpy==1.8.1
decorator==5.1.1
defusedxml==0.7.1
dnspython==2.6.1
dotmap==1.3.30
email_validator==2.1.1
et-xmlfile==1.1.0
executing==2.0.1
fastapi==0.109.2
fasteners==0.19
fastjsonschema==2.19.1
fonttools==4.50.0
formulaic==1.0.1
fqdn==1.5.1
fsspec==2024.3.1
future==1.0.0
greenlet==3.0.3
h11==0.14.0
httpcore==1.0.4
httpx==0.27.0
idna==3.6
importlib_metadata==7.1.0
interface-meta==1.3.0
ipykernel==6.29.3
ipython==8.22.2
isoduration==20.11.0
jedi==0.19.1
Jinja2==3.1.3
joblib==1.3.2
json5==0.9.21
jsonpointer==2.4
jsonschema==4.21.1
jsonschema-specifications==2023.12.1
jupyter-events==0.9.0
jupyter-lsp==2.2.4
jupyter_client==8.6.0
jupyter_core==5.7.1
jupyter_server==2.13.0
jupyter_server_terminals==0.5.2
jupyterlab==4.1.3
jupyterlab_pygments==0.3.0
jupyterlab_server==2.25.3
kiwisolver==1.4.5
kombu==5.3.6
lifelines==0.28.0
llvmlite==0.42.0
locket==1.0.0
MarkupSafe==2.1.5
matplotlib==3.8.4
matplotlib-inline==0.1.6
mistune==3.0.2
msgpack==1.0.8
nbclient==0.9.0
nbconvert==7.16.2
nbformat==5.9.2
nest-asyncio==1.6.0
notebook_shim==0.2.4
numba==0.59.0
numcodecs==0.12.1
numpy==1.26.4
openpyxl==3.1.2
orjson==3.9.15
overrides==7.7.0
packaging==23.2
pandas==2.2.1
pandocfilters==1.5.1
parso==0.8.3
partd==1.4.1
pexpect==4.9.0
pillow==10.3.0
platformdirs==4.2.0
plotly==5.19.0
prometheus_client==0.20.0
prompt-toolkit==3.0.43
psutil==5.9.8
psycopg2-binary==2.9.9
ptyprocess==0.7.0
pure-eval==0.2.2
pyarrow==15.0.2
pycparser==2.21
pydantic==2.6.4
pydantic-extra-types==2.6.0
pydantic_core==2.16.3
Pygments==2.17.2
pyparsing==3.1.2
python-dateutil==2.9.0.post0
python-engineio==4.9.0
python-json-logger==2.0.7
python-socketio==5.11.2
pytz==2024.1
PyYAML==6.0.1
pyzmq==25.1.2
referencing==0.33.0
requests==2.31.0
rfc3339-validator==0.1.4
rfc3986-validator==0.1.1
rpds-py==0.18.0
scipy==1.13.0
Send2Trash==1.8.2
simple-websocket==1.0.0
six==1.16.0
sniffio==1.3.1
soupsieve==2.5
SQLAlchemy==2.0.28
sqlmodel==0.0.16
stack-data==0.6.3
starlette==0.36.3
tenacity==8.2.3
terminado==0.18.0
tinycss2==1.2.1
toolz==0.12.1
tornado==6.4
tqdm==4.66.2
traitlets==5.14.1
typer==0.9.4
types-python-dateutil==2.8.19.20240106
typing_extensions==4.10.0
tzdata==2024.1
uri-template==1.3.0
urllib3==2.2.1
uvicorn==0.27.1
vine==5.1.0
wcwidth==0.2.13
webcolors==1.13
webencodings==0.5.1
websocket-client==1.7.0
wrapt==1.16.0
wsproto==1.2.0
xarray==2024.2.0
zarr==2.17.1
zipp==3.18.1
zstandard==0.22.0

Other Dependencies

N/A

Minimally Reproducible Test Case

run_tasks = [run_task(...).s() for task in tasks]
chain = setup_task(...).s() | group(run_tasks)
result = chain.apply_async()

Expected Behavior

If tasks is length 1, result is type GroupResult

Actual Behavior

If tasks is length 1, result is type AsyncResult

It seems as though adding the group to a chain changes the group into a standalone task if there's only one task in the group.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant