-
Bug
-
Resolution: Unresolved
-
Minor
-
Jenkins ver. 2.190.2 run via the Docker image.
Blue Ocean 1.21.0
Blue Ocean Core JS 1.21.0
Dashboard for Blue Ocean 1.21.0
i18n for Blue Ocean 1.21.0
Personalization for Blue Ocean 1.21.0
Pipeline 2.6
Pipeline Graph Analysis Plugin 1.1
Pipeline implementation for Blue Ocean 1.21.0
Pipeline SCM API for Blue Ocean 1.21.0
Pipeline Utility Steps 2.3.1
Pipeline: API 2.37
Pipeline: Basic Steps 2.18
Pipeline: Build Step 2.9
Pipeline: Declarative 1.4.0
Pipeline: Declarative Agent API 1.1.1
Pipeline: Declarative Extension Points API 1.4.0
Pipeline: GitHub Groovy Libraries 1
Pipeline: Groovy 2.76
Pipeline: Input Step 2.11
Pipeline: Job 2.36
Pipeline: Milestone Step 1.3.1
Pipeline: Model API 1.4.0
Pipeline: Multibranch 2.21
Pipeline: Nodes and Processes 2.35
Pipeline: REST API Plugin 2.12
Pipeline: SCM Step 2.9
Pipeline: Shared Groovy Libraries 2.15
Pipeline: Stage Step 2.3
Pipeline: Stage Tags Metadata 1.4.0
Pipeline: Stage View Plugin 2.12
Pipeline: Step API 2.2
Pipeline: Supporting APIs 3.3
REST API for Blue Ocean 1.21.0
REST Implementation for Blue Ocean 1.21.0
Web for Blue Ocean 1.21.0Jenkins ver. 2.190.2 run via the Docker image. Blue Ocean 1.21.0 Blue Ocean Core JS 1.21.0 Dashboard for Blue Ocean 1.21.0 i18n for Blue Ocean 1.21.0 Personalization for Blue Ocean 1.21.0 Pipeline 2.6 Pipeline Graph Analysis Plugin 1.1 Pipeline implementation for Blue Ocean 1.21.0 Pipeline SCM API for Blue Ocean 1.21.0 Pipeline Utility Steps 2.3.1 Pipeline: API 2.37 Pipeline: Basic Steps 2.18 Pipeline: Build Step 2.9 Pipeline: Declarative 1.4.0 Pipeline: Declarative Agent API 1.1.1 Pipeline: Declarative Extension Points API 1.4.0 Pipeline: GitHub Groovy Libraries 1 Pipeline: Groovy 2.76 Pipeline: Input Step 2.11 Pipeline: Job 2.36 Pipeline: Milestone Step 1.3.1 Pipeline: Model API 1.4.0 Pipeline: Multibranch 2.21 Pipeline: Nodes and Processes 2.35 Pipeline: REST API Plugin 2.12 Pipeline: SCM Step 2.9 Pipeline: Shared Groovy Libraries 2.15 Pipeline: Stage Step 2.3 Pipeline: Stage Tags Metadata 1.4.0 Pipeline: Stage View Plugin 2.12 Pipeline: Step API 2.2 Pipeline: Supporting APIs 3.3 REST API for Blue Ocean 1.21.0 REST Implementation for Blue Ocean 1.21.0 Web for Blue Ocean 1.21.0
I'm experiencing an issue with the parallel step in scripted pipeline. I'm having trouble coming up with a reproducible example that doesn't involve pasting my entire script library, but hopefully I can still provide some hints as to where the error might be coming from.
An oversimplified example (that unfortunately does not cause the problem) looks like this:
parallel "a": { node { echo "A started" sh "sleep 30" echo "A finished" } }, "b": { node { echo "B started" sh "sleep 60" echo "B finished" // this step is NOT displayed in the UI. ?!?! } }, "c": { node { echo "C started" sh "sleep 30" echo "C finished" } }
In my case, the equivalent of the step "B finished" is never shown on the pipeline view. But It IS shown in the new window if you click "Display the log in new window"
At first I thought this was some problem with what's happening in stage b. But on further experimentation it seems to be a race condition of some kind. I can avoid the problem completely by adding arbitrary sleep steps to the other parallel stages:
parallel "a": { node { echo "A started" sh "sleep 30" echo "A finished" sh "sleep 30" // this works around the bug in stage b" } }, "b": { node { echo "B started" sh "sleep 60" echo "B finished" // this step WILL be displayed in the UI } }, "c": { node { echo "C started" sh "sleep 30" echo "C finished" sh "sleep 30" // this works around the bug in stage b" } }
In other words, it seems like the UI stops rendering the output of the "b" stage when either "a" or "c" has completed, even though the full execution of "b" is visible in the logs when viewed individually.