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

Truncated log displayed in middle of line, showing Base64-encoded ConsoleNote garbage

      When you view a truncated log file (Skipping ... Full Log) often the text will resume in the middle of a line. This is ugly enough but when the offset happens to be in the middle of an encoded ConsoleNote you get a confusing batch of Base64 garbage before the stream corrects itself.

      Either console.jelly should employ a more sophisticated core API to find an offset which is at a line boundary (which might be inefficient); or AnnotatedLargeText.writeHtmlTo should skip any initial partial line, for example by using start - 1 and using a wrapper OutputStream which discards everything prior to the first newline character and thereafter mirrors its input; or ConsoleAnnotationOutputStream should have an option to do that.

          [JENKINS-44972] Truncated log displayed in middle of line, showing Base64-encoded ConsoleNote garbage

          Jesse Glick added a comment -

          An implementation of JENKINS-17406 might supersede this.

          Jesse Glick added a comment - An implementation of  JENKINS-17406 might supersede this.

          Rajat Bansal added a comment -

          Hi jglick,
          I am a newbie and would like to work on this but I am not able to reproduce the issue. Can you please help. Screenshots would be great.

          Thanks.

          Rajat Bansal added a comment - Hi jglick , I am a newbie and would like to work on this but I am not able to reproduce the issue. Can you please help. Screenshots would be great. Thanks.

          Jesse Glick added a comment -

          If you run a build that includes console annotations on most lines, and is long enough for the log to get truncated, you will most likely see it.

          Jesse Glick added a comment - If you run a build that includes console annotations on most lines, and is long enough for the log to get truncated, you will most likely see it.

          Arun Shrestha added a comment -

          I wanted to know if anyone else is working on this. If so, I can work on a different issue. Else, I will be more than glad to look into it

          Arun Shrestha added a comment - I wanted to know if anyone else is working on this. If so, I can work on a different issue. Else, I will be more than glad to look into it

          Arun Shrestha added a comment -

          jglick Hey Jesse. I tried to replicate it by adding a very long string so that it has to skip but could not replicate it. I believe the problem with that is that my longs strings had no annotations. I was wondering if you could help me how to get annotations by using the Jenkinsfile. I would really appreciate it. I have studied the code base a bit and understand the relationship a bit with jelly files. But, if I am able to replicate it, I can move on to fixing it. Thanks.

          Arun Shrestha added a comment - jglick Hey Jesse. I tried to replicate it by adding a very long string so that it has to skip but could not replicate it. I believe the problem with that is that my longs strings had no annotations. I was wondering if you could help me how to get annotations by using the Jenkinsfile. I would really appreciate it. I have studied the code base a bit and understand the relationship a bit with jelly files. But, if I am able to replicate it, I can move on to fixing it. Thanks.

          Jesse Glick added a comment -

          You would need to use various plugins (or certain core features) which insert serialized console notes.

          Jesse Glick added a comment - You would need to use various plugins (or certain core features) which insert serialized console notes.

            shreygupta198 Shreya
            jglick Jesse Glick
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: