Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1942)

Unified Diff: appengine/cmd/dm/deps/finish_attempt.go

Issue 1537883002: Initial distributor implementation (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/luci-go@master
Patch Set: fix imports and make dummy.go a real file Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « appengine/cmd/dm/deps/ensure_quests_test.go ('k') | appengine/cmd/dm/deps/finish_attempt_test.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/cmd/dm/deps/finish_attempt.go
diff --git a/appengine/cmd/dm/deps/finish_attempt.go b/appengine/cmd/dm/deps/finish_attempt.go
index 70bddb786701bfec44f949faa5324d3a1ed71113..6a71fa2bf9dfb699a7d61dc5dac0c7f21b75c41b 100644
--- a/appengine/cmd/dm/deps/finish_attempt.go
+++ b/appengine/cmd/dm/deps/finish_attempt.go
@@ -20,6 +20,7 @@ import (
const resultMaxLength = 256 * 1024
func (d *deps) FinishAttempt(c context.Context, req *dm.FinishAttemptReq) (_ *google_pb.Empty, err error) {
+ logging.Fields{"execution": req.Auth.Id}.Infof(c, "finishing")
if len(req.JsonResult) > resultMaxLength {
return nil, fmt.Errorf("result payload is too large: %d > %d",
len(req.JsonResult), resultMaxLength)
@@ -27,11 +28,11 @@ func (d *deps) FinishAttempt(c context.Context, req *dm.FinishAttemptReq) (_ *go
req.JsonResult, err = template.NormalizeJSON(req.JsonResult, true)
if err != nil {
- logging.WithError(err).Infof(c, "failed to normalized json")
- return nil, grpcutil.Errf(codes.InvalidArgument, "resuld json had normalization error: %s", err.Error())
+ logging.WithError(err).Infof(c, "failed to normalize json")
+ return nil, grpcutil.Errf(codes.InvalidArgument, "result json had normalization error: %s", err.Error())
}
- return nil, tumbleNow(c, &mutate.FinishAttempt{
+ return &google_pb.Empty{}, tumbleNow(c, &mutate.FinishAttempt{
Auth: req.Auth,
Result: req.JsonResult,
ResultExpiration: req.Expiration.Time(),
« no previous file with comments | « appengine/cmd/dm/deps/ensure_quests_test.go ('k') | appengine/cmd/dm/deps/finish_attempt_test.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698