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

Build log regex matches encoded console notes

    Details

    • Similar Issues:

      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.

        Attachments

          Issue Links

            Activity

            stevengbrown Steven G Brown created issue -
            ashlux ashlux made changes -
            Field Original Value New Value
            Assignee ashlux [ ashlux ]
            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.
            stevengbrown Steven G Brown made changes -
            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.
            Since Hudson 1.349, [console notes|https://hudson.dev.java.net/nonav/javadoc/hudson/console/ConsoleNote.html] 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.
            Hide
            stevengbrown Steven G Brown 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 Steven G Brown 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.
            scm_issue_link SCM/JIRA link daemon made changes -
            Status Open [ 1 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]
            ashlux ashlux made changes -
            Link This issue is duplicated by JENKINS-5970 [ JENKINS-5970 ]
            slide_o_mix Alex Earl made changes -
            Status Resolved [ 5 ] Closed [ 6 ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 137501 ] JNJira + In-Review [ 204516 ]
            jbochenski Jakub Bochenski made changes -
            Link This issue relates to JENKINS-42536 [ JENKINS-42536 ]

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: