• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • core
    • None
    • Platform: All, OS: All

      The percentage reported by the build weather condition is wrong.
      If 3 of the last 5 builds failed, 39% is reported (40 would be correct), and if
      2 of the last 5 failed, 59% is reported (60 would be correct). I did not test
      the other ones, but expect them to be of by one too.

          [JENKINS-4286] wrong percentage

          robertl added a comment -

          Created an attachment (id=861)
          example showing wrong percentage

          robertl added a comment - Created an attachment (id=861) example showing wrong percentage

          Alan Harder added a comment - this appears to be intentional: https://hudson.dev.java.net/source/browse/hudson/trunk/hudson/main/core/src/main/java/hudson/model/Job.java?annotate=20684 see line 873. seems it has always been that way: https://hudson.dev.java.net/source/browse/hudson/trunk/hudson/main/core/src/main/java/hudson/model/Job.java?r1=3581&r2=3591 (2007-06-28)

          robertl added a comment -

          Hi, thanks for the fast reaction.
          However, I don't get the point behind "HACK: force e.g. 4/5 to be in the 60-79
          range". If it is because of the weather condition thingy, then the visualisation
          is wrong and should report 4/5 to be in the range 61-80.

          robertl added a comment - Hi, thanks for the fast reaction. However, I don't get the point behind "HACK: force e.g. 4/5 to be in the 60-79 range". If it is because of the weather condition thingy, then the visualisation is wrong and should report 4/5 to be in the range 61-80.

          Alan Harder added a comment -

          yes, I think this has to do with the "weather" calculation.. I think the icon
          for 80-100 is "sunny", so this hack makes 4/5 move down to 60-79 range (partly
          cloudy). what incorrect "visualisation" are you referring to in your comment?
          do you mean the icon in that row? your attachment shows the rainy icon, which
          is the icon for 20-39.

          one possibility here is changing how the icons are selected.. 0-20, 21-40,
          41-60, 61-80, 81-100. then the "hack" wouldn't be needed, as 80 would not show
          "sunny". I don't know if this would adversely affect anything else though..

          Alan Harder added a comment - yes, I think this has to do with the "weather" calculation.. I think the icon for 80-100 is "sunny", so this hack makes 4/5 move down to 60-79 range (partly cloudy). what incorrect "visualisation" are you referring to in your comment? do you mean the icon in that row? your attachment shows the rainy icon, which is the icon for 20-39. one possibility here is changing how the icons are selected.. 0-20, 21-40, 41-60, 61-80, 81-100. then the "hack" wouldn't be needed, as 80 would not show "sunny". I don't know if this would adversely affect anything else though..

          robertl added a comment -

          > what incorrect "visualisation" are you referring to in your comment?

          Well, it "should report 4/5 to be in the range 61-80" (not 60-79). So you get
          the weather condition you want. I vote for changing the icon selection range to
          0-20, 21-40, 41-60, 61-80, 81-100 and removing the "hack". However, like you, I
          also don't know if this would break anything else.

          robertl added a comment - > what incorrect "visualisation" are you referring to in your comment? Well, it "should report 4/5 to be in the range 61-80" (not 60-79). So you get the weather condition you want. I vote for changing the icon selection range to 0-20, 21-40, 41-60, 61-80, 81-100 and removing the "hack". However, like you, I also don't know if this would break anything else.

          Alan Harder added a comment -

          kohsuke couldn't think of any problems offhand.. I just tried it and it seems
          ok. So, let's give it a shot. Do test when this is released (1.322 or 323) and
          look for any issues, thanks.

          Alan Harder added a comment - kohsuke couldn't think of any problems offhand.. I just tried it and it seems ok. So, let's give it a shot. Do test when this is released (1.322 or 323) and look for any issues, thanks.

          Code changed in hudson
          User: : mindless
          Path:
          trunk/hudson/main/core/src/main/java/hudson/model/HealthReport.java
          trunk/hudson/main/core/src/main/java/hudson/model/Job.java
          http://fisheye4.cenqua.com/changelog/hudson/?cs=21152
          Log:
          [FIXED JENKINS-4286] Changed health level boundaries from 0-19, ... 80+
          to 0-20, 21-40, ... 81+ and removed hack in Job.java lowering build health
          scores by one so 4/5 wouldn't be "sunny". Now 80 is in the 2nd bracket so
          hack not needed.
          Left image filenames unchanged for compatibility, in case anyone uses
          these images for other things.

          SCM/JIRA link daemon added a comment - Code changed in hudson User: : mindless Path: trunk/hudson/main/core/src/main/java/hudson/model/HealthReport.java trunk/hudson/main/core/src/main/java/hudson/model/Job.java http://fisheye4.cenqua.com/changelog/hudson/?cs=21152 Log: [FIXED JENKINS-4286] Changed health level boundaries from 0-19, ... 80+ to 0-20, 21-40, ... 81+ and removed hack in Job.java lowering build health scores by one so 4/5 wouldn't be "sunny". Now 80 is in the 2nd bracket so hack not needed. Left image filenames unchanged for compatibility, in case anyone uses these images for other things.

          Alan Harder added a comment -

          .

          Alan Harder added a comment - .

            mindless Alan Harder
            robertl robertl
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: