dashboard/app: fix report_failed_repro api call

We are seeing the following errors in this handler:
cross-group transaction need to be explicitly specified, see TransactionOptions.Builder.withXG
This commit is contained in:
Dmitry Vyukov 2017-08-04 19:13:46 +02:00
parent 08a7078aab
commit d23bf3250e
2 changed files with 8 additions and 1 deletions

View File

@ -499,7 +499,7 @@ func apiReportFailedRepro(c context.Context, ns string, r *http.Request) (interf
}
return nil
}
if err := datastore.RunInTransaction(c, tx, nil); err != nil {
if err := datastore.RunInTransaction(c, tx, &datastore.TransactionOptions{XG: true}); err != nil {
return nil, err
}
return nil, nil

View File

@ -191,6 +191,13 @@ func TestInvalidBug(t *testing.T) {
ReproC: []byte("int main() { return 1; }"),
}
c.expectEQ(rep, want)
repro := &dashapi.FailedRepro{
Manager: build.Manager,
BuildID: build.ID,
Title: crash1.Title,
}
c.expectOK(c.API(client1, key1, "report_failed_repro", repro, nil))
}
func TestReportingQuota(t *testing.T) {