Skip to content
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

Fixing jenkinsci#216: partial logs not showing colors #220

Closed
wants to merge 1 commit into from

Conversation

roehrijn
Copy link

@roehrijn roehrijn commented Mar 9, 2021

I think this fixes #216. At least it does for my setup. But now the test hudson.plugins.ansicolor.ColorConsoleAnnotatorTest#testNoGlobalPipelineColorMap is failing and I do not fully understand about the mechanism behind.

Problem seems to be a mixture of a missing pipeline step log line which could define the color map name in combination with partial / progressive output. Whenever there is no log line originated from a pipeline step rendered before the first ANSI escape sequence, the color map stays null and the log lines are not converted to (colorful) HTML. This often happens when a lot of colorful logs are written between to pipeline log lines or no pipeline log line at all.

I thought it could be worth providing this PR even though the mentioned test is failing. I hope this can help to start a discussion and I can bring it towards a useful and sustainable fix.

@tszmytka
Copy link
Collaborator

Nice try but this really doesn't fix anything. Much too soon for a PR.
Your change enables the plugin's functionality for most of the output lines no matter if ansicolor is enabled or not which is a pretty important distinction.
Apart from the failing tests it would definitely cause a few additional issues from people using it to handle only part of their logs (or only specific lines).
As I wrote in #216 - what would be really helpful right now is a script or a pipeline reproducing the issue.

@roehrijn
Copy link
Author

I think it is never too soon for a PR. I never expected this to be merged because I new that at least the tests are failing. As I just stated, I wanted to pinpoint the are where the problem is arising.

@tszmytka tszmytka marked this pull request as draft May 13, 2021 17:04
@stale
Copy link

stale bot commented Oct 2, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Oct 2, 2021
@stale stale bot closed this Apr 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

partial logs not showing colors
3 participants