[JIRA] (JENKINS-49763) Duration time is incorrect in a parallel pipeline step.

7 views
Skip to first unread message

zxjlwt@126.com (JIRA)

unread,
Feb 27, 2018, 9:18:02 PM2/27/18
to jenkinsc...@googlegroups.com
suren pi updated an issue
 
Jenkins / Bug JENKINS-49763
Duration time is incorrect in a parallel pipeline step.
Change By: suren pi
Summary: During Duration time is incorrect in a parallel pipeline step.
Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)
Atlassian logo

zxjlwt@126.com (JIRA)

unread,
Feb 27, 2018, 9:19:02 PM2/27/18
to jenkinsc...@googlegroups.com
suren pi updated an issue
I got a negative number from pipeline workflow api, that is a during duration time.

andrew.bayer@gmail.com (JIRA)

unread,
Mar 7, 2018, 2:47:02 PM3/7/18
to jenkinsc...@googlegroups.com
Andrew Bayer updated an issue
Change By: Andrew Bayer
Component/s: pipeline-graph-analysis-plugin
Component/s: pipeline

bwalding@cloudbees.com (JIRA)

unread,
May 13, 2019, 11:38:02 PM5/13/19
to jenkinsc...@googlegroups.com
Ben Walding updated an issue
Change By: Ben Walding
Attachment: Screen Shot 2019-05-14 at 1.37.24 pm.png
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

bwalding@cloudbees.com (JIRA)

unread,
May 13, 2019, 11:40:01 PM5/13/19
to jenkinsc...@googlegroups.com
Ben Walding updated an issue
Change By: Ben Walding
Attachment: screenshot-1.png

bwalding@cloudbees.com (JIRA)

unread,
May 13, 2019, 11:41:03 PM5/13/19
to jenkinsc...@googlegroups.com
Ben Walding commented on Bug JENKINS-49763
 
Re: Duration time is incorrect in a parallel pipeline step.

I've reproduced this using a similar pipeline in declarative format.

Classic Stages View

BlueOcean View

Pipeline

Jenkinsfile
pipeline {
    agent {
        label "docker"
    }
    stages {
        stage('Step Serial') {
            steps {
                sh "sleep 5"
            }
        }

        stage('Step Parallel') {
            parallel {
                stage("Primary Branch") {
                    steps {
                        sh "sleep 4"
                    }
                }
                stage("Secondary Branch") {
                    steps {
                        sh "sleep 6"
                    }
                }
            }
        }
    }
}

REST Response

/blue/rest/organizations/jenkins/pipelines/test-timings/runs/3/nodes/?limit=10000

REST Response
[
  {
    "_class": "io.jenkins.blueocean.rest.impl.pipeline.PipelineNodeImpl",
    "_links": {
      "self": {
        "_class": "io.jenkins.blueocean.rest.hal.Link",
        "href": "/blue/rest/organizations/jenkins/pipelines/test-timings/runs/3/nodes/6/"
      },
      "actions": {
        "_class": "io.jenkins.blueocean.rest.hal.Link",
        "href": "/blue/rest/organizations/jenkins/pipelines/test-timings/runs/3/nodes/6/actions/"
      },
      "steps": {
        "_class": "io.jenkins.blueocean.rest.hal.Link",
        "href": "/blue/rest/organizations/jenkins/pipelines/test-timings/runs/3/nodes/6/steps/"
      }
    },
    "actions": [],
    "displayDescription": null,
    "displayName": "Step Serial",
    "durationInMillis": 5573,
    "id": "6",
    "input": null,
    "result": "SUCCESS",
    "startTime": "2019-05-14T03:31:27.174+0000",
    "state": "FINISHED",
    "type": "STAGE",
    "causeOfBlockage": null,
    "edges": [
      {
        "_class": "io.jenkins.blueocean.rest.impl.pipeline.PipelineNodeImpl$EdgeImpl",
        "id": "11",
        "type": "STAGE"
      }
    ],
    "firstParent": null,
    "restartable": true
  },
  {
    "_class": "io.jenkins.blueocean.rest.impl.pipeline.PipelineNodeImpl",
    "_links": {
      "self": {
        "_class": "io.jenkins.blueocean.rest.hal.Link",
        "href": "/blue/rest/organizations/jenkins/pipelines/test-timings/runs/3/nodes/11/"
      },
      "actions": {
        "_class": "io.jenkins.blueocean.rest.hal.Link",
        "href": "/blue/rest/organizations/jenkins/pipelines/test-timings/runs/3/nodes/11/actions/"
      },
      "steps": {
        "_class": "io.jenkins.blueocean.rest.hal.Link",
        "href": "/blue/rest/organizations/jenkins/pipelines/test-timings/runs/3/nodes/11/steps/"
      }
    },
    "actions": [],
    "displayDescription": null,
    "displayName": "Step Parallel",
    "durationInMillis": 31,
    "id": "11",
    "input": null,
    "result": "SUCCESS",
    "startTime": "2019-05-14T03:31:32.802+0000",
    "state": "FINISHED",
    "type": "STAGE",
    "causeOfBlockage": null,
    "edges": [
      {
        "_class": "io.jenkins.blueocean.rest.impl.pipeline.PipelineNodeImpl$EdgeImpl",
        "id": "14",
        "type": "PARALLEL"
      },
      {
        "_class": "io.jenkins.blueocean.rest.impl.pipeline.PipelineNodeImpl$EdgeImpl",
        "id": "15",
        "type": "PARALLEL"
      }
    ],
    "firstParent": "6",
    "restartable": true
  },
  {
    "_class": "io.jenkins.blueocean.rest.impl.pipeline.PipelineNodeImpl",
    "_links": {
      "self": {
        "_class": "io.jenkins.blueocean.rest.hal.Link",
        "href": "/blue/rest/organizations/jenkins/pipelines/test-timings/runs/3/nodes/14/"
      },
      "actions": {
        "_class": "io.jenkins.blueocean.rest.hal.Link",
        "href": "/blue/rest/organizations/jenkins/pipelines/test-timings/runs/3/nodes/14/actions/"
      },
      "steps": {
        "_class": "io.jenkins.blueocean.rest.hal.Link",
        "href": "/blue/rest/organizations/jenkins/pipelines/test-timings/runs/3/nodes/14/steps/"
      }
    },
    "actions": [],
    "displayDescription": null,
    "displayName": "Primary Branch",
    "durationInMillis": 22,
    "id": "14",
    "input": null,
    "result": "SUCCESS",
    "startTime": "2019-05-14T03:31:32.811+0000",
    "state": "FINISHED",
    "type": "PARALLEL",
    "causeOfBlockage": null,
    "edges": [],
    "firstParent": "11",
    "restartable": false
  },
  {
    "_class": "io.jenkins.blueocean.rest.impl.pipeline.PipelineNodeImpl",
    "_links": {
      "self": {
        "_class": "io.jenkins.blueocean.rest.hal.Link",
        "href": "/blue/rest/organizations/jenkins/pipelines/test-timings/runs/3/nodes/15/"
      },
      "actions": {
        "_class": "io.jenkins.blueocean.rest.hal.Link",
        "href": "/blue/rest/organizations/jenkins/pipelines/test-timings/runs/3/nodes/15/actions/"
      },
      "steps": {
        "_class": "io.jenkins.blueocean.rest.hal.Link",
        "href": "/blue/rest/organizations/jenkins/pipelines/test-timings/runs/3/nodes/15/steps/"
      }
    },
    "actions": [],
    "displayDescription": null,
    "displayName": "Secondary Branch",
    "durationInMillis": 19,
    "id": "15",
    "input": null,
    "result": "SUCCESS",
    "startTime": "2019-05-14T03:31:32.814+0000",
    "state": "FINISHED",
    "type": "PARALLEL",
    "causeOfBlockage": null,
    "edges": [],
    "firstParent": "11",
    "restartable": false
  }
]

bwalding@cloudbees.com (JIRA)

unread,
May 13, 2019, 11:44:02 PM5/13/19
to jenkinsc...@googlegroups.com

Note: my example doesn't show negatives, but does show the blueocean endpoint returning invalid timings for parallel stages, and not accumulating the time for the overall stage correctly. I suspect they're all issues in a similar section of code, so will leave my notes here.

Reply all
Reply to author
Forward
0 new messages