[JIRA] [cloudbees-folder] (JENKINS-25073) Double-counting of health reports from child folders

2014-10-09 Thread jgl...@cloudbees.com (JIRA)














































Jesse Glick
 created  JENKINS-25073


Double-counting of health reports from child folders















Issue Type:


Bug



Assignee:


stephenconnolly



Components:


cloudbees-folder



Created:


09/Oct/14 2:51 PM



Description:


Folder.getBuildHealthReports looks like it is double-counting each child Folder. It does a recursive traversal of the folder, applying FolderHealthMetric.Reporter to each node (leaf or not). But a typical FolderHealthMetric like WorstChildHealthMetric also calls getHealthReport on the child Folder, which winds up calling Folder.getBuildHealthReports recursively! This seems like a mistake.

Possible fixes:


	Make WorstChildHealthMetric.ReporterImpl.observe (and any other similar impls) ignore a Folder it is given.
	Make Folder.getBuildHealthReports not ask a reporter to observe a Folder.
	Make Folder.getBuildHealthReports not do a recursive traversal, only asking about direct children.



My preference is for the third fix, as it leaves the reporter in control of the logic; if it needs a recursive call it can do one.

By the way, the awkward reflection code in getHealthReport suggests that we need an interface in Jenkins core, such as


interface ItemWithHealthReport extends Item {
HealthReport getBuildHealth();
ListHealthReport getBuildHealthReports();
}





Project:


Jenkins



Labels:


performance
health




Priority:


Major



Reporter:


Jesse Glick

























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
You received this message because you are subscribed to the Google Groups Jenkins Issues group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [cloudbees-folder] (JENKINS-25073) Double-counting of health reports from child folders

2014-10-09 Thread jgl...@cloudbees.com (JIRA)














































Jesse Glick
 commented on  JENKINS-25073


Double-counting of health reports from child folders















AverageChildHealthMetric in cloudbees-folders-plus already implements the first fix. (Oddly WorstChildHealthMetric did not get the analogous change.) This complicates doing the third fix a bit as old versions of cloudbees-folders-plus with new versions of cloudbees-folder would behave incorrectly (at least, not recursively) in AverageChildHealthMetric; however the regression would be pretty minor, and corrected simply by upgrading both.



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
You received this message because you are subscribed to the Google Groups Jenkins Issues group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [cloudbees-folder] (JENKINS-25073) Double-counting of health reports from child folders

2014-10-09 Thread jgl...@cloudbees.com (JIRA)














































Jesse Glick
 commented on  JENKINS-25073


Double-counting of health reports from child folders















Fix #3 would also be incompatible for, say, ProjectEnabledHealthMetric which logically should check for all (top-level?) contained AbstractProject instances, but is written to only consider the Item it is given. So while I do not like this API design it may be too late to change.

Fix #2 could also be incompatible in principle.



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
You received this message because you are subscribed to the Google Groups Jenkins Issues group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [cloudbees-folder] (JENKINS-25073) Double-counting of health reports from child folders

2014-10-09 Thread jgl...@cloudbees.com (JIRA)















































Jesse Glick
 assigned  JENKINS-25073 to Jesse Glick



Double-counting of health reports from child folders
















Change By:


Jesse Glick
(09/Oct/14 6:04 PM)




Assignee:


stephenconnolly
JesseGlick



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
You received this message because you are subscribed to the Google Groups Jenkins Issues group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [cloudbees-folder] (JENKINS-25073) Double-counting of health reports from child folders

2014-10-09 Thread jgl...@cloudbees.com (JIRA)














































Jesse Glick
 updated  JENKINS-25073


Double-counting of health reports from child folders
















Change By:


Jesse Glick
(09/Oct/14 6:04 PM)




Labels:


api
healthperformance



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
You received this message because you are subscribed to the Google Groups Jenkins Issues group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [cloudbees-folder] (JENKINS-25073) Double-counting of health reports from child folders

2014-10-09 Thread jgl...@cloudbees.com (JIRA)














































Jesse Glick
 started work on  JENKINS-25073


Double-counting of health reports from child folders
















Change By:


Jesse Glick
(09/Oct/14 6:05 PM)




Status:


Open
InProgress



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
You received this message because you are subscribed to the Google Groups Jenkins Issues group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [cloudbees-folder] (JENKINS-25073) Double-counting of health reports from child folders

2014-10-09 Thread scm_issue_l...@java.net (JIRA)














































SCM/JIRA link daemon
 commented on  JENKINS-25073


Double-counting of health reports from child folders















Code changed in jenkins
User: Jesse Glick
Path:
 src/main/java/com/cloudbees/hudson/plugins/folder/health/FolderHealthMetric.java
 src/main/java/com/cloudbees/hudson/plugins/folder/health/WorstChildHealthMetric.java
http://jenkins-ci.org/commit/cloudbees-folder-plugin/832860377665641de69fcc8848f7ce342ca980fd
Log:
  FIXED JENKINS-25073 Avoid double-counting health metrics from subfolders.





























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
You received this message because you are subscribed to the Google Groups Jenkins Issues group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [cloudbees-folder] (JENKINS-25073) Double-counting of health reports from child folders

2014-10-09 Thread scm_issue_l...@java.net (JIRA)















































SCM/JIRA link daemon
 resolved  JENKINS-25073 as Fixed


Double-counting of health reports from child folders
















Change By:


SCM/JIRA link daemon
(09/Oct/14 6:12 PM)




Status:


InProgress
Resolved





Resolution:


Fixed



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
You received this message because you are subscribed to the Google Groups Jenkins Issues group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.