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

Text Finder plugin incompatible with Timestamper plugin

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Component/s: text-finder-plugin
    • Labels:
      None
    • Environment:
      Suse Linux, Jenkins 1.410, Text-finder plugin 1.9
    • Similar Issues:
    • Released As:
      1.13

      Description

      When timestamps are enabled, the text finder plugin often finds the string 'FAIL' in the compressed console notes which leads to falsely marking our builds as unstable! The plugin should strip away the console notes before parsing the console output.

      Quote from another bug: "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."

        Attachments

          Issue Links

            Activity

            Hide
            basil Basil Crow added a comment -

            Released in Text Finder 1.13.

            Show
            basil Basil Crow added a comment - Released in Text Finder 1.13 .
            Hide
            basil Basil Crow added a comment -
            Show
            basil Basil Crow added a comment - Fixed in jenkinsci/text-finder-plugin#52 .
            Hide
            dreamtime Angela Johansson added a comment -

            I couldn't wait for a fix, so I fixed it locally.
            Solution: Insert the following in TextFinderPublisher.java:

            ...
            ==> import hudson.console.ConsoleNote; <==
            ...
            
                private boolean checkFile(File f, Pattern pattern, PrintStream logger, boolean abortAfterFirstHit) { 
                    boolean logFilename = true; 
                    boolean foundText = false; 
                    BufferedReader reader=null; 
                    try { 
                        // Assume default encoding and text files 
                        String line; 
                        reader = new BufferedReader(new FileReader(f)); 
                        while ((line = reader.readLine()) != null) { 
                            Matcher matcher = pattern.matcher( ==> ConsoleNote.removeNotes( <== line)); 
                            if (matcher.find()) { 
                                if (logFilename) {// first occurrence 
                                    logger.println(f + ":"); 
                                    logFilename = false; 
                                } 
            
            Show
            dreamtime Angela Johansson added a comment - I couldn't wait for a fix, so I fixed it locally. Solution: Insert the following in TextFinderPublisher.java: ... ==> import hudson.console.ConsoleNote; <== ... private boolean checkFile(File f, Pattern pattern, PrintStream logger, boolean abortAfterFirstHit) { boolean logFilename = true ; boolean foundText = false ; BufferedReader reader= null ; try { // Assume default encoding and text files String line; reader = new BufferedReader( new FileReader(f)); while ((line = reader.readLine()) != null ) { Matcher matcher = pattern.matcher( ==> ConsoleNote.removeNotes( <== line)); if (matcher.find()) { if (logFilename) { // first occurrence logger.println(f + ":" ); logFilename = false ; }

              People

              • Assignee:
                basil Basil Crow
                Reporter:
                dreamtime Angela Johansson
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: