]> Cypherpunks repositories - gostls13.git/commitdiff
dashboard: don't send failing Go commits as todos for subrepos
authorAndrew Gerrand <adg@golang.org>
Fri, 3 Feb 2012 03:03:46 +0000 (14:03 +1100)
committerAndrew Gerrand <adg@golang.org>
Fri, 3 Feb 2012 03:03:46 +0000 (14:03 +1100)
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5608044

misc/dashboard/app/build/handler.go

index 4aa161e8d2269e8e91af5bbf9f8bc13a4c0db54b..c74c54a98f40156ed457f10d5a3ba1f3805d1a58 100644 (file)
@@ -215,10 +215,22 @@ func buildTodo(c appengine.Context, builder, packagePath, goHash string) (interf
        // see if there are any subrepo commits that need to be built at tip.
        // If so, ask the builder to build a go tree at the tip commit.
        // TODO(adg): do the same for "weekly" and "release" tags.
+
        tag, err := GetTag(c, "tip")
        if err != nil {
                return nil, err
        }
+
+       // Check that this Go commit builds OK for this builder.
+       // If not, don't re-build as the subrepos will never get built anyway.
+       com, err := tag.Commit(c)
+       if err != nil {
+               return nil, err
+       }
+       if r := com.Result(builder, ""); r != nil && !r.OK {
+               return nil, nil
+       }
+
        pkgs, err := Packages(c, "subrepo")
        if err != nil {
                return nil, err
@@ -233,6 +245,7 @@ func buildTodo(c appengine.Context, builder, packagePath, goHash string) (interf
                        return tag.Commit(c)
                }
        }
+
        return nil, nil
 }