-
Bug
-
Resolution: Incomplete
-
Major
-
None
The Pipeline Console view does not correctly show logs for parallel branches containing only a single stage.
Take the following example pipeline:
stage('start') {} parallel( 'Branch 1': { stage('one-one') { echo '1-1' } }, 'Branch 2': { stage('two-one') { echo '2-1' } stage('two-two') { echo '2-2' } } ) stage('end') {}
this results in a correct stage view
a correct-ish pipeline graph view (would expect "Branch 1" to be a label as "Branch 2", and the stage to be named one-one)
a correct-ish pipeline console tree view (same as above, stage name is lost)
Correct logs for the parallel branch with multiple stages
and no logs at all for the branch with only one stage
Adding a stage to "Branch 1" makes it work as it does in "Branch 2".
This seems to be a server-side issue, as the data coming from the /tree API endpoint are incorrect - see how "Branch 1" has an empty children array
{ "status": "ok", "data": { "stages": [ { "name": "start", "children": [], "state": "not_built", "completePercent": 50, "type": "STAGE", "title": "start", "id": "4", "seqContainerName": null, "nextSibling": null, "synthetic": false, "pauseDurationMillis": "Queued 0 ms", "startTimeMillis": "", "totalDurationMillis": "Took 0 ms", "isSequential": false }, { "name": "Parallel", "children": [ { "name": "Branch 1", "children": [], "state": "SUCCESS", "completePercent": 50, "type": "PARALLEL", "title": "Branch 1", "id": "9", "seqContainerName": null, "nextSibling": null, "synthetic": false, "pauseDurationMillis": "Queued 0 ms", "startTimeMillis": "Started 9 min 24 sec ago", "totalDurationMillis": "Took 40 ms", "isSequential": false }, { "name": "Branch 2", "children": [ { "name": "two-one", "children": [], "state": "SUCCESS", "completePercent": 50, "type": "STAGE", "title": "two-one", "id": "14", "seqContainerName": null, "nextSibling": null, "synthetic": false, "pauseDurationMillis": "Queued 0 ms", "startTimeMillis": "Started 9 min 24 sec ago", "totalDurationMillis": "Took 27 ms", "isSequential": false }, { "name": "two-two", "children": [], "state": "SUCCESS", "completePercent": 50, "type": "STAGE", "title": "two-two", "id": "23", "seqContainerName": null, "nextSibling": null, "synthetic": false, "pauseDurationMillis": "Queued 0 ms", "startTimeMillis": "Started 9 min 24 sec ago", "totalDurationMillis": "Took 20 ms", "isSequential": false } ], "state": "SUCCESS", "completePercent": 50, "type": "PARALLEL", "title": "Branch 2", "id": "10", "seqContainerName": null, "nextSibling": null, "synthetic": false, "pauseDurationMillis": "Queued 0 ms", "startTimeMillis": "Started 9 min 24 sec ago", "totalDurationMillis": "Took 38 ms", "isSequential": false } ], "state": "SUCCESS", "completePercent": 50, "type": "STAGE", "title": "Parallel", "id": "7", "seqContainerName": null, "nextSibling": null, "synthetic": false, "pauseDurationMillis": "Queued 0 ms", "startTimeMillis": "Started 0 ms ago", "totalDurationMillis": "Took 78 ms", "isSequential": false }, { "name": "end", "children": [], "state": "not_built", "completePercent": 50, "type": "STAGE", "title": "end", "id": "30", "seqContainerName": null, "nextSibling": null, "synthetic": false, "pauseDurationMillis": "Queued 0 ms", "startTimeMillis": "", "totalDurationMillis": "Took 0 ms", "isSequential": false } ], "complete": true } }
This leads to failures in those stages to be visible, but hardly understandable, as the user will need to go in the classic console view, and scroll/search for the error, or look at the stage view.