Skip to content

[JENKINS-48821] Time remaining for all pipeline jobs is N/A #22497

Closed

Description

@jenkins-infra-bot

Since upgrading to Jenkins 2.100, all Jenkins Pipeline Jobs have started showing barber poles, and reporting the time left as N/A, despite some of them having run thousands of times, and should have plenty of run information to at least give some perspective on the time remaining.

 

As over 90% of our jobs now use pipeline or declarative pipeline, I thought that all jobs were experiencing the issue, however Freestyle projects seem to report their time remaining just fine


Originally reported by tomlarrow, imported from: Time remaining for all pipeline jobs is N/A
  • assignee: blanger
  • status: Resolved
  • priority: Minor
  • component(s): core, pipeline
  • label(s): 2.107.2-fixed, regression
  • resolution: Fixed
  • resolved: 2018-03-11T18:10:38+00:00
  • votes: 3
  • watchers: 13
  • imported: 2025-11-24
Raw content of original issue

Since upgrading to Jenkins 2.100, all Jenkins Pipeline Jobs have started showing barber poles, and reporting the time left as N/A, despite some of them having run thousands of times, and should have plenty of run information to at least give some perspective on the time remaining.

 

As over 90% of our jobs now use pipeline or declarative pipeline, I thought that all jobs were experiencing the issue, however Freestyle projects seem to report their time remaining just fine

  • environment: Jenkins 2.100. All other information in the support.zip
2 attachments

Activity

  1. jenkins-infra-bot commented on Jan 5, 2018

    @jenkins-infra-bot
    Author
  2. jenkins-infra-bot commented on Jan 8, 2018

    @jenkins-infra-bot
    Author
    abayer:
    • Original comment link
    • Raw content of original comment:

      So nothing changed but upgrading to core 2.100? What had you been on previously?

    So nothing changed but upgrading to core 2.100? What had you been on previously?

  3. jenkins-infra-bot commented on Jan 8, 2018

    @jenkins-infra-bot
    Author
    tomlarrow:
    • Original comment link
    • Raw content of original comment:

      We were on 2.98 previously, and in the recent week have upgraded from 2.97 to 2.98.  When we did the 2.97 to 2.98 conversion we faced an the issue where the nodes were not connecting.  In addition to updating the Swarm plugin from 3.6 to 3.7 we rebuilt the docker images containing our nodes to update Jenkins remoting client from 3.12 to 3.15

      I noticed the N/A a few times with jobs, after that, but it was when we went to 2.100 that they seemed to happen all the time.

      I did just watch a job which does most of the work on the slave, and was N/A for the entire time on the slave, jump to perform a task on the master.  While it was on the master, it did have an estimate.  So it seems to be something in the remoting which may not be reporting the time.

    We were on 2.98 previously, and in the recent week have upgraded from 2.97 to 2.98.  When we did the 2.97 to 2.98 conversion we faced an the issue where the nodes were not connecting.  In addition to updating the Swarm plugin from 3.6 to 3.7 we rebuilt the docker images containing our nodes to update Jenkins remoting client from 3.12 to 3.15

    I noticed the N/A a few times with jobs, after that, but it was when we went to 2.100 that they seemed to happen all the time.

    I did just watch a job which does most of the work on the slave, and was N/A for the entire time on the slave, jump to perform a task on the master.  While it was on the master, it did have an estimate.  So it seems to be something in the remoting which may not be reporting the time.

  4. jenkins-infra-bot commented on Jan 8, 2018

    @jenkins-infra-bot
    Author
    abayer:
    • Original comment link
    • Raw content of original comment:

      Ok, oleg_nenashev, any ideas on what might have changed recently in remoting that could be causing this?

    Ok, oleg_nenashev, any ideas on what might have changed recently in remoting that could be causing this?

  5. jenkins-infra-bot commented on Jan 8, 2018

    @jenkins-infra-bot
    Author
    abayer:
    • Original comment link
    • Raw content of original comment:

      Actually, looking a little more closely - ExecutorStepExecution.PlaceholderTask#getEstimatedDuration() is probably what's relevant here. And if you're seeing the estimate show up right on cases where it's not on an agent (i.e., not in a node block in the Pipeline), then there's definitely something awry there, probably with ExecutorStepExecution.PlaceholderTask#run(). I'll investigate.

    Actually, looking a little more closely - ExecutorStepExecution.PlaceholderTask#getEstimatedDuration() is probably what's relevant here. And if you're seeing the estimate show up right on cases where it's not on an agent (i.e., not in a node block in the Pipeline), then there's definitely something awry there, probably with ExecutorStepExecution.PlaceholderTask#run(). I'll investigate.

  6. jenkins-infra-bot commented on Jan 8, 2018

    @jenkins-infra-bot
    Author
    abayer:
    • Original comment link
    • Raw content of original comment:

      Well, joy, can't reproduce with core 2.100/remoting 3.15/latest of all Pipeline plugins, at least not via unit tests.

    Well, joy, can't reproduce with core 2.100/remoting 3.15/latest of all Pipeline plugins, at least not via unit tests.

  7. jenkins-infra-bot commented on Jan 17, 2018

    @jenkins-infra-bot
    Author
    tomlarrow:
    • Original comment link
    • Raw content of original comment:

      From the outside, it appears that https://build.kde.org/ may be experiencing the same issue.  From my unauthenticated view, all jobs are reporting N/A , and they are also on Jenkins 2.101 and using many pipeline jobs building on external nodes.  I just don't know if it is because I am unauthenticated which is the reason for me seeing N/A on all the jobs.

    From the outside, it appears that https://build.kde.org/ may be experiencing the same issue.  From my unauthenticated view, all jobs are reporting N/A , and they are also on Jenkins 2.101 and using many pipeline jobs building on external nodes.  I just don't know if it is because I am unauthenticated which is the reason for me seeing N/A on all the jobs.

  8. jenkins-infra-bot commented on Jan 17, 2018

    @jenkins-infra-bot
    Author
    abayer:
    • Original comment link
    • Raw content of original comment:

      oleg_nenashev - any ideas here? Feels like a core thing rather than a Pipeline thing, but it only pops up for Pipeline jobs...

    oleg_nenashev - any ideas here? Feels like a core thing rather than a Pipeline thing, but it only pops up for Pipeline jobs...

  9. jenkins-infra-bot commented on Jan 17, 2018

    @jenkins-infra-bot
    Author
    oleg_nenashev:

    abayer I'd bet it is an issue after JENKINS-48350 in 2.92

  10. jenkins-infra-bot commented on Jan 17, 2018

    @jenkins-infra-bot
    Author
    oleg_nenashev:
    • Original comment link
    • Raw content of original comment:

      CC jimilian. I was proposing an extra API in that PR, maybe we need to reconsider that

    CC jimilian. I was proposing an extra API in that PR, maybe we need to reconsider that

  11. jenkins-infra-bot commented on Jan 25, 2018

    @jenkins-infra-bot
    Author
    blanger:
    • Original comment link
    • Raw content of original comment:

      In hudson.model.Executor the executableEstimatedDuration is resetted always in the finally block at line 462. Moving this one line up, so it is only executed when there is no asynchronous execution, solved the problem for me.

      [...]
      458       } finally {
      459            if (asynchronousExecution == null) {
      460                finish2();
      461                executableEstimatedDuration = DEFAULT_ESTIMATED_DURATION;
      462            }
      463        }
      [...]
      

    In hudson.model.Executor the executableEstimatedDuration is resetted always in the finally block at line 462. Moving this one line up, so it is only executed when there is no asynchronous execution, solved the problem for me.

    [...]
    458       } finally {
    459    if (asynchronousExecution == null) {
    460finish2();
    461executableEstimatedDuration = DEFAULT_ESTIMATED_DURATION;
    462    }
    463}
    [...]
    
  12. jenkins-infra-bot commented on Feb 27, 2018

    @jenkins-infra-bot
    Author
    starfire_:
    • Original comment link
    • Raw content of original comment:

      This error also appears in 2.89.4

    This error also appears in 2.89.4

  13. jenkins-infra-bot commented on Mar 7, 2018

    @jenkins-infra-bot
    Author
  14. jenkins-infra-bot commented on Mar 10, 2018

    @jenkins-infra-bot
    Author
    scm_issue_link:
    • Original comment link
    • Raw content of original comment:

      Code changed in jenkins User: Berno Langer Path: core/src/main/java/hudson/model/Executor.java http://jenkins-ci.org/commit/jenkins/3fc392108ae382a4616964aa8bbb6b8cb9dff0dc Log: JENKINS-48821 - Don't forget estimated duration of asynchronous jobs (#3329)

      • Don't forget estimated duration of asynchronous jobs.

      When jobs are executed, the estimated duration is calculated, memorized and reseted when the job is finished.

      But when the job is executed asynchronously (e.g. as for pipeline scripts), the execution is just triggered. Therefore the estimated duration should remain - and not be reseted after triggering.

      JENKINS-48821: Time remaining for all pipeline jobs is N/A JENKINS-49616: Estimated time remaining NA

      • Reset cached estimated duration also when asynchronous job ends.

    Code changed in jenkins
    User: Berno Langer
    Path:
    core/src/main/java/hudson/model/Executor.java
    http://jenkins-ci.org/commit/jenkins/3fc392108ae382a4616964aa8bbb6b8cb9dff0dc
    Log:
    JENKINS-48821 - Don't forget estimated duration of asynchronous jobs (#3329)

    • Don't forget estimated duration of asynchronous jobs.

    When jobs are executed, the estimated duration is calculated, memorized
    and reseted when the job is finished.

    But when the job is executed asynchronously (e.g. as for pipeline
    scripts), the execution is just triggered. Therefore the estimated
    duration should remain - and not be reseted after triggering.

    JENKINS-48821: Time remaining for all pipeline jobs is N/A
    JENKINS-49616: Estimated time remaining NA

    • Reset cached estimated duration also when asynchronous job ends.
  15. jenkins-infra-bot commented on Mar 11, 2018

    @jenkins-infra-bot
    Author
    oleg_nenashev:
    • Original comment link
    • Raw content of original comment:

      The patch has been integrated towards 2.111

    The patch has been integrated towards 2.111

  16. jenkins-infra-bot commented on Apr 11, 2018

    @jenkins-infra-bot
    Author
    scm_issue_link:
    • Original comment link
    • Raw content of original comment:

      Code changed in jenkins User: Berno Langer Path: core/src/main/java/hudson/model/Executor.java http://jenkins-ci.org/commit/jenkins/1400918ddaef45470720e60d4d1dbfd2f6ac78d4 Log: JENKINS-48821 - Don't forget estimated duration of asynchronous jobs (#3329)

      • Don't forget estimated duration of asynchronous jobs.

      When jobs are executed, the estimated duration is calculated, memorized and reseted when the job is finished.

      But when the job is executed asynchronously (e.g. as for pipeline scripts), the execution is just triggered. Therefore the estimated duration should remain - and not be reseted after triggering.

      JENKINS-48821: Time remaining for all pipeline jobs is N/A JENKINS-49616: Estimated time remaining NA

      • Reset cached estimated duration also when asynchronous job ends.

      (cherry picked from commit 3fc392108ae382a4616964aa8bbb6b8cb9dff0dc)

    Code changed in jenkins
    User: Berno Langer
    Path:
    core/src/main/java/hudson/model/Executor.java
    http://jenkins-ci.org/commit/jenkins/1400918ddaef45470720e60d4d1dbfd2f6ac78d4
    Log:
    JENKINS-48821 - Don't forget estimated duration of asynchronous jobs (#3329)

    • Don't forget estimated duration of asynchronous jobs.

    When jobs are executed, the estimated duration is calculated, memorized
    and reseted when the job is finished.

    But when the job is executed asynchronously (e.g. as for pipeline
    scripts), the execution is just triggered. Therefore the estimated
    duration should remain - and not be reseted after triggering.

    JENKINS-48821: Time remaining for all pipeline jobs is N/A
    JENKINS-49616: Estimated time remaining NA

    • Reset cached estimated duration also when asynchronous job ends.

    (cherry picked from commit 3fc3921)

  17. jenkins-infra-bot commented on Nov 24, 2025

    @jenkins-infra-bot
    Author

    [Original is_duplicated_by from Jira: JENKINS-49616]

  18. removed
    bugFor changelog: Minor bug. Will be listed after features
    on Nov 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions