From a190cd2395b7e69f329dec8a9243581b3c643d8a Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Mon, 18 Jul 2016 12:59:53 -0700 Subject: [PATCH] cmd/coordinator: ignore non-master branches when setting repo heads Fixes golang/go#16413 Change-Id: I4876a7ac261bd31918dfebc119997c08ad9af78b Reviewed-on: https://go-review.googlesource.com/25008 Reviewed-by: Andrew Gerrand --- cmd/coordinator/coordinator.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/coordinator/coordinator.go b/cmd/coordinator/coordinator.go index ea409d20..a5fb1673 100644 --- a/cmd/coordinator/coordinator.go +++ b/cmd/coordinator/coordinator.go @@ -660,6 +660,7 @@ func findWork(work chan<- builderRev) error { var goRevisions []string seenSubrepo := make(map[string]bool) + var setGoRepoHead bool for _, br := range bs.Revisions { if br.Repo == "grpc-review" { // Skip the grpc repo. It's only for reviews @@ -668,9 +669,10 @@ func findWork(work chan<- builderRev) error { } awaitSnapshot := false if br.Repo == "go" { - if len(goRevisions) == 0 { + if !setGoRepoHead && br.Branch == "master" { // First Go revision on page; update repo head. setRepoHead(br.Repo, br.Revision) + setGoRepoHead = true } goRevisions = append(goRevisions, br.Revision) } else {