Repository navigation
task_replace chord inside chord fix (fixes #4368) - #4369
Conversation
auvipy
left a comment
There was a problem hiding this comment.
could you also add testcase to verify the changes?
|
What's the difference between the old code and the new code? |
|
The problem is that sig.freeze doesn't set group_id and chord for new task. that's we need to call sig.set before |
|
I don't understand why the call to |
|
@zpl ping? |
|
@thedrow, plz double check. it's NOT removed. it's replaced to sig.freeze(self.request.id) so it's replaced to sig.set + sig.freeze because sig.freeze don't store state for sig |
|
Looking at the code for The case where a nested chord's body is replaced still doesn't work with this patch, and it would be nice to fix that too. I can write tests for this. |
|
Thank you very much. I'm assigning the issue to you. You should be able to push to this branch. :) |
|
I've rebased this, added tests and made sure the fix applies to replaced bodies as well as header tasks. @zpl can you test to make sure your case is still fixed please? |
|
@AlexHill Can you please address the lint and test failures? |
|
Yep. I've just added some integration tests for |
| @@ -846,20 +846,20 @@ def replace(self, sig): | |||
|
|
|||
There was a problem hiding this comment.
The branch above is never entered during the test suite, i.e. 'chord' in sig.options is never true. I think this makes sense - for it to be true, we'd have to be replacing a task in a chord with another task that is a part of a different chord. I'm not sure how that would work - it might be worth just raising an exception in this branch rather than having this undefined untested behaviour in there.
|
Also when tests are added to a PR please remove the Needs Test Coverage label. |
Codecov Report
@@ Coverage Diff @@
## master #4369 +/- ##
==========================================
+ Coverage 82.46% 82.49% +0.02%
==========================================
Files 140 140
Lines 15873 15872 -1
Branches 1983 1982 -1
==========================================
+ Hits 13090 13093 +3
+ Misses 2583 2580 -3
+ Partials 200 199 -1
Continue to review full report at Codecov.
|
|
I've rebased and added the exception I described above, plus an accompanying test. Would be good if this could sneak into 4.2. |
Fixes #4368
Sorry, but I have no time to write unit tests, could someone help? Thanks.