So here's what I've got from digging (mostly to save my notes and provide transparency in case someone else sees something):
The build nominally completed with a failure (tests failed, and you ran an Error step which was not caught) in FlowEndNode ID 1692
But somehow the build.xml shows:
<head>1693:1696</head> (flowHead id : flowNodeId for that head)
And there are no flowNodes after 1692 in the storage.
So what I'm trying to figure out is:
- How did the iota, head, and finalFlowNode ID get bumped above 1692?
- Does this occur with simpler builds? Or does it only happen when there's some specific structure including parallels (as with this one)?
- Why are we even trying to resume the build? We're done, kaput, finished, finito! The FlowEndNode has been written, and build ended with Failure result (as it should).
This points to an issue specifically with the closedown of the build or checks on whether we need to resume the build (i.e. finished build showing as incomplete).
The second part first: there's a 'done' flag on the CpsFlowExecution which if true marks the execution as complete. ODDLY this is absent in the persisted build record, and that appears to be normal somehow (going back to v2.0 of this plugin it is not persisted by the ConverterImpl that does marshall/unmarshall).
Failing that, we look for having just a single head FlowNode (check!) and that head being a FlowEndNode (should have been the case?)
Now for the end-of-build log: the execution sets itself to 'done' (which is not persisted, since that logic was not changed), sets the stored heads to just the first head (should be the FlowEndNode), and the flushes FlowNode storage. However, the WorkflowRun saves itself when done.
1. Explicitly save 'done' in the flowExecution
2. Figure out why the FlowEndNode isn't ending up as the final head for the CpsFlowExecution thus signalling we're done done done.