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

Linux builds don't respect log folding messages #7262

Closed
agc93 opened this issue Feb 3, 2017 · 16 comments
Closed

Linux builds don't respect log folding messages #7262

agc93 opened this issue Feb 3, 2017 · 16 comments
Labels

Comments

@agc93
Copy link

agc93 commented Feb 3, 2017

Injecting code folding messages using the following format:

travis_fold:end:name

works on OS X/macOS builds, but does not work for Linux builds. For example, this build includes the exact same build (with the exact same log output) on both and while log-based folding works correctly on the macOS build (starts on line 229), it doesn't appear to function at all for the Linux build (should start on line 1184, but doesn't).

The service/command messages do not appear in the Linux build's log output so they are clearly being identified/detected by Travis, just the folding is not kicking in.

Note that this only applies to the in-build messages. The environment setup/installer folding is working correctly for both.

@devlead
Copy link

devlead commented Feb 3, 2017

I'm seeing the same thing

Mac fold fine
https://travis-ci.org/WCOMAB/Cake_Git/jobs/190659823#L160

Linux doesn't
https://travis-ci.org/WCOMAB/Cake_Git/jobs/190659822#L1115

@BanzaiMan
Copy link
Contributor

@agc93 Your Linux build https://api.travis-ci.org/jobs/197297726/log.txt does not have any marker that Mac one does https://api.travis-ci.org/jobs/197297727/log.txt. (Search for travis_fold: and compare what you see.)

@devlead Yours looks the same.

@BanzaiMan
Copy link
Contributor

I'm guessing that these compiled binary files Cake.TravisCI.Module.* are responsible for marking your logs. Where did you get them? Do you know if the folding works for Linux?

@devlead
Copy link

devlead commented Feb 3, 2017

@BanzaiMan I'm not using that module, but we're both using Cake build scripts, I'll  try to add some more debug output. Strange thing is that it has worked, it's the same build script for Mac & Linux.  By looking at code , the current theory would be not identifying that it's running under Travis, but that's just checking that the environment variable TRAVIS isn't empty. So one cause could be that Travis isn't delivering that variable?
But I'll add some more logging to a fork to see what's present and not.

@BanzaiMan
Copy link
Contributor

TRAVIS is always set to true on our builds. This has not changed at least in the last 3 years. Try dumping it with echo $TRAVIS.

@agc93
Copy link
Author

agc93 commented Feb 3, 2017

@BanzaiMan I've just run the exact same script locally on a Fedora 25 machine after setting TRAVIS to 1 and I can see the messages being output: https://gist.github.com/agc93/398c9b8701b338f9f8bd58a8ce040405


Anyone can replicate the messages by cloning the repo, setting a non-empty value to TRAVIS and running build.sh (don't worry, doesn't do anything).

@devlead
Copy link

devlead commented Feb 3, 2017

Tracvis does get identified correctly, see here on Linux

Still waiting for Mac build to start.

The raw log does seem truncated/transformed though some = and > chars not displayed locally, I'll try to tee the log and post it somewhere else.

@devlead
Copy link

devlead commented Feb 3, 2017

@devlead
Copy link

devlead commented Feb 3, 2017

Interesting tee:ing the log solves the issue,
https://travis-ci.org/devlead/Cake_Git/jobs/197917264#L1108
https://travis-ci.org/devlead/Cake_Git/jobs/197917264#L1447

So it would seem to be an issue that it's likely (as tee strips that info) Travis's having issues with the colorized log on Linux, but it works on Mac.

@devlead
Copy link

devlead commented Feb 3, 2017

Looks like the raw log indead is mangled on several places when not tee:ing i.e. comparing
https://api.travis-ci.org/jobs/197911946/log.txt?deansi=true
to
https://api.travis-ci.org/jobs/197917264/log.txt?deansi=true
I spot that something is indeed lost
image

And there's several places like that, which can be spotted in the log.

On Mac same thing works regardless of tee:ing or not.

@devlead
Copy link

devlead commented Feb 3, 2017

Did a gist comparing raw unbuffered log with travis raw log
https://gist.github.com/devlead/caa05c1acf2daf83edba5953b1463dd3/revisions#diff-88c4547d54924c2e69e96e3823f1d10eL65
https://gist.github.com/devlead/caa05c1acf2daf83edba5953b1463dd3/revisions#diff-88c4547d54924c2e69e96e3823f1d10eL404

So the service messages are clearly there, although with an escape sequence, but raw log indeed seems filtered.

@agc93
Copy link
Author

agc93 commented Feb 16, 2017

@BanzaiMan any chance we'll see a fix to support folding regardless of any escape sequences?

@devlead
Copy link

devlead commented Feb 16, 2017

@BanzaiMan also would be nice if the raw log wasn't truncated, can be a real wild goose chase troubleshooting if certain details are omitted from the log.

@agc93
Copy link
Author

agc93 commented Mar 9, 2017

@BanzaiMan Any progress on this one?

Log folding is very useful for long logs but extremely limiting to use in its current state.

@BanzaiMan
Copy link
Contributor

Sorry, but we do not have updates to share.

@stale
Copy link

stale bot commented Apr 13, 2018

Thanks for contributing to this issue. As it has been 90 days since the last activity, we are automatically closing the issue. This is often because the request was already solved in some way and it just wasn't updated or it's no longer applicable. If that's not the case, please do feel free to either reopen this issue or open a new one. We'll gladly take a look again! You can read more here: https://blog.travis-ci.com/2018-03-09-closing-old-issues

@stale stale bot added the stale label Apr 13, 2018
@stale stale bot closed this as completed Apr 14, 2018
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

3 participants