-
Bug
-
Resolution: Fixed
-
Major
-
metrics plugin 4.1.6.2
jenkins 2.332.4
-
-
metrics:4.2.13-420.vea_2f17932dd6
In previous versions of metrics plugin we were adding RunResolver to provide a run which was further used to add SubTaskTimeInQueueAction as and when an item left the queue.
In this version 4.1.6.2 we have observed that SubTaskTimeInQueueAction is only added in taskCompleted method under the condition if Work Unit is not main work https://github.com/jenkinsci/metrics-plugin/blob/metrics-4.1.6.2/src/main/java/jenkins/metrics/impl/JenkinsMetricProviderImpl.java#L1008
But due to above condition it is not adding any of the sub task time as if you consider the Jenkins core code in WorkUnitContext this task completed is called https://github.com/jenkinsci/jenkins/blob/jenkins-2.332.4/core/src/main/java/hudson/model/queue/WorkUnitContext.java#L177 under condition https://github.com/jenkinsci/jenkins/blob/jenkins-2.332.4/core/src/main/java/hudson/model/queue/WorkUnitContext.java#L171.
ISSUE:-
Essentially it means WorkUnitContext will call taskCompleted in the condition if Work unit is main work and in the metrics plugin we are checking if the Work Unit is not the main work only then add sub task times.
Due to above scenario we see a regression and we are not able to see the sub task times being present and on the UI we only see the main queue time.
- is caused by
-
JENKINS-66506 Ever increasing number of threads in the metrics plugin
- Resolved