-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Escape chars printed raw in partial console output since 0.7.0 #185
Comments
Thank you for the report. I had a lot of trouble trying to reproduce this. Turns out this happens for Jenkins instances which never had a default, global This means that a dirty, short-term solution is to set a global color map and then immediately remove it. I don't have much free time at the moment but will try to come up with a permanent fix in the coming days. |
The wokaround worked like a charm, thanks for that! |
For those of you which use Configuration as Code to manage Jenkins, here's the config snippet that enables the global color map: unclassified:
ansiColorBuildWrapper:
globalColorMapName: "xterm" Maybe setting the global color map name to the empty string will also fix the problem. |
…onNote after build finishes to trigger plugin's logic also on partial log output
We're seeing a variant of this issue on our Cloud Based Jenkins instances (latest LTS of Jenkins and 0.7.1 of this plugin, entirely deployed using Helm and the JCASC plugin). We have a mixture of JNLP and Swarm based agents, interestingly any jobs running on the Swarm agents do not suffer this problem at all, however, when a job is run on a JNLP agent it always has this issue. I'm unsure how related our issues are to this ticket, however it feels like we're suffering the same symptoms at the very least, and they're fixed by the same workaround. Therefore, I hope that they're fixed by the same fix. As and when there's a release candidate for testing please can you add a link to it here and we'll be happy to test. Unsure how related to this: https://issues.jenkins-ci.org/browse/JENKINS-55139 this issue is, thought it was worth the tag though. |
@muppet3000
This ticket is specifically about truncated vs. full log.
This seems like the correct behavior to me. Why would you expect The "global color map" setting is for a situation where you already have a bunch of pipelines (or old-fashioned jobs) which do not trigger |
@twz123 Thanks for the response. I omitted the part where we're invoking ansicolor using the scripted pipeline syntax so our code looks something like this:
If I change the node to be one of our swarm nodes then it works fine. |
@muppet3000
In order to be able to reproduce this could you please:
1. Post the exact version of the `jnlp` image you are using.
2. Are you using `timestamper` in any form? In the pipeline or through its
global settings (similar to `ansicolor`).
3. Is this **the whole** pipeline that causes this behavior? If not please
post a full one. Problems often arise from a combination of
plugins/settings that no one managed to test before preparing new version.
…On Tue, Jul 21, 2020, 22:39 muppet3000 ***@***.***> wrote:
@twz123 <https://github.com/twz123> Thanks for the response.
I omitted the part where we're invoking ansicolor using the scripted
pipeline syntax so our code looks something like this:
node('jnlp') {
ansiColor('xterm') {
sh """
./script_that_outputs_escape_chars.sh
"""
}
}
If I change the node to be one of our swarm nodes then it works fine.
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
<#185 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AOQGV4IOFO6HMTUXS2KQZPDR4X4H7ANCNFSM4NKI4F4A>
.
|
jenkinsci/jnlp-slave:4.0.1-1
We have it installed but it is not used in the pipeline and does not have the "Enabled for all pipeline builds" option ticked in the settings
No, it was just something I knocked together last night, I was able to reproduce the issue using the following pipeline though:
The
|
I've run a slightly-adjusted (for simplicity) version of your pipeline
against the following configurations:
All of them produced the exact same, correct output. @muppet3000
|
…orizedAction to indicate shortlog ansicolor begin
…an be used more broadly and is backwards serializable
…og coloring to kick-in
…preparing additional action used in shortlog
…ore shortlog position. Add tests
#185 Add RunListener.onFinalized listener. Inject START ActionNote
Escape chars printed raw in partial console output since
0.7.0
(works ok in0.6.3
)Test environment
2.222.3
0.7.0
Linux x64
Expected behavior
I would expect the colors/format to appear correctly when/if Jenkins console truncates long output (
/console
) and not only when the full output is displayed (/consoleFull
).Actual behavior
The escape sequences are printed raw on truncated console output.
[clicking
Full Log
link displays the expected behavior]Steps to reproduce the behavior
Any output that colorizes the output and is truncated by jenkins console doesn't seem to be working as expected.
The text was updated successfully, but these errors were encountered: