Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-50030

Job.getEstimatedDurationCandidates should not force loading of builds

    XMLWordPrintable

Details

    Description

      View/index.jelly View/sidepanel.jelly ExecutorStepExecution/PlaceholderTask/PlaceholderExecutable/executorCell.jelly has been observed to trigger build loading:

      at groovy.lang.GroovyShell.parseClass(GroovyShell.java:688)
      at groovy.lang.GroovyShell.parse(GroovyShell.java:700)
      at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.reparse(CpsGroovyShell.java:67)
      at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.parseScript(CpsFlowExecution.java:430)
      at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.loadProgramAsync(CpsFlowExecution.java:527)
      at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.onLoad(CpsFlowExecution.java:502)
      at org.jenkinsci.plugins.workflow.job.WorkflowRun.onLoad(WorkflowRun.java:568)
      at hudson.model.RunMap.retrieve(RunMap.java:224)
      at hudson.model.RunMap.retrieve(RunMap.java:56)
      at jenkins.model.lazy.AbstractLazyLoadRunMap.load(AbstractLazyLoadRunMap.java:500)
      at jenkins.model.lazy.AbstractLazyLoadRunMap.load(AbstractLazyLoadRunMap.java:482)
      at jenkins.model.lazy.AbstractLazyLoadRunMap.getByNumber(AbstractLazyLoadRunMap.java:380)
      - locked <...> (a hudson.model.RunMap)
      at jenkins.model.lazy.AbstractLazyLoadRunMap.search(AbstractLazyLoadRunMap.java:345)
      at jenkins.model.lazy.AbstractLazyLoadRunMap.newestBuild(AbstractLazyLoadRunMap.java:275)
      at jenkins.model.lazy.LazyBuildMixIn.getLastBuild(LazyBuildMixIn.java:245)
      at org.jenkinsci.plugins.workflow.job.WorkflowJob.getLastBuild(WorkflowJob.java:244)
      at org.jenkinsci.plugins.workflow.job.WorkflowJob.getLastBuild(WorkflowJob.java:106)
      at hudson.model.Job.getEstimatedDurationCandidates(Job.java:1007)
      at hudson.model.Job.getEstimatedDuration(Job.java:1033)
      at hudson.model.Run.getEstimatedDuration(Run.java:2331)
      at org.jenkinsci.plugins.workflow.support.steps.ExecutorStepExecution$PlaceholderTask.getEstimatedDuration(ExecutorStepExecution.java:419)
      at org.jenkinsci.plugins.workflow.support.steps.ExecutorStepExecution$PlaceholderTask$PlaceholderExecutable.getEstimatedDuration(ExecutorStepExecution.java:614)
      at hudson.model.queue.Executables.getEstimatedDurationFor(Executables.java:78)
      

      This is unreasonableā€”the UI should not be forcing build loading. There was a recent optimization in JENKINS-48350, and JENKINS-45585 is partly to blame, but really getEstimatedDurationCandidates ought to be calling AbstractLazyLoadRunMap.getLoadedBuilds or otherwise declining to load builds which were not already loaded anyway.

      Attachments

        Issue Links

          Activity

            jglick Jesse Glick created issue -
            jglick Jesse Glick made changes -
            Field Original Value New Value
            Link This issue relates to JENKINS-45585 [ JENKINS-45585 ]
            jglick Jesse Glick made changes -
            Link This issue relates to JENKINS-48350 [ JENKINS-48350 ]
            jamesdumay James Dumay made changes -
            Remote Link This issue links to "CloudBees Internal OSS-2669 (Web Link)" [ 20568 ]

            People

              Unassigned Unassigned
              jglick Jesse Glick
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: