-
Notifications
You must be signed in to change notification settings - Fork 83
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
Running together with Timestamper prevents AnsiColor 0.7.0 from working correctly, 0.6.3 ok #193
Comments
For any tips for anything else I could try I would be most grateful! |
Thanks for the report and providing detailed information. Unfortunately it is not immediately obvious what might be wrong. Could you then please:
|
@tszmytka yeah that works I also attached here the output file: Also my Jenkinsfile: |
@tszmytka Is it because I am using the Jenkinsfile Groovy plugin https://plugins.jenkins.io/workflow-cps/ ? |
Basic
The output doesn't seem out of the ordinary.
What plugin does the
I doubt it. It is used by probably all people utilizing pipelines so if there was an incompatibility with |
FWIW, AnsiColor 0.7.0 isn't working for us either. We reverted to 0.6.3, which still works works fine. |
Ok, many thanks to @joshdcox for that info. I have also confirmed that by downgrading to 0.6.3, the colouring is working fine for me. |
Same for me (downgrade to On |
I am still unable to reproduce the issue. I suspect (could be wrong) this has everything to do with jobs running on specific agents, although my local setup (with multiple agents) runs all the test cases fine.
@alexharv074 Would you be able to run this against your @joshdcox and @fishi0x01 Thanks for your additional information. Could you please confirm that you are also running your jobs against a remote agent? If so could you also please run my test pipeline and post results? |
I have this issue/regression too (0.7.0 breaks but 0.6.3 works). In case it helps, I'm using this version of the Jenkins JNLP image. It was working fine on AnsiColor 0.6.3, until I migrated to the newer system on AnsiColor 0.7.0. That said, tszmytka's code works: I see the green output (see below).
|
Another idea: Could you please temporarily restart your master with the following JVM option:
run your job again and report if this changes anything? |
(I am very happy with AnsiColor 0.7.0: colours are shown as expected in classic and Blue Ocean UI) |
Doesn't work for me with version |
It's not working for me either on version 0.7.0 and Jenkins 2.235.1 |
Maybe small detail but I'm seeing that with truncated console output, the colors are not displayed. If I view full log, it displays correctly. |
Using the test case in #193 (comment) I see colors render on Jenkins 2.235.1. Here's the raw log output showing a part that should be colorized run through xxd to show where the control sequences are:
But even after a refresh in Jenkins, not rendering color: Pipeline ran:
|
I just wanted to join the chorus of voices on this issue. 0.7.0 does not work for us. I rolled back and it works fine. Here's the test node {
//timestamps
timestamps{
// This displays colors using the 'xterm' ansi color map.
ansiColor('xterm') {
stage ("Look for the colors!"){
echo "\u001B[31mI'm Red\u001B[0m Now not"
sleep 10
echo "\u001B[31mI'm Red\u001B[0m Now not"
}
}
}
} With 0.6.2 this displays red for the "I'm Red" part, with 0.7.0 it prints like this:
EDIT: I just wanted to add that with 0.7.0 this appeared to work fine in Blue Ocean, but we had to rollback because Blue Ocean is not usually the primary interface for our engineers. |
@chder You hit the nail right on the head. Thank you a thousand times.
The Quick tests on my dev setup show that while the following
breaks the escape codes,
does not (in |
Hello, Same issue here... |
…ting to file. This makes the timestamper-decorated (and broken) logger write the content of its buffer also if it does not end with a LF
The problem in this ticket is caused by the The actual fix will also need to be done in |
The newly released All is working fine on my dev setup but - as this was pretty hard to analyze in the wild - could any one of the reporters please review this on your system and confirm it is working for you too?
|
I have updated to
|
How do I reproduce this?
Care to provide a sample pipeline showing how you use both plugins?
Also, which version of Jenkins and timestamper are you using?
…On Wed, Jul 15, 2020, 08:33 Patrick ***@***.***> wrote:
I have updated to v0.7.1 but I didn't see any difference.
[08:32:19]: �[35m�[33m▸�[0m �[39;1mBuild�[0m Succeeded�[0m
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
<#193 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AOQGV4KQG35BJBN3C5JLCOTR3VEURANCNFSM4N3TS2MA>
.
|
…list. This works also if timestamper is used implicitly through global settings
Going through @patricks Is this how you're using it? |
#193 Recognize timestamper's GlobalDecorator from extension list
I just exec a shell command to run a ruby script in my pipeline.
|
Colors still not rendered in declarative pipelines: Jenkins 2.235.2, AnsiColor 0.7.1, Timestamper 1.11.3. Downgrade to AnsiColor 0.6.3 looks fine. |
my case:
Colors cannot show up by:
but works in :
|
@marslo It looks like scripted pipeline. But good to know. For testing I reordered the position in declarative pipeline configuration to meet your conditions ...
... but it doesn't change anything:
|
I would like to encourage someone from this thread to step up to being much more active in debugging, testing and fixing new/existing bugs. Write more unit tests. Try HEAD right now after #198 has been merged. Right now @tszmytka is doing solo work here with barely another pair of eyes on the code (I am not actively using Jenkins anymore, and am not familiar with recent versions and internals). This project needs another highly engaged programmer/co-maintainer to avoid having so many regressions. I also want to say a huge thank you to @tszmytka for carrying this forward! |
I just released
and
and
A small suggestion to anyone suspecting they are suffering from this issue (as till now I can identify people reporting 3 separate issues in this thread - 2 of which fixed): Try disabling |
It looks like the latest |
I can confirm the fix 👍 successfully tested declarative pipeline on:
|
Whatever fix was made it is now working
|
We seem to still be having problems. Our pipelines use this pattern:
Should this use case be working? |
Test environment
How I installed
Showing it is installed:
I also restarted Jenkins (several times).
I have a build step that looks like this:
I also tried:
options { ansiColor('xterm') }
Expected behavior
I expected coloured output from Sceptre and shUnit2.
Actual behavior
It's not coloured:
The text was updated successfully, but these errors were encountered: