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

Newlines are not preserved in BFA failure cause descriptions on build summary page

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Problem

      Newlines present in the Build Failure Analyzer Plugin's Failure Cause "Description" field are no longer being displayed in the "Identified Problems" section of the build summary page. Instead, everything is collapsed into a single line. The newlines are saved and retained in the ${JENKINS_HOME}/build-failure-analyzer.xml file, they're just not displayed correctly.

      I believe this regression happened when we upgraded Jenkins from v2.277.3.1 to v2.277.4.3. Installing an earlier version of the BFA plugin does not fix the issue, so I suspect it's a change in Jenkins itself causing the problem.

      This bug also affects the Token Macro integration: we pass failure causes to an email-ext email and the newlines are also lost there.

      There is no known workaround. This bug makes all but the most simple failure cause descriptions useless, especially those using placeholder substitution to inject sections of the build log into the description

      I have not yet tried to reproduce this in a pristine Jenkins installation but I plan to do that when time allows

      Screenshots

      • ${JENKINS_HOME}/build-failure-analyzer.xml
      • Failure Cause
      • Identified Problems
      • Token Macro email
      • Token Macro email before the regression

        Attachments

          Activity

          Hide
          ivanj Ivan added a comment -

          Something that helped me workaround this at least for the in-browser presentation.  It seems my Jenkins Controller has Safe HTML enabled.

          So I tried using`<pre>` tags in the Issue's Description field, wrapping them around the capture group directive.  Like this:

          That then caused the expected output to be rendered in the browse appropriately:

          Show
          ivanj Ivan added a comment - Something that helped me workaround this at least for the in-browser presentation.  It seems my Jenkins Controller has Safe HTML enabled. So I tried using`<pre>` tags in the Issue's Description field, wrapping them around the capture group directive.  Like this: That then caused the expected output to be rendered in the browse appropriately:
          Hide
          egherrmann Eric Herrmann added a comment -

          Wow, thank you. I could swear I've tried using HTML tags in the descriptions previously and they didn't work, but it's definitely working now. Thanks again.

          Show
          egherrmann Eric Herrmann added a comment - Wow, thank you. I could swear I've tried using HTML tags in the descriptions previously and they didn't work, but it's definitely working now. Thanks again.

            People

            Assignee:
            t_westling Tomas Westling
            Reporter:
            egherrmann Eric Herrmann
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: