[JIRA] (JENKINS-54133) No ANSI coloring on slave agents in pipeline
Title: Message Title Cyrille Le Clerc closed an issue as Fixed Jenkins / JENKINS-54133 No ANSI coloring on slave agents in pipeline Change By: Cyrille Le Clerc Status: Resolved Closed Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-54133) No ANSI coloring on slave agents in pipeline
Title: Message Title Devin Nusbaum commented on JENKINS-54133 Re: No ANSI coloring on slave agents in pipeline Jesse Glick I just released the full fix for ansicolor in version 0.6.0 of the plugin. Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-54133) No ANSI coloring on slave agents in pipeline
Title: Message Title Jesse Glick updated JENKINS-54133 Thus the fixes for ant and pipeline-maven have been released; as well as the hotfix of this issue as originally filed for ansicolor (PRs 128 & 130), though the full fix through rewrite (PR 132) which is merged but not yet released by Devin Nusbaum (and which also requires a post-LTS version of Jenkins core). Jenkins / JENKINS-54133 No ANSI coloring on slave agents in pipeline Change By: Jesse Glick Status: Fixed but Unreleased Resolved Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-54133) No ANSI coloring on slave agents in pipeline
Title: Message Title Cyrille Le Clerc commented on JENKINS-54133 Re: No ANSI coloring on slave agents in pipeline Delivered in pipeline-maven-plugin 3.6.0 Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-54133) No ANSI coloring on slave agents in pipeline
Title: Message Title Jesse Glick updated JENKINS-54133 Jenkins / JENKINS-54133 No ANSI coloring on slave agents in pipeline Change By: Jesse Glick Status: In Review Progress Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-54133) No ANSI coloring on slave agents in pipeline
Title: Message Title Jesse Glick stopped work on JENKINS-54133 Change By: Jesse Glick Status: In Progress Open Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-54133) No ANSI coloring on slave agents in pipeline
Title: Message Title Jesse Glick updated JENKINS-54133 All associated PRs merged. Jenkins / JENKINS-54133 No ANSI coloring on slave agents in pipeline Change By: Jesse Glick Status: Open Fixed but Unreleased Resolution: Fixed Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-54133) No ANSI coloring on slave agents in pipeline
Title: Message Title Jesse Glick commented on JENKINS-54133 Re: No ANSI coloring on slave agents in pipeline I seem to have succeeded in using ConsoleAnnotatorFactory after all. Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-54133) No ANSI coloring on slave agents in pipeline
Title: Message Title Jesse Glick updated JENKINS-54133 Jenkins / JENKINS-54133 No ANSI coloring on slave agents in pipeline Change By: Jesse Glick Status: In Progress Review Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-54133) No ANSI coloring on slave agents in pipeline
Title: Message Title Jesse Glick updated an issue Jenkins / JENKINS-54133 No ANSI coloring on slave agents in pipeline Change By: Jesse Glick Component/s: ant-plugin Component/s: pipeline-maven-plugin Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-54133) No ANSI coloring on slave agents in pipeline
Title: Message Title Jesse Glick commented on JENKINS-54133 Re: No ANSI coloring on slave agents in pipeline Filed a PR with the sketch of a fix that currently just handles escape sequences that set a (regular-intensity) foreground color from the colormap, as in the example and the existing test coverage. The repository is currently set up to build on Travis CI. If .travis.yml were replaced or supplemented with a Jenkinsfile buildPlugin() then I could mvn incrementals:incrementalify and so PR builds on ci.jenkins.io would automatically publish experimental releases for people to evaluate, via JEP-305. In the meantime, anyone wanting to try this would have to build from sources I think. Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-54133) No ANSI coloring on slave agents in pipeline
Title: Message Title Jesse Glick commented on JENKINS-54133 Re: No ANSI coloring on slave agents in pipeline Just found this code suggesting that note pregeneration is not possible in general (though the common cases could be handled). Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-54133) No ANSI coloring on slave agents in pipeline
Title: Message Title Jesse Glick commented on JENKINS-54133 Re: No ANSI coloring on slave agents in pipeline Since I see that I have not commented here recently: I do plan to offer a fix for this, I am just trying to deal with higher-priority issues first (JENKINS-54073, then JENKINS-54078, then JENKINS-54081, then this). Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-54133) No ANSI coloring on slave agents in pipeline
Title: Message Title Viacheslav Subotskyi updated an issue Jenkins / JENKINS-54133 No ANSI coloring on slave agents in pipeline Change By: Viacheslav Subotskyi Attachment: image.png Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-54133) No ANSI coloring on slave agents in pipeline
Title: Message Title Jesse Glick commented on JENKINS-54133 Re: No ANSI coloring on slave agents in pipeline I have not yet tried it, but studying the pipeline-maven code it looks like that should be easy to fix as well, by pregenerating notes. The ansicolor case is harder because pregenerating notes looks complex. SimpleHtmlNote would be the most convenient possible vector for a stored-XSS attack were it not for SECURITY-382. There is a range of element names apparently passed to AnsiAttributeElement, which would not be a major problem, but for some types there is also a range of colors passed in, and for FGBG there is a pair of colors, thus 8 × 8 = 64 possibilities that would need to be pregenerated. Again creating a ConsoleAnnotatorFactory would be by far the preferable solution in general, even if there were no ConsoleNote compatibility issue—you pay the cost of scanning only during HTML rendering in the classic UI, if even ever shown; the log file is not bloated by large encrypted notes; and you are not in a Catch-22 w.r.t. Blue Ocean—but the extensive logic in AnsiHtmlOutputStream + AnsiOutputStream would have to be reworked significantly to follow this API, which is not structured as a filter on a stream but as a hook able to insert markup. Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-54133) No ANSI coloring on slave agents in pipeline
Title: Message Title Jesse Glick commented on JENKINS-54133 Re: No ANSI coloring on slave agents in pipeline Fix for the ant plugin was easy at least. Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-54133) No ANSI coloring on slave agents in pipeline
Title: Message Title Jesse Glick commented on JENKINS-54133 Re: No ANSI coloring on slave agents in pipeline Have a functional test demonstrating the essential aspect of the problem. Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-54133) No ANSI coloring on slave agents in pipeline
Title: Message Title Jesse Glick started work on JENKINS-54133 Change By: Jesse Glick Status: Open In Progress Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-54133) No ANSI coloring on slave agents in pipeline
Title: Message Title Jesse Glick updated an issue Jenkins / JENKINS-54133 No ANSI coloring on slave agents in pipeline I am afraid there are several more cases where a plugin offers a ConsoleLogFilter (whether directly via BodyInvoker.mergeConsoleLogFilters, or indirectly via CoreWrapperStep calling SimpleBuildWrapper.createLoggerDecorator) that is Serializable on the master (so, can be tracked in program.dat) yet is not safely remotable, typically because it creates a ConsoleNote which is not (or reasonably could not be) pregenerated on the master side and transmitted to the agent in encoded form. This is one example in the ant plugin; the pipeline-maven plugin similarly does colorizing; the logstash plugin has a call which would not work remotely, though I am not much concerned since this use case is addressed directly by JEP-210; pipeline-utility-steps has a tee step but this does work. So I need to think about whether there is a general way to either detect filters which would add a ConsoleNote and process them master-side when using the default log storage; or securely pregenerate the note; or rework all of these to support remote filtering. Change By: Jesse Glick Component/s: workflow-api-plugin Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)
[JIRA] (JENKINS-54133) No ANSI coloring on slave agents in pipeline
Title: Message Title Jesse Glick edited a comment on JENKINS-54133 Re: No ANSI coloring on slave agents in pipeline Likely similar cause to JENKINS-54081—console notes generated in the agent JVM are not trusted and thus ignored during rendering. The best fix would likely be analogous to what I did for JENKINS-48344: deprecate the build wrapper at least for Pipeline, and replace the contextual {{ConsoleLogFilter}} with a global {{ TaskListenerDecorator ConsoleAnnotatorFactory }} that is able to render ANSI escape sequences in the HTML view rather than embedding {{SimpleHtmlNote}} objects. This would have the same efficiency benefit as for JENKINS-48344 (get rid of a vast volume of junk in {{log}}), as well as improving Blue Ocean compatibility with a major sore point with this plugin today: you can choose to either enable the wrapper and thus render colors in classic UI but see plain text in BO; or do nothing and thus render colors in BO but see raw escape sequences in classic UI. Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-54133) No ANSI coloring on slave agents in pipeline
Title: Message Title Jesse Glick commented on JENKINS-54133 Re: No ANSI coloring on slave agents in pipeline I forgot to mention that as in JENKINS-54081 it is likely possible to work around this (have not yet tried it) using the JVM option -Dorg.jenkinsci.plugins.workflow.steps.durable_task.DurableTaskStep.USE_WATCHING=false, or (do not try this at home!) by disabling the SECURITY-382 defense. Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-54133) No ANSI coloring on slave agents in pipeline
Title: Message Title Jesse Glick updated an issue Jenkins / JENKINS-54133 No ANSI coloring on slave agents in pipeline Change By: Jesse Glick Labels: regression Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-54133) No ANSI coloring on slave agents in pipeline
Title: Message Title Jesse Glick commented on JENKINS-54133 Re: No ANSI coloring on slave agents in pipeline Likely similar cause to JENKINS-54081—console notes generated in the agent JVM are not trusted and thus ignored during rendering. The best fix would likely be analogous to what I did for JENKINS-48344: deprecate the build wrapper at least for Pipeline, and replace the contextual ConsoleLogFilter with a global TaskListenerDecorator that is able to render ANSI escape sequences in the HTML view rather than embedding SimpleHtmlNote objects. This would have the same efficiency benefit as for JENKINS-48344 (get rid of a vast volume of junk in log), as well as improving Blue Ocean compatibility with a major sore point with this plugin today: you can choose to either enable the wrapper and thus render colors in classic UI but see plain text in BO; or do nothing and thus render colors in BO but see raw escape sequences in classic UI. Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-54133) No ANSI coloring on slave agents in pipeline
Title: Message Title Jesse Glick updated an issue Jenkins / JENKINS-54133 No ANSI coloring on slave agents in pipeline Change By: Jesse Glick Component/s: ansicolor-plugin Component/s: pipeline Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-54133) No ANSI coloring on slave agents in pipeline
Title: Message Title Vivek Pandey commented on JENKINS-54133 Re: No ANSI coloring on slave agents in pipeline Jesse Glick ptal to rule out possible regression. Thanks. Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-54133) No ANSI coloring on slave agents in pipeline
Title: Message Title Vivek Pandey assigned an issue to Jesse Glick Jenkins / JENKINS-54133 No ANSI coloring on slave agents in pipeline Change By: Vivek Pandey Assignee: Jesse Glick Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-54133) No ANSI coloring on slave agents in pipeline
Title: Message Title Ben Specht created an issue Jenkins / JENKINS-54133 No ANSI coloring on slave agents in pipeline Issue Type: Bug Assignee: Unassigned Attachments: Screen Shot 2018-10-17 at 11.17.21 AM.png, Screen Shot 2018-10-17 at 11.26.10 AM.png Components: pipeline Created: 2018-10-17 16:35 Environment: Jenkins version: 2.138.2 JDK: java-1.8.0-openjdk-1.8.0.161-2.b14.el7.x86_64 OS: CentOS 7 64 bit Pipeline plugin version: 2.6 Jenkins is running directly using SSH agents for the slaves. The slaves are all running CentOS 7 with some of those agents being containers. Jenkins is access through a smart proxy and I'm running the latest version of Google Chrome. Priority: Minor Reporter: Ben Specht Pipeline: node('master'){ ansiColor('xterm') { sh 'echo -e "\033[31mRed\033[0m"' } wrap([$class: 'AnsiColorBuildWrapper', 'colorMapName': 'XTerm']) { sh 'echo -e "\033[31mRed\033[0m"' } } node('ansible'){ ansiColor('xterm') { sh 'echo -e "\033[31mRed\033[0m"' } wrap([$class: 'AnsiColorBuildWrapper', 'colorMapName': 'XTerm']) { sh 'echo -e "\033[31mRed\033[0m"' } } Output: I've verified I see ANSI coloring on a freestyle project restricted to the same 'ansible' label Shell build step