From 3b1236a3b454cb404db82b1075bdafd153730a13 Mon Sep 17 00:00:00 2001 From: Andrew Gerrand Date: Mon, 17 Nov 2014 11:23:56 +1100 Subject: [release-branch.go1.4] create branch --- README | 1 + dashboard/app/cache/cache.go | 25 +++++++++++++++---------- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/README b/README index 916ae2e..8231ee2 100644 --- a/README +++ b/README @@ -8,3 +8,4 @@ Packages include a type-checker for Go and an implementation of the Static Single Assignment form (SSA) representation for Go programs. To submit changes to this repository, see http://golang.org/doc/contribute.html. + diff --git a/dashboard/app/cache/cache.go b/dashboard/app/cache/cache.go index 4b57614..27b14ce 100644 --- a/dashboard/app/cache/cache.go +++ b/dashboard/app/cache/cache.go @@ -40,7 +40,7 @@ func Now(c appengine.Context) uint64 { func Tick(c appengine.Context) uint64 { t, err := memcache.Increment(c, TimeKey, 1, newTime()) if err != nil { - c.Errorf("cache.Tick: %v", err) + c.Errorf("cache: tick: %v", err) return 0 } return t @@ -50,19 +50,21 @@ func Tick(c appengine.Context) uint64 { // value. It reports whether it found the cache record and logs any errors to // the admin console. func Get(r *http.Request, now uint64, name string, value interface{}) bool { + c := appengine.NewContext(r) if now == 0 || r.FormValue(nocache) != "" { + c.Debugf("cache: skipping get: now=%v, nocache=%q", now, nocache) return false } - c := appengine.NewContext(r) key := fmt.Sprintf("%s.%d", name, now) _, err := memcache.JSON.Get(c, key, value) - if err == nil { - c.Debugf("cache hit %q", key) + switch err { + case nil: + c.Debugf("cache: get %q: hit", key) return true - } - c.Debugf("cache miss %q", key) - if err != memcache.ErrCacheMiss { - c.Errorf("get cache %q: %v", key, err) + case memcache.ErrCacheMiss: + c.Debugf("cache: get %q: cache miss", key) + default: + c.Errorf("cache: get %q: %v", key, err) } return false } @@ -70,10 +72,11 @@ func Get(r *http.Request, now uint64, name string, value interface{}) bool { // Set puts value into memcache under name at time now. // It logs any errors to the admin console. func Set(r *http.Request, now uint64, name string, value interface{}) { + c := appengine.NewContext(r) if now == 0 || r.FormValue(nocache) != "" { + c.Debugf("cache: skipping set: now=%v, nocache=%q", now, nocache) return } - c := appengine.NewContext(r) key := fmt.Sprintf("%s.%d", name, now) err := memcache.JSON.Set(c, &memcache.Item{ Key: key, @@ -81,6 +84,8 @@ func Set(r *http.Request, now uint64, name string, value interface{}) { Expiration: expiry, }) if err != nil { - c.Errorf("set cache %q: %v", key, err) + c.Errorf("cache: set %q: %v", key, err) + return } + c.Debugf("cache: set %q: ok", key) } -- cgit v1.2.3 From abf43428cc239218424c7a44dc9b5987cd351c3e Mon Sep 17 00:00:00 2001 From: Andrew Gerrand Date: Mon, 17 Nov 2014 11:28:03 +1100 Subject: x/tools/dashboard/app: ignore freebsd-arm failures TBR=dfc R=dave CC=golang-codereviews https://golang.org/cl/179820043 --- dashboard/app/build/notify.go | 1 + 1 file changed, 1 insertion(+) diff --git a/dashboard/app/build/notify.go b/dashboard/app/build/notify.go index 09ed03d..1a71dd2 100644 --- a/dashboard/app/build/notify.go +++ b/dashboard/app/build/notify.go @@ -38,6 +38,7 @@ const ( var ignoreFailure = map[string]bool{ "dragonfly-386": true, "dragonfly-amd64": true, + "freebsd-arm": true, "netbsd-amd64-bsiegert": true, "netbsd-arm-rpi": true, "plan9-amd64-aram": true, -- cgit v1.2.3