We are running CI on Xenial with Python 3.4 and are having issues with the travis_wait command. The command that we are trying to extend has been failing as soon as it’s executed. (It can’t persist). As soon as the command fails, the CI run does fail as whole as well, which is expected. However, there is never any output logged. This has been failing for a while now and we haven’t been able to figure it out because there is no error logs in the CI run. When the command was successful it would print the log, but never when the command fails. I even fixed the script to have it error after 15 seconds and it still didn’t output anything.
So in summary, the travis_wait command seems to output logs fine when successful, but if the command fails it suppresses the logs and never prints them.
After that last gpg: command it’s running another script with travis_wait and there is no output. If you go to the raw log, you can see only a message that says:
Still running (1 of 50): contrib/verify-commits/verify-commits.py --clean-merge=2
same issue here !
log: https://travis-ci.org/google/or-tools/jobs/517767392
EDIT: my bad, as primary author specifies, logs do not appear until the process finish (or timeout)…
note: so the “Follow Log” feature become useless BTW
...
[ 44%] Performing update step for 'Protobuf_project'
-- Protobuf_project update command succeeded. See also /home/travis/build/google/or-tools/build/dependencies/Protobuf/stamp/Protobuf_project-update-*.log
[ 55%] Performing configure step for 'Protobuf_project'
-- Protobuf_project configure command succeeded. See also /home/travis/build/google/or-tools/build/dependencies/Protobuf/stamp/Protobuf_project-configure-*.log
[ 66%] Performing build step for 'Protobuf_project'
No output has been received in the last 10m0s, this potentially indicates a stalled build or something wrong with the build itself.
Check the details on how to adjust your build configuration on: https://docs.travis-ci.com/user/common-build-problems/#Build-times-out-because-no-output-was-received
The build has been terminated
I had similar problem , and I had python script launching all kind of commands - so I’ve decided - why python cannot just print some dummy message to keep travis ci satisfied. So I’ve coded following snipet, see:
pingTime = 5
stopTimer = False
def pingTravis(doPrint = True):
if stopTimer:
return
if doPrint:
print("- Build still in progress...")
sys.stdout.flush()
threading.Timer(pingTime, pingTravis).start()
pingTravis(False)
execcmd("pause")
stopTimer = True
execcmd("pause")
execcmd can be replaced with os.system call. In code snipet above I’m using pause just if you want to test script locally, but final version can be found behind link below.