Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-5775

HTML Publisher plugin 0.2.2 - Report link missing after bounce

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • htmlpublisher-plugin
    • None
    • Development

      In Hudson, we use HTML publisher to archieve the reports. Whenever the Hudson is re-started (Server reboot) , the reports link shown on the builds within the job are getting de-linked and showns "Jobname - #BuildNumber"

      Snap shot is attached for your reference..
      1)Build with link available
      2)After bounce - Build with invalid link

      Thanks
      Balaji

        1. After bounce  -  Build with invalid link.JPG
          After bounce - Build with invalid link.JPG
          16 kB
        2. Build with link enabled.JPG
          Build with link enabled.JPG
          14 kB
        3. hudson_err.zip
          2 kB
        4. HUDSON-5775.patch
          4 kB
        5. HUDSON-5775-ver2.patch
          2 kB
        6. log.zip
          2 kB

          [JENKINS-5775] HTML Publisher plugin 0.2.2 - Report link missing after bounce

          arostfx added a comment -

          Am I correct that this will only make the broken "links" disappear, but it will not solve the problem that reports disappear after a Hudson restart?

          Thanks,
          /alex

          arostfx added a comment - Am I correct that this will only make the broken "links" disappear, but it will not solve the problem that reports disappear after a Hudson restart? Thanks, /alex

          mcrooney added a comment -

          arostfx, I'd be surprised if lkishalmi's commit affects this since you say the HTML logs still exist in those directories, but I'll see if I can attempt to reproduce this issue today and find out.

          mcrooney added a comment - arostfx, I'd be surprised if lkishalmi's commit affects this since you say the HTML logs still exist in those directories, but I'll see if I can attempt to reproduce this issue today and find out.

          istocia added a comment -

          Hello,

          I investigated this issue and coded some fix (please see attached file: JENKINS-5775.patch)
          Could you please take a look at it and work on official patch (file that need to be updated: HtmlPublisherTarget.java)?

          What was wrong?
          1) It was attempt to retrieve configuration from outer class
          2) But after restart of the hudson value of outer class was null (NPE was thrown)

          How is it changed in my fix?
          1) Passing instance of HtmlPublisherTarget to BaseHTMLAction and use it in methods

          Thanks,
          Pawel

          istocia added a comment - Hello, I investigated this issue and coded some fix (please see attached file: JENKINS-5775 .patch) Could you please take a look at it and work on official patch (file that need to be updated: HtmlPublisherTarget.java)? What was wrong? 1) It was attempt to retrieve configuration from outer class 2) But after restart of the hudson value of outer class was null (NPE was thrown) How is it changed in my fix? 1) Passing instance of HtmlPublisherTarget to BaseHTMLAction and use it in methods Thanks, Pawel

          mcrooney added a comment -

          Thanks so much for checking this out! I will attempt to test this out and release a fix by the end of the week. Does the fix work for you? If you have a second, a patch without line-ending changes could be helpful.

          mcrooney added a comment - Thanks so much for checking this out! I will attempt to test this out and release a fix by the end of the week. Does the fix work for you? If you have a second, a patch without line-ending changes could be helpful.

          istocia added a comment -

          I tested it and it worked.
          Of course it worked only for all builds that were handled with updated version of this plugin (no matter how many hudson restarts occurs in meantime).

          Please find corrected patch file (no changes to line endings): JENKINS-5775-ver2.patch

          Thanks,
          Pawel

          istocia added a comment - I tested it and it worked. Of course it worked only for all builds that were handled with updated version of this plugin (no matter how many hudson restarts occurs in meantime). Please find corrected patch file (no changes to line endings): JENKINS-5775 -ver2.patch Thanks, Pawel

          Code changed in hudson
          User: : mcrooney
          Path:
          trunk/hudson/plugins/htmlpublisher/src/main/java/htmlpublisher/HtmlPublisherTarget.java
          http://jenkins-ci.org/commit/30883
          Log:
          [htmlpublisher] apply patch to fix JENKINS-5775 for future builds of job-level reports

          SCM/JIRA link daemon added a comment - Code changed in hudson User: : mcrooney Path: trunk/hudson/plugins/htmlpublisher/src/main/java/htmlpublisher/HtmlPublisherTarget.java http://jenkins-ci.org/commit/30883 Log: [htmlpublisher] apply patch to fix JENKINS-5775 for future builds of job-level reports

          mcrooney added a comment -

          Thanks so much, I've tested and committed the v2 patch and will release it in the next version, at least fixing this for future builds. Since the reports for previous builds are still there, I wonder if there is a way to restore them?

          mcrooney added a comment - Thanks so much, I've tested and committed the v2 patch and will release it in the next version, at least fixing this for future builds. Since the reports for previous builds are still there, I wonder if there is a way to restore them?

          arostfx added a comment -

          Hello,

          thanks a lot for your help. I've upgraded to plugin version 0.3 now (Hudson 1.358).
          With that, upon report creation, I get Java errors on the Hudson console now. The reports are created, though.
          Could you please check?

          Thanks,
          /alex

          arostfx added a comment - Hello, thanks a lot for your help. I've upgraded to plugin version 0.3 now (Hudson 1.358). With that, upon report creation, I get Java errors on the Hudson console now. The reports are created, though. Could you please check? Thanks, /alex

          arostfx added a comment -

          Hudson errors from plugin version 0.3 and Hudson 1.358

          arostfx added a comment - Hudson errors from plugin version 0.3 and Hudson 1.358

          mcrooney added a comment -

          It would be best to open up a new bug for that please, thanks!

          mcrooney added a comment - It would be best to open up a new bug for that please, thanks!

            mcrooney mcrooney
            balajirangarajan balajirangarajan
            Votes:
            6 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: