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

Bring back BugInstance Reviews (Classifications and Comments) from Cloud in Details

      Showing the Reviews (Classification and Comment by Users) from the configured FindBugs Cloud was obviously achieved by sending a request to the "bug details url" (http://any.findbugs.cloud/<issueHash>?embed). The code for getting this URL template from the Cloud definition is now commented out as the FindBugs API has changed:

      In FindBugsParser#setCloudInformation
      // FIXME: This method has been removed in findbugs 2.0.0
      // bug.setDetailsUrlTemplate(cloud.getBugDetailsUrlTemplate());
      

      As this is a major feature of connecting to a FindBugs Cloud in the first place, I think this should be fixed to work again by addressing the current FindBugs API.

      Possible solutions I can think of:

      1. try to get the "details url template" by calling some other function.
        • Map<String, String> edu.umd.cs.findbugs.BugCollection.getXmlCloudDetails() is a candidate.
      2. Extend the model adding Collection<BugDesignation> to Bug and populate with the most-recent Designation of each Reviewer by calling appropriate functions of Cloud.

          [JENKINS-14225] Bring back BugInstance Reviews (Classifications and Comments) from Cloud in Details

          Vasil Dilchev added a comment -

          Here is a patch of the fix that made it work for me. I used the suggested method #1 - get the "bug details url" through BugsCollection.getXmlCloudDetails()

          Vasil Dilchev added a comment - Here is a patch of the fix that made it work for me. I used the suggested method #1 - get the "bug details url" through BugsCollection.getXmlCloudDetails()

          Code changed in jenkins
          User: Ulli Hafner
          Path:
          plugin/src/main/java/hudson/plugins/findbugs/parser/FindBugsParser.java
          http://jenkins-ci.org/commit/findbugs-plugin/f3d98a64ed07bb54831d2033a7a6a5f3c8874f9f
          Log:
          [FIXED JENKINS-14225] Fixed cloud details URL using the new 2.0.0. API.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: plugin/src/main/java/hudson/plugins/findbugs/parser/FindBugsParser.java http://jenkins-ci.org/commit/findbugs-plugin/f3d98a64ed07bb54831d2033a7a6a5f3c8874f9f Log: [FIXED JENKINS-14225] Fixed cloud details URL using the new 2.0.0. API.

          Vasil Dilchev added a comment - - edited

          Hello, Dr. Hafner,

          I found a mean bug that still prevents getting and evaluating user designations from the cloud at time of parsing. With my latest patch we only fixed the "ajax" call for blending in the html with designations directly from the cloud server into the browser.

          I can't provide a patch now, as I don't have latest sources, but it is a one-line change right after the lines changed in the patch (around line 300 in FindBugsParser, right before long FirstSeen = cloud.getFirstSeen(warning);).
          Add this line:

          // ensure cloud data is synchronized
          cloud.waitUntilIssueDataDownloaded();
          

          I have tested this locally and it brings back the first seen and number of comments!

          Vasil Dilchev added a comment - - edited Hello, Dr. Hafner, I found a mean bug that still prevents getting and evaluating user designations from the cloud at time of parsing. With my latest patch we only fixed the "ajax" call for blending in the html with designations directly from the cloud server into the browser. I can't provide a patch now, as I don't have latest sources, but it is a one-line change right after the lines changed in the patch (around line 300 in FindBugsParser, right before long FirstSeen = cloud.getFirstSeen(warning); ). Add this line: // ensure cloud data is synchronized cloud.waitUntilIssueDataDownloaded(); I have tested this locally and it brings back the first seen and number of comments!

          Code changed in jenkins
          User: Ulli Hafner
          Path:
          plugin/src/main/java/hudson/plugins/findbugs/parser/FindBugsParser.java
          http://jenkins-ci.org/commit/findbugs-plugin/943d67a1b1c17bf34430f14c5c8157a99b519229
          Log:
          [FIXED JENKINS-14225] Wait until cloud information has been downloaded.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: plugin/src/main/java/hudson/plugins/findbugs/parser/FindBugsParser.java http://jenkins-ci.org/commit/findbugs-plugin/943d67a1b1c17bf34430f14c5c8157a99b519229 Log: [FIXED JENKINS-14225] Wait until cloud information has been downloaded.

            drulli Ulli Hafner
            erase_your_mind Vasil Dilchev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: