sweet/benchmarks/go-build: commit perf diagnostics before general commit
Before this CL, because of the order the defers would run in, we'd first
do the commit on the overall diagnostics object before doing the commit
of the perf diagnostics. This would result in the overall commit (which
expects the perf diagnostics to already be there) to try to collect the
committed perf diagnostics file (which hasn't been committed yet, so
doesn't exist at the expected location) and then delete all the
individual diagnostics files including the temp file. Then when we try
to commit the perf diagnostics, the temp file doesn't exist anymore, so
that operation fails.
Make sure to commit the perf diagnostics before committing the combined
diagnostics.
Change-Id: Id018e8162891a662e8bad18f7289da31c36e83c1
Reviewed-on: https://go-review.googlesource.com/c/benchmarks/+/689495
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Michael Matloob <matloob@google.com>
1 file changed