Skip to content

Conversation

@gkrizek
Copy link
Contributor

@gkrizek gkrizek commented Jan 25, 2019

Using the travis_wait command in conjunction with set -o errexit causes problems. The travis_wait command will correctly log the command's output if successful, but if the command fails the process exits before the travis_wait command can dump the logs. This will hide important debugging information like error messages and stack traces. We ran into this in #15196 and it was very hard to debug because output was being suppressed.

travis_wait was being used because the contrib/verify-commits/verify-commits.py script can sometimes run for a long time without producing any output. If a script runs for 10 minutes without logging anything, the CI run times out. The travis_wait command will extend this timeout by logging a message for you, while sending stderr and stdout to a file.

This PR removes the travis_wait command from our CI system and adds additional logging to the verify-commits.py script so it doesn't make Travis timeout.

@Empact
Copy link
Contributor

Empact commented Jan 25, 2019

Concept ACK I've seen this as well

@gkrizek gkrizek force-pushed the remove-travis_wait branch from 6d248b0 to e8d2b2d Compare January 25, 2019 04:42
@Empact
Copy link
Contributor

Empact commented Jan 25, 2019

@gkrizek
Copy link
Contributor Author

gkrizek commented Jan 25, 2019

@Empact Looking at that PR, it seems like that logic was only added to travis_retry and not travis_wait. When this first happened I posted on their forums to get some clarification and their staff pointed out the errexit conflict.

Also, looking at the travis_wait command on Travis master, seems to not catch errors
https://github.com/travis-ci/travis-build/blob/4f580b238530108cdd08719c326cd571d4e7b99f/lib/travis/build/bash/travis_wait.bash#L13

@maflcko
Copy link
Member

maflcko commented Jan 30, 2019

Concept ACK

Also adding progress logging to verify-commits.py script to prevent Travis from timing out
@gkrizek
Copy link
Contributor Author

gkrizek commented Feb 21, 2019

This is updated with @MarcoFalke 's suggestion. This will now detect if the script is running in CI and if it is log level is set to debug. Then it will log every commit that's inspected to prevent Travis from timing out.

@DrahtBot
Copy link
Contributor

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #15693 (travis: Switch to ubuntu keyserver to avoid timeouts by MarcoFalke)

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

@maflcko
Copy link
Member

maflcko commented Mar 29, 2019

utACK 8b8d8ee

maflcko pushed a commit to maflcko/bitcoin-core that referenced this pull request Mar 29, 2019
8b8d8ee Remove travis_wait from lint script (Graham Krizek)

Pull request description:

  Using the `travis_wait` command in conjunction with `set -o errexit` causes problems. The `travis_wait` command will correctly log the command's output if successful, but if the command fails the process exits before the `travis_wait` command can dump the logs. This will hide important debugging information like error messages and stack traces. We ran into this in bitcoin#15196 and it was very hard to debug because output was being suppressed.

  `travis_wait` was being used because the `contrib/verify-commits/verify-commits.py` script can sometimes run for a long time without producing any output. If a script runs for 10 minutes without logging anything, the CI run times out. The `travis_wait` command will extend this timeout by logging a message for you, while sending stderr and stdout to a file.

  This PR removes the `travis_wait` command from our CI system and adds additional logging to the `verify-commits.py` script so it doesn't make Travis timeout.

ACKs for commit 8b8d8e:
  MarcoFalke:
    utACK 8b8d8ee

Tree-SHA512: 175a8dd3f4d4e03ab272ddba94fa8bb06875c9027c3f3f81577feda4bc8918b5f0e003a19027f04f8cf2d0b56c68633716a6ab23f95b910121a8d1132428767d
@maflcko maflcko merged commit 8b8d8ee into bitcoin:master Mar 29, 2019
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Sep 11, 2021
8b8d8ee Remove travis_wait from lint script (Graham Krizek)

Pull request description:

  Using the `travis_wait` command in conjunction with `set -o errexit` causes problems. The `travis_wait` command will correctly log the command's output if successful, but if the command fails the process exits before the `travis_wait` command can dump the logs. This will hide important debugging information like error messages and stack traces. We ran into this in bitcoin#15196 and it was very hard to debug because output was being suppressed.

  `travis_wait` was being used because the `contrib/verify-commits/verify-commits.py` script can sometimes run for a long time without producing any output. If a script runs for 10 minutes without logging anything, the CI run times out. The `travis_wait` command will extend this timeout by logging a message for you, while sending stderr and stdout to a file.

  This PR removes the `travis_wait` command from our CI system and adds additional logging to the `verify-commits.py` script so it doesn't make Travis timeout.

ACKs for commit 8b8d8e:
  MarcoFalke:
    utACK 8b8d8ee

Tree-SHA512: 175a8dd3f4d4e03ab272ddba94fa8bb06875c9027c3f3f81577feda4bc8918b5f0e003a19027f04f8cf2d0b56c68633716a6ab23f95b910121a8d1132428767d
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Dec 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants