Deal properly with non-unique buildbot build ids.
In the new buildbot waterfall arrangement, occasionally a buildbot
build id will not be unique. This was causing two different problems
for us, for a buildbot id that is not unique: 1. If our job finished
successfully and generated a build image artifact, we end up finding
multiple artifacts, and we were using the first one founs (which was the
earliest). 2. If the job failed to generate a build artifact, we would
still successfully find a build artifact from an earlier build with the
same id. This CL fixes both problems by 1. Checking the build status
and only looking for a build artifact if the job looks like it succeeded;
2. Sorting the build artifacts we find, to get and use the most recent.
BUG=None
TEST=Tested on the build logs with all the various cases that failed
improperly today.
Change-Id: I627aa48ae13d3c115acd6cb3c411e382f0a8f1c6
Reviewed-on: https://chrome-internal-review.googlesource.com/226096
Commit-Ready: Caroline Tice <cmtice@google.com>
Tested-by: Caroline Tice <cmtice@google.com>
Reviewed-by: Han Shen <shenhan@google.com>
1 file changed