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

Bugfix - a task will run multiple times when chaining chains with groups #9021

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

DorSSS
Copy link

@DorSSS DorSSS commented May 13, 2024

Fixes #9020

On _chain.__or__ there is already a logic that knows to take a group/chord, and check if it needs an upgrade to chord. The problem is that if we chain 2 chains, it skips this logic and just constructs a chain from all the tasks, without any checks for an upgrade. Therefore, in a case where the first chain ends with a group, it will not create a chord.

Copy link

codecov bot commented May 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.78%. Comparing base (4cf6ba3) to head (89aa680).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9021      +/-   ##
==========================================
- Coverage   77.80%   77.78%   -0.02%     
==========================================
  Files         150      150              
  Lines       18682    18682              
  Branches     3194     3194              
==========================================
- Hits        14535    14532       -3     
- Misses       3854     3856       +2     
- Partials      293      294       +1     
Flag Coverage Δ
unittests 77.76% <100.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@auvipy auvipy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the approach seems reasonable, but I will wait for thorough review from Nusnus

Copy link

@pencil pencil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can confirm that this indeed fixes the test I proposed in #9013 🎉

celery/canvas.py Outdated Show resolved Hide resolved
pencil added a commit to Outset-AI/celery that referenced this pull request May 13, 2024
Co-authored-by: Nils Caspar <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

A task will run multiple times when chaining chains with groups
3 participants