[JIRA] (JENKINS-50030) Job.getEstimatedDurationCandidates should not force loading of builds

3 views
Skip to first unread message

jglick@cloudbees.com (JIRA)

unread,
Mar 8, 2018, 8:06:02 PM3/8/18
to jenkinsc...@googlegroups.com
Jesse Glick created an issue
 
Jenkins / Improvement JENKINS-50030
Job.getEstimatedDurationCandidates should not force loading of builds
Issue Type: Improvement Improvement
Assignee: Unassigned
Components: core
Created: 2018-03-09 01:05
Labels: lazy-loading performance pipeline
Priority: Major Major
Reporter: Jesse Glick

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.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)
Atlassian logo

dbeck@cloudbees.com (JIRA)

unread,
Mar 14, 2018, 6:55:01 AM3/14/18
to jenkinsc...@googlegroups.com

This is unreasonable—the UI should not be forcing build loading.

Disagree. IIRC, estimated duration looks at the five newest builds, which isn't unreasonable. There'd just be useless unknown build duration estimates if this were implemented.

Reply all
Reply to author
Forward
0 new messages