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

Output truncated with python colorful #211

Closed
bra-fsn opened this issue Dec 11, 2020 · 5 comments
Closed

Output truncated with python colorful #211

bra-fsn opened this issue Dec 11, 2020 · 5 comments
Labels

Comments

@bra-fsn
Copy link

bra-fsn commented Dec 11, 2020

I'm not sure if it's a bug in ansicolor-plugin itself, but at least the output differs from an xterm window.
The problem is the output gets truncated in the Jenkins output, while running the same command in a terminal, it displays fine.
I've opened timofurrer/colorful#46 as well, because I think printing that [26m is the main culprit, but as I mentioned, the output looks just fine in a terminal.

Test environment

- Jenkins Version: 2.260
- AnsiColor Version: 0.7.3
- Operating System running Jenkins: ubuntu 18.04

Expected behavior

I would expect to see the same output as in a terminal.

Actual behavior

Truncates the output:
image

Steps to reproduce the behavior

Python script to trigger it:
https://gist.github.com/bra-fsn/5f875a29bf043ae74748f2f9b2dbac81

@tszmytka
Copy link
Collaborator

Thanks for a detailed report.
I can confirm this (ESC[26) is indeed not working at all in ansi-color. In fact the plugin never had any implementation for this sequence so it is less of a bug and more a new feature request.
I can't say yet if/how complex the implementation might be. I first need to find how it behaves, even the wikipedia article says

ITU T.61 and T.416, not known to be used on terminals

It seems it is pretty exotic.

Would you be able to post a screenshot from your terminal showing it in action with multiple lines of text?

@bra-fsn
Copy link
Author

bra-fsn commented Dec 14, 2020

Would you be able to post a screenshot from your terminal showing it in action with multiple lines of text?

Sure:
image

Here, the Snapshotted step lines got truncated (they should have more info after the in 1).

@tszmytka
Copy link
Collaborator

Thanks but I think you posted the incorrect output coming from Jenkins log (this is useful on its own).

What I was interested to see is your actual terminal (bash/putty etc.) showing how the correct output should look like.
Sorry for not being clear on that.

@stale
Copy link

stale bot commented May 28, 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 May 28, 2021
@stale stale bot closed this as completed Jun 20, 2021
@bra-fsn
Copy link
Author

bra-fsn commented Jun 23, 2021

@tszmytka oh, I haven't responded to this, sorry about that.
Trying to add everything to the context again.
So here's what I can see (the whole output is bigger, I've just extracted a small part of it) in the Jenkins output:
image
And this is what I can see, when I issue a cat /tmp/color1 (line wraps because of the terminal width):
image

Also attaching the file itself:
color1.txt

Running Jenkins 2.290 and ansicolor 0.7.5 ATM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants