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

ansicolor 0.6.0 shows terminal escape sequences in console log

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • ansicolor-plugin
    • Jenkins version: 2.150.1
      JDK: OpenJDK Runtime Environment 1.8.0_191-8u191-b12-0ubuntu0.16.04.1-b12
      OS: Ubuntu 16.04.5 LTS
      ansicolor 0.6.0
      timestamper 1.8.10
    • ansicolor 0.6.2

      Since I updated the ansicolor plugin to 0.6.0, I see escape sequences in the terminal log (the log is from an ansible-playbook run):

      consoleText in WebUI:
      ok: [essf0desc]

      log file:
      [[0;32mok: [essf0desc][[0m

      When i downgrade the ansicolor plugin to 0.5.3, I don't see the escape sequences in the log:

      consoleText in WebUI:
      ok: [essf0desc]

      log file:
      [[8mha:////4GByXBh6D5sO4uIaL/Xvo6rBHYkdqIOcMtgU7KVDnLnuAAAApR+LCAAAAAAAAP9b85aBtbiIQT2jNKU4P0+vIKc0PTOvWC8xrzgzOT8nv0gvODO3ICfVoyQ3xy+/JNU2Yj/Tagmf50wMjD4M7CWJ6SCJEgYhn6zEskT9nMS8dP3gkqLMvHTriiIGKaihyfl5xfk5qXrOEBpkDgMEMDIxMFQUlDDI2RQXJOYpFJdU5qTaKoEttlJQNjBwdjEwsFayAwAsE8VZpQAAAA==[[0mok: [essf0desc][[8mha:////4MLkG6V+s9c4kbbINbBZTN8IdUcULVaJJVRaElSmS5VEAAAAkR+LCAAAAAAAAP9b85aBtbiIQT2jNKU4P0+vIKc0PTOvWC8xrzgzOT8nv0gvODO3ICfVoyQ3xy+/JNU2Yj/Tagmf50wMjD4M7CWJ6SCJEgYhn6zEskT9nMS8dP3gkqLMvHTriiIGKaihyfl5xfk5qXrOEBpkDgMEMDIxMFQUlDCw2+gXFyTm2QEAI9P8iI4AAAA=[[0m

      The log output let me assume that the changes in 0.6.0 maybe interference with the timestamper plugin.

          [JENKINS-55139] ansicolor 0.6.0 shows terminal escape sequences in console log

          Christian Loos created issue -
          Devin Nusbaum made changes -
          Attachment New: ansicolor.hpi [ 45592 ]

          Devin Nusbaum added a comment - - edited

          There is some additional discussion on https://github.com/jenkinsci/ansicolor-plugin/issues/145. I am not sure exactly what the issue is with ansible, but it looks like at least Terraform is using multiline input, which I think should be fixed by https://github.com/jenkinsci/ansicolor-plugin/pull/137 (merged but not released). If anyone seeing the issue can test out the attached SNAPSHOT build of the plugin based on the current master (ansicolor.hpi) and report on whether that fixes the issue, makes things better, makes things worse, or makes no difference, that would be very helpful.

          ansicolor.hpi

          Devin Nusbaum added a comment - - edited There is some additional discussion on https://github.com/jenkinsci/ansicolor-plugin/issues/145.  I am not sure exactly what the issue is with ansible, but it looks like at least Terraform is using multiline input, which I think should be fixed by https://github.com/jenkinsci/ansicolor-plugin/pull/137  (merged but not released). If anyone seeing the issue can test out the attached SNAPSHOT build of the plugin based on the current master ( ansicolor.hpi ) and report on whether that fixes the issue, makes things better, makes things worse, or makes no difference, that would be very helpful. ansicolor.hpi
          Devin Nusbaum made changes -
          Remote Link New: This issue links to "jenkinsci/ansicolor-plugin/#137 (Web Link)" [ 22157 ]
          Devin Nusbaum made changes -
          Remote Link New: This issue links to "jenkinsci/ansicolor-plugin#145 (Web Link)" [ 22158 ]

          I tried this snapshot and it's makes no difference...

          Victor Verbitsky added a comment - I tried this snapshot and it's makes no difference...

          Devin Nusbaum added a comment -

          Thanks for trying it out vektory79! It would be great if anyone seeing the issue could report whether they are seeing variant 1 or 2 of the issue while ansicolor 0.6.x is installed as described in my comment on the GitHub issue.

          Devin Nusbaum added a comment - Thanks for trying it out vektory79 ! It would be great if anyone seeing the issue could report whether they are seeing variant 1 or 2 of the issue while ansicolor 0.6.x is installed as described in my comment on the GitHub issue .

          If ansicolor 0.6.x is installed then I see the 1 variant of the issue.

          Victor Verbitsky added a comment - If ansicolor 0.6.x is installed then I see the 1 variant of the issue.

          Devin Nusbaum added a comment -

          Are there any error messages in your logs? Do you see any kind of coloration in any jobs? What tools are producing colorized output in your logs (Ansible)? Can you copy-paste one of the lines that is showing up incorrectly here (preferably replacing literal occurrences of the character 0x1B with 0x1B here so we can see how control characters are being processed?)

          Devin Nusbaum added a comment - Are there any error messages in your logs? Do you see any kind of coloration in any jobs? What tools are producing colorized output in your logs (Ansible)? Can you copy-paste one of the lines that is showing up incorrectly here (preferably replacing literal occurrences of the character 0x1B with 0x1B here so we can see how control characters are being processed?)

          Victor Verbitsky added a comment - - edited

          > Are there any error messages in your logs?

          I haven't found any meaningful messages.

          > Do you see any kind of coloration in any jobs?

          No at all.

          > What tools are producing colorized output in your logs (Ansible)?

          Apache Maven 3.6.0 (with special flags to force the coloration).

          > Can you copy-paste one of the lines that is showing up incorrectly here

          [WARNING]
          [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
          [WARNING]
          [WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
          [WARNING]
          [INFO] ------------------------------------------------------------------------
          [INFO] Reactor Build Order:
          [INFO]
          [INFO] ru.krista:root:pom [pom]
          [INFO] ru.krista:core:pom [pom]
          [INFO] ru.krista.core:common:pom [pom]
          [INFO] ru.krista.core.common:utils:jar [takari-jar]
          [INFO] ru.krista.core:ioc:pom [pom]

           > preferably replacing literal occurrences of the character 0x1B with 0x1B here so we can see how control characters are being processed?

          Sorry, but I don't know how to do this... I just see this log instead of color text. With 0.5.3 all colors is in place here.

           

          Victor Verbitsky added a comment - - edited > Are there any error messages in your logs? I haven't found any meaningful messages. > Do you see any kind of coloration in any jobs? No at all. > What tools are producing colorized output in your logs (Ansible)? Apache Maven 3.6.0 (with special flags to force the coloration). > Can you copy-paste one of the lines that is showing up incorrectly here [WARNING [m] [WARNING [m] It is highly recommended to fix these problems because they threaten the stability of your build. [WARNING [m] [WARNING [m] For this reason, future Maven versions might no longer support building such malformed projects. [WARNING [m] [INFO [m] ------------------------------------------------------------------------ [INFO [m] Reactor Build Order: [INFO [m] [INFO [m] ru.krista:root:pom [pom] [INFO [m] ru.krista:core:pom [pom] [INFO [m] ru.krista.core:common:pom [pom] [INFO [m] ru.krista.core.common:utils:jar [takari-jar] [INFO [m] ru.krista.core:ioc:pom [pom]  > preferably replacing literal occurrences of the character 0x1B with 0x1B here so we can see how control characters are being processed? Sorry, but I don't know how to do this... I just see this log instead of color text. With 0.5.3 all colors is in place here.  

            dnusbaum Devin Nusbaum
            cloos Christian Loos
            Votes:
            13 Vote for this issue
            Watchers:
            28 Start watching this issue

              Created:
              Updated: