2018-10-19 15:30:58,521 INFO Added a workflow. id_map: {-2: 1, -1: 2}
READY: [2]
WAITING: [1]
2018-10-19 15:30:58,526 INFO Created new dir
...
2018-10-19 15:30:58,578 INFO Rocket finished
COMPLETED: [1, 2]
rerunning
READY: [1, 2]
WAITING: []
The problem relies in the fact that now the parent state is not updated during the refreshof the child and since the refresh basically happens from the bottom the child still sees his parent as COMPLETED.
Coverage increased (+0.008%) to 60.499% when pulling 8aee33bf5512dd9a59dc4cadbed2cc31807e85c9 on gpetretto:bugfix into f55c2af89bae38005cc2a6c5d2371779a737f39e on materialsproject:master.
I have realized that this commit https://github.com/materialsproject/fireworks/commit/d9a71ac27cfd025af39f507137c407657e17dd38 have caused a regression. Consider the case with a fw
fw1
with one childfw2
and the whole wf is completed. Trying to rerunfw1
now results in having bothfw1
andfw2
READY
, instead offw2
beingWAITING
.Here is a piece of code demonstrating the problem
and its output
The problem relies in the fact that now the parent state is not updated during the
refresh
of the child and since the refresh basically happens from the bottom the child still sees his parent asCOMPLETED
.It is likely that the solution implemented is not the best but it does not impact on the improvements introduced in https://github.com/materialsproject/fireworks/commit/d9a71ac27cfd025af39f507137c407657e17dd38. An alternative would be to add a flag to
refresh
that allows to explicitly pull the current state of the parent fws if needed, like in the old implementation.I also modified one of the tests to help preventing this kind of regression.