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

Text-finder plugin incompatible with timestamper plugin

    Details

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

      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

          Activity

          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:
              drlewis drlewis
              Reporter:
              dreamtime Angela Johansson
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: