• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • core
    • Windows Server, running Jenkins 1.576 or 1.577 as service.

      Since Jenkins 1.576 (running as Windows service), some weather icons are missing. Instead, only the percentage is printed. This happens for some jobs, not for others. (it happen to be Maven jobs, I don't know whether that is relevant).

      This issue started in 1.576 (where also some plugin icons in the sidebar went missing), but persists in the latest 1.577.

      Note that the image apparently is loaded correctly, as some other jobs in the same percentage range get their icon printed correctly.
      When looking at the html sources of the broken icons, the img tag seems to be missing the src attributes with the image filename.
      Note that the same issue also occurs on the project details page, where the weather icons is normally printed at the top of the recent builds list.

        1. broken_weather.png
          broken_weather.png
          14 kB
        2. build.xml
          30 kB
        3. cobertura_notworst_missing.png
          cobertura_notworst_missing.png
          8 kB
        4. cobertura_worst_missing.png
          cobertura_worst_missing.png
          8 kB
        5. cobertura_worst_notmissing.png
          cobertura_worst_notmissing.png
          8 kB
        6. config.xml
          13 kB
        7. weather_img_notOK.png
          weather_img_notOK.png
          2 kB
        8. weather_img_OK.png
          weather_img_OK.png
          4 kB

          [JENKINS-24407] missing weather icons (randomly?)

          Daniel Beck added a comment -

          https://github.com/jenkinsci/jenkins/compare/jenkins-1.575...jenkins-1.576

          Just 62 commits changing 263 files, nothing major

          Missed your earlier comment, will try to reproduce the problem later today.

          Daniel Beck added a comment - https://github.com/jenkinsci/jenkins/compare/jenkins-1.575...jenkins-1.576 Just 62 commits changing 263 files, nothing major Missed your earlier comment, will try to reproduce the problem later today.

          Mike Hobbs added a comment -

          For what it's worth, we're able to fix the weather icons by rebuilding the projects (which re-runs Cobertura).

          Mike Hobbs added a comment - For what it's worth, we're able to fix the weather icons by rebuilding the projects (which re-runs Cobertura).

          Daniel Beck added a comment - - edited

          Reproduced the issue with the data provided by belpk: The 87% (worst health) HealthReport in question was serialized to disk from before the icon classname field existed (attached build.xml starting at line 581), and deserialization does not call the constructor, leaving the field null, hence no icon.

          There's no implementation of readResolve() in HealthReport, and ConverterImpl ignores this issue.

          Any builds created after the Jenkins update should contain the field in serialized form, and therefore show up correctly (making reproducing it rather difficult!).

          I'm preparing a fix right now.


          A workaround for everyone affected and not willing to wait for a fix would be to script changes to affected build.xml files. For every line like this:

          <iconUrl>health-80plus.png</iconUrl>

          Add a line below like this:

          <iconClassName>icon-health-80plus</iconClassName>

          Repeat for all other pairs of icon class name/icon URL defined here:
          https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/model/HealthReport.java#L50

          Then reload configuration from disk.

          Daniel Beck added a comment - - edited Reproduced the issue with the data provided by belpk : The 87% (worst health) HealthReport in question was serialized to disk from before the icon classname field existed (attached build.xml starting at line 581), and deserialization does not call the constructor, leaving the field null , hence no icon. There's no implementation of readResolve() in HealthReport , and ConverterImpl ignores this issue. Any builds created after the Jenkins update should contain the field in serialized form, and therefore show up correctly (making reproducing it rather difficult!). I'm preparing a fix right now. A workaround for everyone affected and not willing to wait for a fix would be to script changes to affected build.xml files. For every line like this: <iconUrl>health-80plus.png</iconUrl> Add a line below like this: <iconClassName>icon-health-80plus</iconClassName> Repeat for all other pairs of icon class name/icon URL defined here: https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/model/HealthReport.java#L50 Then reload configuration from disk.

          Daniel Beck added a comment -

          tfennelly: The following change causes the HealthReport to inialize properly from old on-disk data:
          https://github.com/daniel-beck/jenkins/commit/3a18c6ba1092bee3a0b1903aa42e838b37a72a60

          I'll create a PR for it if you don't merge this change by late Friday UTC so it has a chance to get in 1.580.

          Daniel Beck added a comment - tfennelly : The following change causes the HealthReport to inialize properly from old on-disk data: https://github.com/daniel-beck/jenkins/commit/3a18c6ba1092bee3a0b1903aa42e838b37a72a60 I'll create a PR for it if you don't merge this change by late Friday UTC so it has a chance to get in 1.580.

          K P added a comment -

          lowering priority, as eventually this should fix itself (after all jobs have run again - depends on the user's setup and workflow of course) and so doesn't seem broken permanently...

          K P added a comment - lowering priority, as eventually this should fix itself (after all jobs have run again - depends on the user's setup and workflow of course) and so doesn't seem broken permanently...

          Tom FENNELLY added a comment -

          Awesome... thanks guys (KP, Daniel, Mike etc). @Daniel... I'll look at that change/PR and merge it into master (after running a test build of course).

          Tom FENNELLY added a comment - Awesome... thanks guys (KP, Daniel, Mike etc). @Daniel... I'll look at that change/PR and merge it into master (after running a test build of course).

          Code changed in jenkins
          User: Daniel Beck
          Path:
          core/src/main/java/hudson/model/HealthReport.java
          http://jenkins-ci.org/commit/jenkins/990a84f75396fe942d2cbc690a7c047223b648dd
          Log:
          [FIXED JENKINS-24407] Restore icon class name during deserialization

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Daniel Beck Path: core/src/main/java/hudson/model/HealthReport.java http://jenkins-ci.org/commit/jenkins/990a84f75396fe942d2cbc690a7c047223b648dd Log: [FIXED JENKINS-24407] Restore icon class name during deserialization

          Tom FENNELLY added a comment - - edited

          Thanks Daniel... I pushed your fix upstream. I tweaked it very slightly... I'm sure you don't mind.

          Tom FENNELLY added a comment - - edited Thanks Daniel... I pushed your fix upstream. I tweaked it very slightly... I'm sure you don't mind.

          dogfood added a comment -

          Integrated in jenkins_main_trunk #3667
          [FIXED JENKINS-24407] Restore icon class name during deserialization (Revision 990a84f75396fe942d2cbc690a7c047223b648dd)

          Result = SUCCESS
          tom.fennelly : 990a84f75396fe942d2cbc690a7c047223b648dd
          Files :

          • core/src/main/java/hudson/model/HealthReport.java

          dogfood added a comment - Integrated in jenkins_main_trunk #3667 [FIXED JENKINS-24407] Restore icon class name during deserialization (Revision 990a84f75396fe942d2cbc690a7c047223b648dd) Result = SUCCESS tom.fennelly : 990a84f75396fe942d2cbc690a7c047223b648dd Files : core/src/main/java/hudson/model/HealthReport.java

          Daniel Beck added a comment -

          Tom: No problem, I just didn't bother to do that. It's nicer like this.

          Fix will be in 1.580 scheduled for release in ~10 days or so.

          Daniel Beck added a comment - Tom: No problem, I just didn't bother to do that. It's nicer like this. Fix will be in 1.580 scheduled for release in ~10 days or so.

            tfennelly Tom FENNELLY
            belpk K P
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: