It would be nice to run these alongside the tests. There is only one
vet error left in the x/build tree, an unreachable return next to a
TODO.

Change-Id: Ic31d96cdee5bb0f6b9795237ff3b743a4b76e3cf
Reviewed-on: https://go-review.googlesource.com/36898
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Kevin Burke 2017-02-12 01:18:14 -08:00 коммит произвёл Brad Fitzpatrick
Родитель 49a8dd97b8
Коммит b7a944e366
7 изменённых файлов: 7 добавлений и 7 удалений

Просмотреть файл

@ -1236,7 +1236,7 @@ func configureMacStadium() {
version, err := exec.Command("sw_vers", "-productVersion").Output()
if err != nil {
log.Fatal("failed to find sw_vers -productVersion: %v", err)
log.Fatalf("failed to find sw_vers -productVersion: %v", err)
}
majorMinor := regexp.MustCompile(`^(\d+)\.(\d+)`)
m := majorMinor.FindStringSubmatch(string(version))

Просмотреть файл

@ -222,7 +222,7 @@ func (p *kubeBuildletPool) GetBuildlet(ctx context.Context, hostType string, lg
bc, err := buildlet.StartPod(ctx, buildletsKubeClient, podName, hostType, buildlet.PodOpts{
ProjectID: buildEnv.ProjectName,
ImageRegistry: registryPrefix,
Description: fmt.Sprintf("Go Builder for %s at %s", hostType),
Description: fmt.Sprintf("Go Builder for %s", hostType),
DeleteIn: deleteIn,
OnPodCreating: func() {
lg.logEventTime("pod_creating")
@ -412,7 +412,7 @@ func (p *kubeBuildletPool) cleanUpOldPods(ctx context.Context) {
}
if err == nil && time.Now().Unix() > unixDeadline {
stats.DeletedOld++
log.Printf("Deleting expired pod %q in zone %q ...", pod.Name)
log.Printf("Deleting expired pod %q in zone %q ...", pod.Name, buildEnv.Zone)
err = buildletsKubeClient.DeletePod(ctx, pod.Name)
if err != nil {
log.Printf("problem deleting old pod %q: %v", pod.Name, err)

Просмотреть файл

@ -112,6 +112,7 @@ func handleBuildletCreate(w http.ResponseWriter, r *http.Request) {
ctx := context.WithValue(context.Background(), buildletTimeoutOpt{}, time.Duration(0))
ctx, cancel := context.WithCancel(ctx)
defer cancel()
// Doing a release?
if user == "release" || user == "adg" || user == "bradfitz" {

Просмотреть файл

@ -1234,7 +1234,7 @@ func readKey() (string, error) {
if os.IsNotExist(err) && metadata.OnGCE() {
key, err := metadata.ProjectAttributeValue("builder-master-key")
if err != nil {
return "", fmt.Errorf("-key=%s doesn't exist, and key can't be loaded from GCE metadata: %v", err)
return "", fmt.Errorf("-key=%s doesn't exist, and key can't be loaded from GCE metadata: %v", *keyFile, err)
}
return strings.TrimSpace(key), nil
}

Просмотреть файл

@ -69,7 +69,7 @@ func main() {
// State is the state of the world.
type State struct {
mu sync.Mutex `json:"-"`
mu sync.Mutex
Hosts map[string]int // IP address -> running Mac VM count (including 0)
VMHost map[string]string // "mac_10_8_host2b" => "10.0.0.0"

Просмотреть файл

@ -206,7 +206,6 @@ func (d *display) short(s interface{}) interface{} {
default:
return s
}
return s
}
// css returns name if cond is true; otherwise it returns the empty string.

Просмотреть файл

@ -223,7 +223,7 @@ func (c *Client) DeletePod(ctx context.Context, podName string) error {
body, err := ioutil.ReadAll(res.Body)
res.Body.Close()
if err != nil {
return fmt.Errorf("failed to read response body: DELETE %q: %v, url, err")
return fmt.Errorf("failed to read response body: DELETE %q: %v", url, err)
}
if res.StatusCode != http.StatusOK {
return fmt.Errorf("http error: %d DELETE %q: %q: %v", res.StatusCode, url, string(body), err)