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

Integrate the Build Failure Analyzer plugin with Claim plugin

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Given a failed build
      And the Build Failure Analyzer plugin is installed on the Jenkins instance
      When a user navigates to the failed build
      And the user claims the build
      Then the user is presented with the defined Failure Causes in the BFA KnowledgeBase
      And a Failure Cause can be selected
      And the Indication is stored by BFA

        Attachments

          Activity

          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Eric Liou
          Path:
          .gitignore
          pom.xml
          src/main/java/hudson/plugins/claim/AbstractClaimBuildAction.java
          src/main/java/hudson/plugins/claim/ClaimBuildFailureAnalyzer.java
          src/main/java/hudson/plugins/claim/ClaimIndication.java
          src/main/java/hudson/plugins/claim/ClaimPublisher.java
          src/main/java/hudson/plugins/claim/DescribableTestAction.java
          src/main/resources/hudson/plugins/claim/AbstractClaimBuildAction/summary.jelly
          src/main/webapp/JS/json2.js
          src/main/webapp/help-description.html
          src/main/webapp/help-errors.html
          src/test/java/hudson/plugins/claim/ClaimBFATest.java
          http://jenkins-ci.org/commit/claim-plugin/c2ea74e2a58cddff9219a03ffe261c1f95ea4be5
          Log:
          [Fixed JENKINS-28722] Integrate Build-Failure-Analyzer Plugin with Claim plugin

          Given a failed build and Build-Failure-Analyzer is installed, the user is presented with
          the defined failure causes in the BFA knowledgebase upon claiming. If a failure cause is selected,
          the indication is stored by BFA.

          -Add ClaimBuildFailureAnalyzer to allow claiming of failure causes
          -Add dynamic dropdown box + text-field on UI to display failure causes
          -Implement tests to verify new functionality

          See JENKINS-28722

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Eric Liou Path: .gitignore pom.xml src/main/java/hudson/plugins/claim/AbstractClaimBuildAction.java src/main/java/hudson/plugins/claim/ClaimBuildFailureAnalyzer.java src/main/java/hudson/plugins/claim/ClaimIndication.java src/main/java/hudson/plugins/claim/ClaimPublisher.java src/main/java/hudson/plugins/claim/DescribableTestAction.java src/main/resources/hudson/plugins/claim/AbstractClaimBuildAction/summary.jelly src/main/webapp/JS/json2.js src/main/webapp/help-description.html src/main/webapp/help-errors.html src/test/java/hudson/plugins/claim/ClaimBFATest.java http://jenkins-ci.org/commit/claim-plugin/c2ea74e2a58cddff9219a03ffe261c1f95ea4be5 Log: [Fixed JENKINS-28722] Integrate Build-Failure-Analyzer Plugin with Claim plugin — Given a failed build and Build-Failure-Analyzer is installed, the user is presented with the defined failure causes in the BFA knowledgebase upon claiming. If a failure cause is selected, the indication is stored by BFA. -Add ClaimBuildFailureAnalyzer to allow claiming of failure causes -Add dynamic dropdown box + text-field on UI to display failure causes -Implement tests to verify new functionality See JENKINS-28722
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: ki82
          Path:
          .gitignore
          pom.xml
          src/main/java/hudson/plugins/claim/AbstractClaimBuildAction.java
          src/main/java/hudson/plugins/claim/ClaimBuildFailureAnalyzer.java
          src/main/java/hudson/plugins/claim/ClaimIndication.java
          src/main/java/hudson/plugins/claim/ClaimPublisher.java
          src/main/java/hudson/plugins/claim/DescribableTestAction.java
          src/main/resources/hudson/plugins/claim/AbstractClaimBuildAction/summary.jelly
          src/main/webapp/JS/json2.js
          src/main/webapp/help-description.html
          src/main/webapp/help-errors.html
          src/test/java/hudson/plugins/claim/ClaimBFATest.java
          http://jenkins-ci.org/commit/claim-plugin/109ee7f7ab4837eab12fe2be35b3e9349f7ee523
          Log:
          Merge pull request #17 from toericliou/master

          [Fixed JENKINS-28722] Integrate Build-Failure-Analyzer Plugin with Cl…

          Compare: https://github.com/jenkinsci/claim-plugin/compare/834e653b36c8...109ee7f7ab48

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: ki82 Path: .gitignore pom.xml src/main/java/hudson/plugins/claim/AbstractClaimBuildAction.java src/main/java/hudson/plugins/claim/ClaimBuildFailureAnalyzer.java src/main/java/hudson/plugins/claim/ClaimIndication.java src/main/java/hudson/plugins/claim/ClaimPublisher.java src/main/java/hudson/plugins/claim/DescribableTestAction.java src/main/resources/hudson/plugins/claim/AbstractClaimBuildAction/summary.jelly src/main/webapp/JS/json2.js src/main/webapp/help-description.html src/main/webapp/help-errors.html src/test/java/hudson/plugins/claim/ClaimBFATest.java http://jenkins-ci.org/commit/claim-plugin/109ee7f7ab4837eab12fe2be35b3e9349f7ee523 Log: Merge pull request #17 from toericliou/master [Fixed JENKINS-28722] Integrate Build-Failure-Analyzer Plugin with Cl… Compare: https://github.com/jenkinsci/claim-plugin/compare/834e653b36c8...109ee7f7ab48
          Hide
          teljj001 James Telfer added a comment -

          I installed the most recent release, and it caused a JS error on the page as some of the failure reasons in my instance use single quotes.

          The Display method in Summary.jelly serializes a JSON string into a quoted string; this breaks if the JSON string contains single quotes. The simplest fix is just to escape single quotes in the JSON string so it will parse correctly.

          While I think of it, this approach (serializing a string to JSON for direct output) can also fail if the JSON contains the string fragment </script> (depending on browser), so it's a place to be careful. I'm not sure what Jelly provides, but there is often a standard string escaping method (JavaScriptStringEncode kind of thing) which helps avoid the possible XSS issue. If there's not one already, the (MIT licensed) .NET core project has a possibly-useful implementation.

          If this needs to be a separate bug (as this feature is already released) let me know.

          Show
          teljj001 James Telfer added a comment - I installed the most recent release, and it caused a JS error on the page as some of the failure reasons in my instance use single quotes. The Display method in Summary.jelly serializes a JSON string into a quoted string; this breaks if the JSON string contains single quotes. The simplest fix is just to escape single quotes in the JSON string so it will parse correctly. While I think of it, this approach (serializing a string to JSON for direct output) can also fail if the JSON contains the string fragment </script> (depending on browser), so it's a place to be careful. I'm not sure what Jelly provides, but there is often a standard string escaping method (JavaScriptStringEncode kind of thing) which helps avoid the possible XSS issue. If there's not one already, the (MIT licensed) .NET core project has a possibly-useful implementation . If this needs to be a separate bug (as this feature is already released) let me know.
          Hide
          clara_kang Clara Kang added a comment -

          I fixed the bug with single quote in failure cause description, and made a pull request.

          Show
          clara_kang Clara Kang added a comment - I fixed the bug with single quote in failure cause description, and made a pull request.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: ki82
          Path:
          src/main/resources/hudson/plugins/claim/AbstractClaimBuildAction/summary.jelly
          src/test/java/hudson/plugins/claim/ClaimBFATest.java
          http://jenkins-ci.org/commit/claim-plugin/457700bc08eda9e94eda03b27e2e74b755d75672
          Log:
          Merge pull request #19 from clara-kang/dev

          fixed JENKINS-28722

          Compare: https://github.com/jenkinsci/claim-plugin/compare/a8f95f1c1676...457700bc08ed

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: ki82 Path: src/main/resources/hudson/plugins/claim/AbstractClaimBuildAction/summary.jelly src/test/java/hudson/plugins/claim/ClaimBFATest.java http://jenkins-ci.org/commit/claim-plugin/457700bc08eda9e94eda03b27e2e74b755d75672 Log: Merge pull request #19 from clara-kang/dev fixed JENKINS-28722 Compare: https://github.com/jenkinsci/claim-plugin/compare/a8f95f1c1676...457700bc08ed
          Hide
          ssbarnea Sorin Sbarnea added a comment -

          Any updates on this? I would really be useful to see this fixed.

          Show
          ssbarnea Sorin Sbarnea added a comment - Any updates on this? I would really be useful to see this fixed.
          Hide
          greybird Arnaud TAMAILLON added a comment -

          Fixed in 2.9

          Show
          greybird Arnaud TAMAILLON added a comment - Fixed in 2.9

            People

            • Assignee:
              clara_kang Clara Kang
              Reporter:
              scoheb Scott Hebert
            • Votes:
              4 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: