Build log truncated

Hi, first of all thanks for the awesome service. We use Travis to run a lot of tests for Etherpad and it really, really helps us developing.

In case I should not post this kind of questions/bug reports to the community forum it would be awesome if you could direct me to the proper issue tracker.

Unfortunately, we run into issues with truncated logs. No matter if the build is successful or not, sometimes the log in the Web-UI is truncated. Examples:
https://api.travis-ci.com/v3/job/423103630/log.txt
https://api.travis-ci.com/v3/job/423289803/log.txt
https://api.travis-ci.com/v3/job/423290805/log.txt

When using the API with travis gem it also returns the truncated log. The point where the logs break differ. I have seen this behaviour in the past - I think it was always present, maybe in 1 of 10 builds. Sometimes the full log appeared after some minutes.
However, we migrated from .org to .com lately and now the issue seem to be present nearly every time. Unfortunately I also started to use travis_wait (our test runner can take more than 10 minutes) at around the same time, so this also might be the reason.

I tried different things (redirecting output to a file and cat them, adding sleep after the command that produces the output, pv -q -L 1K to reduce the number of bytes that are transferred to the logs, after_script hook with a sleep statement) without success.

An explanation for this might be at https://github.com/travis-ci/travis-ci/issues/6018#issuecomment-370023238 We indeed use secret environment variables (we need them for saucelabs).
Because debug mode is disabled (it’s a public repo) I cannot tell for sure, if we are using the redirect_io strategy or pty.

Is there a workaround you know of or a way for us to activate pty strategy?

Thanks in advance!

It was my intention to slow down the output with “pv -q -L 1K” but it had no effect.

1 Like

Could you elaborate? pv worked for me: https://travis-ci.com/github/native-api/test_travis/builds/196966381
I only needed to install it since it’s not preinstalled.

Imprint