Add auto log uploader for CI workflow #514
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
This commit is intended to improve failure analysis in Travis and
Jenkins runs by uploading couch log files after failed test runs.
A new script has been added that, upon invocation from the top-level
directory, tars up all EUnit logfiles and the
dev/logs/node1.log
file.It then constructs a document based on the running environment (Travis,
Jenkins, manual). The document is posted to a CouchDB instance running
on couchdb-vm.apache.org with credentials passed in the COUCHAUTH
environment variable.
The
.travis.yml
file has been updated to install the script'sprerequisites (python-requests) and with the secret credentials, and to
instruct travis to run the log uploader after any test failure. Similar
steps will be taken to reconfigure Jenkins after these changes are
merged to master.
The
test/javascript/run
harness had to be modified to terminate afterthe first failure. This is because each new test wipes the logfile of
the previous run. All tests can still be run, regardless of failure, by
specifing the
-a/--all
flag, however it is expected that the reductionin test suite execution time when a test fails will be appreciated by
many.
Testing recommendations
In the process of preparing this branch, Travis has already run multiple
times. I used a now-reverted checkin on the branch that forced a test
to fail to validate that the script worked correctly. One such build is:
https://travis-ci.org/apache/couchdb/builds/230990140
Interestingly, one of the jobs in that run actually encountered a new
test case failure:
https://travis-ci.org/apache/couchdb/jobs/230990141
Note that the URL of the uploaded tarball is displayed at the end
of the logfile (behind the
after_failure
twisty.)For the duration of this PR, you can access the uploaded logs with
the username/password combination
guest:guest
. After merging,CouchDB devs will be given access individually as desired and the
guest login will be disabled.
JIRA issue number
Take your pick of any JIRA ticket on which there is a currently failing test that we can't diagnose because the couch logfiles are missing.
Checklist
with the correct commit hash once this PR get merged.