|
The find_last_activated_task() function script returns None when a build variant has never previously run before. This led to a transient failure when the "Enterprise Ubuntu 16.04 (Clang 3.7/libc++)" builder was added to Evergreen as part of SERVER-27434.
[2016/12/29 20:34:56.709] # Capture a list of new and modified tests.
|
[2016/12/29 20:34:56.709] python buildscripts/burn_in_tests.py --branch=master --buildVariant=enterprise-ubuntu1604-clang-3.7-libcxx --testListOutfile=jstests/new_tests.json --noExec $burn_in_args
|
[2016/12/29 20:35:21.843] Traceback (most recent call last):
|
[2016/12/29 20:35:21.843] Comparing current branch against None
|
[2016/12/29 20:35:21.843] File "buildscripts/burn_in_tests.py", line 425, in <module>
|
[2016/12/29 20:35:21.843] main()
|
[2016/12/29 20:35:21.843] File "buildscripts/burn_in_tests.py", line 391, in main
|
[2016/12/29 20:35:21.843] values.check_evergreen)
|
[2016/12/29 20:35:21.843] File "buildscripts/burn_in_tests.py", line 205, in find_changed_tests
|
[2016/12/29 20:35:21.843] revisions = callo(["git", "rev-list", base_commit + "..." + last_activated]).splitlines()
|
[2016/12/29 20:35:21.843] TypeError: cannot concatenate 'str' and 'NoneType' objects
|
I suspect the find_changed_tests() function should just be changed to default last_activated to "HEAD" when the find_last_activated_task() function returns None.
def find_changed_tests(branch_name, base_commit, max_revisions, buildvariant, check_evergreen):
|
"""
|
Use git to find which files have changed in this patch.
|
TODO: This should be expanded to search for enterprise modules.
|
"""
|
changed_tests = []
|
|
if base_commit is None:
|
base_commit = callo(["git", "merge-base", branch_name + "@{upstream}", "HEAD"]).rstrip()
|
if check_evergreen:
|
# We're going to check up to 200 commits in Evergreen for the last scheduled one.
|
# The current commit will be activated in Evergreen; we use --skip to start at the
|
# previous commit when trying to find the most recent preceding commit that has been
|
# activated.
|
revs_to_check = callo(["git", "rev-list", base_commit,
|
"--max-count=200", "--skip=1"]).splitlines()
|
last_activated = find_last_activated_task(revs_to_check, buildvariant, branch_name)
|
print "Comparing current branch against", last_activated
|
revisions = callo(["git", "rev-list", base_commit + "..." + last_activated]).splitlines()
|
base_commit = last_activated
|
...
|
|