]> Cypherpunks repositories - gostls13.git/commitdiff
misc/dashboard/app: fix build failure notifications
authorAndrew Gerrand <adg@golang.org>
Wed, 6 Jun 2012 23:27:39 +0000 (09:27 +1000)
committerAndrew Gerrand <adg@golang.org>
Wed, 6 Jun 2012 23:27:39 +0000 (09:27 +1000)
The datastore.Query methods once mutated the Query value, but now they return
a derivative query, so the Hash= and ParentHash= filters were not being
applied.

R=golang-dev, bradfitz, dsymonds
CC=golang-dev
https://golang.org/cl/6300058

misc/dashboard/app/build/notify.go

index f4c6733598b728276ca0858df4899f0573279de0..afcc7b2db54c1631a5727ef0532d1d14558e8a64 100644 (file)
@@ -45,7 +45,7 @@ func notifyOnFailure(c appengine.Context, com *Commit, builder string) error {
        if cr.OK {
                // This commit is OK. Notify if next Commit is broken.
                next := new(Commit)
-               q.Filter("ParentHash=", com.Hash)
+               q = q.Filter("ParentHash=", com.Hash)
                if err := firstMatch(c, q, next); err != nil {
                        if err == datastore.ErrNoSuchEntity {
                                // OK at tip, no notification necessary.
@@ -61,7 +61,7 @@ func notifyOnFailure(c appengine.Context, com *Commit, builder string) error {
        } else {
                // This commit is broken. Notify if the previous Commit is OK.
                prev := new(Commit)
-               q.Filter("Hash=", com.ParentHash)
+               q = q.Filter("Hash=", com.ParentHash)
                if err := firstMatch(c, q, prev); err != nil {
                        if err == datastore.ErrNoSuchEntity {
                                // No previous result, let the backfill of