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

Build log regex matches encoded console notes

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Component/s: email-ext-plugin
    • Labels:
      None

      Description

      Since Hudson 1.349, console notes can be embedded into the console output file. These notes are stored in an encoded format and are intended to be stripped out before the console is displayed.

      The build log regex functionality, since it reads from the console output file directly, puts these encoded notes into the email.

      http://hudson.361315.n4.nabble.com/Timestamper-plugin-and-email-ext-build-log-regex-produces-garbage-in-email-td2530211.html#a2530211

      These console notes can be stripped out by calling ConsoleNote.removeNotes(String) (introduced in Hudson 1.350) on each line as the BuildLogRegexContent class reads it from the log.

        Issue Links

          Activity

          Hide
          capn_carrot capn_carrot added a comment -

          I probably have the same issue though under two different conditions when the timestamper is active:

          • either in the tables of the warnings plugin where it puts that random garbage into all filenames
          • when looking at the console output of a long session. At first, Hudson cuts off the beginning and only shows the end. The garbage is then at the start of the page. If you click the button to display everything, the garbage is gone.

          What I found striking is the fact that the garbage always started with Escape + [ + number + reallyRandomStuff.

          You don't see it in the original mail but it was visible in my browser as replacement character 001B. Escape + [ + moreAsciiData is typically used to control terminals. So maybe it is some leftover from some function to control a virtual console within hudson?

          This problem existed since timestamper v1.0 and is reproducibly away if timestamper is off.

          Show
          capn_carrot capn_carrot added a comment - I probably have the same issue though under two different conditions when the timestamper is active: either in the tables of the warnings plugin where it puts that random garbage into all filenames when looking at the console output of a long session. At first, Hudson cuts off the beginning and only shows the end. The garbage is then at the start of the page. If you click the button to display everything, the garbage is gone. What I found striking is the fact that the garbage always started with Escape + [ + number + reallyRandomStuff. You don't see it in the original mail but it was visible in my browser as replacement character 001B. Escape + [ + moreAsciiData is typically used to control terminals. So maybe it is some leftover from some function to control a virtual console within hudson? This problem existed since timestamper v1.0 and is reproducibly away if timestamper is off.
          Hide
          stevengbrown stevengbrown added a comment -

          I probably have the same issue though under two different conditions when the timestamper is active:

          • either in the tables of the warnings plugin where it puts that random garbage into all filenames

          I've raised JENKINS-7417 for the Warnings plugin.

          • when looking at the console output of a long session. At first, Hudson cuts off the beginning and only shows the end. The garbage is then at the start of the page. If you click the button to display everything, the garbage is gone.

          capn_carrot, please raise a new issue for this and include:

          • The version of Hudson you have installed.
          • The console line that is being displayed incorrectly, and the surrounding lines.

          What I found striking is the fact that the garbage always started with Escape + [ + number + reallyRandomStuff.

          You don't see it in the original mail but it was visible in my browser as replacement character 001B. Escape + [ + moreAsciiData is typically used to control terminals. So maybe it is some leftover from some function to control a virtual console within hudson?

          This problem existed since timestamper v1.0 and is reproducibly away if timestamper is off.

          They are console notes, which are used to annotate the console output by the Timestamper plugin and also by Hudson itself. Hudson uses them to mark up Ant targets and to display internal errors.

          The Timestamper plugin is working as expected, but exposes bugs in other plugins which have not been updated to handle console notes.

          Show
          stevengbrown stevengbrown added a comment - I probably have the same issue though under two different conditions when the timestamper is active: either in the tables of the warnings plugin where it puts that random garbage into all filenames I've raised JENKINS-7417 for the Warnings plugin. when looking at the console output of a long session. At first, Hudson cuts off the beginning and only shows the end. The garbage is then at the start of the page. If you click the button to display everything, the garbage is gone. capn_carrot , please raise a new issue for this and include: The version of Hudson you have installed. The console line that is being displayed incorrectly, and the surrounding lines. What I found striking is the fact that the garbage always started with Escape + [ + number + reallyRandomStuff. You don't see it in the original mail but it was visible in my browser as replacement character 001B. Escape + [ + moreAsciiData is typically used to control terminals. So maybe it is some leftover from some function to control a virtual console within hudson? This problem existed since timestamper v1.0 and is reproducibly away if timestamper is off. They are console notes , which are used to annotate the console output by the Timestamper plugin and also by Hudson itself. Hudson uses them to mark up Ant targets and to display internal errors. The Timestamper plugin is working as expected, but exposes bugs in other plugins which have not been updated to handle console notes.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in hudson
          User: : ashlux
          Path:
          trunk/hudson/plugins/email-ext/src/main/java/hudson/plugins/emailext/plugins/content/BuildLogRegexContent.java
          trunk/hudson/plugins/email-ext/src/test/java/hudson/plugins/emailext/plugins/content/BuildLogRegexContentTest.java
          http://jenkins-ci.org/commit/34745
          Log:
          [FIXED JENKINS-7402] Update BUILD_LOG_REGEX to properly handle console notes. Emails were being sent out with garbage because of console notes. This fix requires Hudson 1.350 and newer.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : ashlux Path: trunk/hudson/plugins/email-ext/src/main/java/hudson/plugins/emailext/plugins/content/BuildLogRegexContent.java trunk/hudson/plugins/email-ext/src/test/java/hudson/plugins/emailext/plugins/content/BuildLogRegexContentTest.java http://jenkins-ci.org/commit/34745 Log: [FIXED JENKINS-7402] Update BUILD_LOG_REGEX to properly handle console notes. Emails were being sent out with garbage because of console notes. This fix requires Hudson 1.350 and newer.

            People

            • Assignee:
              ashlux ashlux
              Reporter:
              stevengbrown stevengbrown
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: