[JIRA] (JENKINS-36322) NaN execution time may appear if a stage gets terminated incorrectly

3 views
Skip to first unread message

jglick@cloudbees.com (JIRA)

unread,
Jun 29, 2016, 11:11:01 AM6/29/16
to jenkinsc...@googlegroups.com
Jesse Glick created an issue
 
Jenkins / Bug JENKINS-36322
NaN execution time may appear if a stage gets terminated incorrectly
Issue Type: Bug Bug
Assignee: Sam Van Oort
Attachments: workflow-with-nested-stage-declarations.png
Components: pipeline-stage-view-plugin
Created: 2016/Jun/29 3:10 PM
Priority: Minor Minor
Reporter: Jesse Glick
Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo

svanoort@cloudbees.com (JIRA)

unread,
Jun 29, 2016, 11:24:02 AM6/29/16
to jenkinsc...@googlegroups.com
Sam Van Oort commented on Bug JENKINS-36322
 
Re: NaN execution time may appear if a stage gets terminated incorrectly

Easy fix:

More comprehensive fix:

svanoort@cloudbees.com (JIRA)

unread,
Jun 29, 2016, 11:30:01 AM6/29/16
to jenkinsc...@googlegroups.com

Similar class of issue to JENKINS-34644 (something fishy in average timing calculation) and JENKINS-36023

svanoort@cloudbees.com (JIRA)

unread,
Sep 13, 2016, 11:15:02 AM9/13/16
to jenkinsc...@googlegroups.com

From my in-flight investigation, I strongly suspect this is because one or more stages have no timing info (field ), so they return NaN when you either try to read the value or parse it as an integer.

svanoort@cloudbees.com (JIRA)

unread,
Sep 13, 2016, 11:16:01 AM9/13/16
to jenkinsc...@googlegroups.com
Sam Van Oort edited a comment on Bug JENKINS-36322
From my in-flight investigation, I strongly suspect this is because one or more stages have no timing info (field ), so they return NaN when you either try to read the value or parse it as an integer.   Hiding NaN in UI templates will mask the issue but all the math around the estimates and average duration will be screwed up (NaN is like a virus).

Better to handle NaN/undefined at the source and convert to 0 duration/timing for the analysis.

jwillemsen@remedy.nl (JIRA)

unread,
Sep 21, 2016, 5:49:01 AM9/21/16
to jenkinsc...@googlegroups.com

jwillemsen@remedy.nl (JIRA)

unread,
Sep 21, 2016, 5:50:03 AM9/21/16
to jenkinsc...@googlegroups.com
Johnny Willemsen commented on Bug JENKINS-36322
 
Re: NaN execution time may appear if a stage gets terminated incorrectly

Added a screen dump with similar output but "NaNy NaNd"

scm_issue_link@java.net (JIRA)

unread,
Sep 29, 2016, 2:03:02 PM9/29/16
to jenkinsc...@googlegroups.com

Code changed in jenkins
User: Sam Van Oort
Path:
ui/src/main/js/view/templates/pipeline-staged.hbs
http://jenkins-ci.org/commit/pipeline-stage-view-plugin/a11279d0d3bb3ad133fdde26407a95a5637265bb
Log:
Do not display average durations that are 0 or NaN - JENKINS-36322

svanoort@cloudbees.com (JIRA)

unread,
Oct 4, 2016, 9:57:10 AM10/4/16
to jenkinsc...@googlegroups.com
Sam Van Oort started work on Bug JENKINS-36322
 
Change By: Sam Van Oort
Status: Open In Progress

vivek.pandey@gmail.com (JIRA)

unread,
Nov 19, 2018, 10:13:02 AM11/19/18
to jenkinsc...@googlegroups.com
Vivek Pandey updated an issue
 
Change By: Vivek Pandey
Labels: stageview-frontend triaged-2018-11
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

jwillemsen@remedy.nl (JIRA)

unread,
Nov 19, 2018, 10:21:06 AM11/19/18
to jenkinsc...@googlegroups.com
Johnny Willemsen updated an issue
Change By: Johnny Willemsen
Attachment: Screenshot_20181119_161957.png

jwillemsen@remedy.nl (JIRA)

unread,
Nov 19, 2018, 10:21:06 AM11/19/18
to jenkinsc...@googlegroups.com
Johnny Willemsen commented on Bug JENKINS-36322
 
Re: NaN execution time may appear if a stage gets terminated incorrectly

{{Also }}NaNy NaNd is shown for a pipeline which has a step with an expression, use the following pipeline job, just update label to match something in your jenkins
 
String foo

pipeline {
   agent {
  node {
  label 'fc29'
{{  }}}
{{ }}}

stages {
{{ stage('Create postbuild.sh') {}}
{{ when {}}
{{ expression { foo == "bar" }}}
{{ }}}
{{ steps {}}
{{ writeFile file: 'postbuild.sh', text: "bar"}}
{{ }}}
{{ }}}
{{ }}}
}

 

jwillemsen@remedy.nl (JIRA)

unread,
Nov 19, 2018, 10:22:08 AM11/19/18
to jenkinsc...@googlegroups.com
Johnny Willemsen edited a comment on Bug JENKINS-36322
{{ Also }} NaNy NaNd is shown for a pipeline which has a step with an expression, use the following pipeline job, just update label to match something in your jenkins
{quote}  
{{
String foo }}  

{{ String foo

pipeline { }}
{{   agent { }}
{{  node { }}
{{  label 'fc29' }}
{{  } }}
{{ } }}

{{ stages { }}
{{ stage('Create postbuild.sh') { }}
{{ when { }}
{{ expression \{ foo == "bar" } }}
{{ } }}
{{ steps { }}
{{ writeFile file: 'postbuild.sh', text: "bar"
} }
{{ } }}
{{ } }}
{{ } }}

{
{ quote } }}

 

{{!Screenshot_20181119_161957.png|thumbnail!}}

jwillemsen@remedy.nl (JIRA)

unread,
Nov 19, 2018, 10:22:09 AM11/19/18
to jenkinsc...@googlegroups.com
Johnny Willemsen edited a comment on Bug JENKINS-36322
Also NaNy NaNd is shown for a pipeline which has a step with an expression, use the following pipeline job, just update label to match something in your jenkins
{quote} 

{ { noformat }

String foo

pipeline
foopipeline {
agent {
node {
label 'fc29'
}
}


stages {
stage('Create postbuild.sh') {
when {
expression
\ { foo == "bar" }
}
steps {
writeFile file: 'postbuild.sh', text: "bar"
}
}
}
}

{ quote noformat }
{{!Screenshot_20181119_161957.png|thumbnail!}}

jwillemsen@remedy.nl (JIRA)

unread,
Nov 19, 2018, 10:23:03 AM11/19/18
to jenkinsc...@googlegroups.com
Johnny Willemsen edited a comment on Bug JENKINS-36322
Also NaNy NaNd is shown for a pipeline which has a step with an expression, use the following pipeline job, just update label to match something in your jenkins


{noformat}
String
foopipeline foo
pipeline
{
    agent {
      node {
        label 'fc29'
      }
    }
  
  stages {
      stage('Create postbuild.sh') {
        when {
          expression { foo == "bar" }
        }
        steps {
          writeFile file: 'postbuild.sh', text: "bar"
        }
      }
  }
}{noformat}
{{!Screenshot_20181119_161957.png|thumbnail!}}

jsoref+jenkins@gmail.com (JIRA)

unread,
Dec 5, 2018, 12:25:02 PM12/5/18
to jenkinsc...@googlegroups.com

jsoref+jenkins@gmail.com (JIRA)

unread,
Dec 5, 2018, 12:26:02 PM12/5/18
to jenkinsc...@googlegroups.com

jsoref+jenkins@gmail.com (JIRA)

unread,
Dec 5, 2018, 12:26:03 PM12/5/18
to jenkinsc...@googlegroups.com

dnusbaum@cloudbees.com (JIRA)

unread,
Jun 4, 2019, 11:18:05 AM6/4/19
to jenkinsc...@googlegroups.com
Devin Nusbaum resolved as Fixed
 

Fixed in version 2.11 of Pipeline Stage View.

Change By: Devin Nusbaum
Status: In Progress Resolved
Resolution: Fixed
Released As: pipeline-stage-view 2.11
Reply all
Reply to author
Forward
0 new messages