Skip to content

Fixes issue 4768. - #4790

Merged
thedrow merged 4 commits into
celery:masterfrom
xirdneh:issue/4768
Jun 3, 2018
Merged

thedrow merged 4 commits into
celery:masterfrom
xirdneh:issue/4768

Conversation

@xirdneh

@xirdneh xirdneh commented Jun 1, 2018 •

Copy link
Copy Markdown
Member

PR #4106 added a GroupResult's parent when converting the object to a tuple for easier access.
The parent was being returned as is. The parent needed to be returned as a tuple.
This way the entire result will be serializable.
Fixes issue #4768 by constructing the first value in a GroupResult's as_tuple return value the same way that AsyncResult does it.

@xirdneh xirdneh changed the title Fixes isseu 4768. Fixes issue 4768. Jun 1, 2018
@xirdneh

xirdneh commented Jun 1, 2018

Copy link
Copy Markdown
Member Author

Ah, forgot to run the rest of the tests locally.
Fixing failing tests...

@codecov

codecov Bot commented Jun 1, 2018 •

Copy link
Copy Markdown

Codecov Report

Merging #4790 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #4790   +/-   ##
=======================================
  Coverage   82.77%   82.77%           
=======================================
  Files         140      140           
  Lines       15930    15930           
  Branches     1995     1995           
=======================================
  Hits        13186    13186           
  Misses       2546     2546           
  Partials      198      198
Impacted Files Coverage Δ
celery/result.py 62.14% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 23401ba...1916113. Read the comment docs.

@auvipy auvipy added this to the v4.2 milestone Jun 2, 2018

@georgepsarakis georgepsarakis left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice work @xirdneh ! @badloop perhaps you would like to have a look as well?

@xirdneh

xirdneh commented Jun 2, 2018

Copy link
Copy Markdown
Member Author

While testing this I found out about another issue.
If one tries to build a graph with the result of the task that creates the group, it raises an exception because GroupResult is not hashable.
I'll open another issue and work on it on Monday.
Don't know if that would be another blocker for 4.2
Hopefully it won't.

@thedrow

thedrow commented Jun 3, 2018

Copy link
Copy Markdown
Contributor

Great job.
I'm going to merge this as this looks exactly like the right fix.

dfresh613 pushed a commit to dfresh613/celery that referenced this pull request Jul 21, 2018
* Returning GroupResult's parent as tuple for correct serialization

* Adding test task to return a GropuResult

* Change assert to check parent is tuple and not the id because of change for issue celery#4768

* Add previously deleted assert to check the parent id is in the rult tuple, and to avoid coverage decrease
dfresh613 pushed a commit to dfresh613/celery that referenced this pull request Jul 21, 2018
* Returning GroupResult's parent as tuple for correct serialization

* Adding test task to return a GropuResult

* Change assert to check parent is tuple and not the id because of change for issue celery#4768

* Add previously deleted assert to check the parent id is in the rult tuple, and to avoid coverage decrease
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants