[ARVADOS] updated: 1.1.2-171-gc93eb87
Git user
git at public.curoverse.com
Mon Feb 12 14:53:34 EST 2018
Summary of changes:
sdk/go/httpserver/logger.go | 8 ++++++--
sdk/go/httpserver/responsewriter.go | 3 ---
services/keepstore/config.go | 14 +++++++-------
3 files changed, 13 insertions(+), 12 deletions(-)
via c93eb8717c79922f3e68b13405b5250bb1345d72 (commit)
via 496a9058bc2960a89b66440f8d30f5e92de918db (commit)
from 85398442d095524c5b2f315c294ea81f9d17853b (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit c93eb8717c79922f3e68b13405b5250bb1345d72
Author: Tom Clegg <tclegg at veritasgenetics.com>
Date: Mon Feb 12 14:51:17 2018 -0500
13025: Revert returning WroteStatus()==200 if no header was written.
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tclegg at veritasgenetics.com>
diff --git a/sdk/go/httpserver/logger.go b/sdk/go/httpserver/logger.go
index fab850f..569931a 100644
--- a/sdk/go/httpserver/logger.go
+++ b/sdk/go/httpserver/logger.go
@@ -54,9 +54,13 @@ func logResponse(w *responseTimer, req *http.Request, lgr *logrus.Entry) {
"timeWriteBody": stats.Duration(tDone.Sub(w.writeTime)),
})
}
+ respCode := w.WroteStatus()
+ if respCode == 0 {
+ respCode = http.StatusOK
+ }
lgr.WithFields(logrus.Fields{
- "respStatusCode": w.WroteStatus(),
- "respStatus": http.StatusText(w.WroteStatus()),
+ "respStatusCode": respCode,
+ "respStatus": http.StatusText(respCode),
"respBytes": w.WroteBodyBytes(),
}).Info("response")
}
diff --git a/sdk/go/httpserver/responsewriter.go b/sdk/go/httpserver/responsewriter.go
index 5fb810e..d37822f 100644
--- a/sdk/go/httpserver/responsewriter.go
+++ b/sdk/go/httpserver/responsewriter.go
@@ -48,9 +48,6 @@ func (w *responseWriter) Write(data []byte) (n int, err error) {
}
func (w *responseWriter) WroteStatus() int {
- if w.wroteStatus == 0 {
- return http.StatusOK
- }
return w.wroteStatus
}
commit 496a9058bc2960a89b66440f8d30f5e92de918db
Author: Tom Clegg <tclegg at veritasgenetics.com>
Date: Mon Feb 12 11:30:43 2018 -0500
13025: Lint.
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tclegg at veritasgenetics.com>
diff --git a/services/keepstore/config.go b/services/keepstore/config.go
index bbce883..17d6acd 100644
--- a/services/keepstore/config.go
+++ b/services/keepstore/config.go
@@ -94,11 +94,11 @@ func (cfg *Config) Start() error {
cfg.debugLogf = func(string, ...interface{}) {}
}
- if f := formatter[strings.ToLower(cfg.LogFormat)]; f == nil {
+ f := formatter[strings.ToLower(cfg.LogFormat)]
+ if f == nil {
return fmt.Errorf(`unsupported log format %q (try "text" or "json")`, cfg.LogFormat)
- } else {
- log.Formatter = f
}
+ log.Formatter = f
if cfg.MaxBuffers < 0 {
return fmt.Errorf("MaxBuffers must be greater than zero")
@@ -217,9 +217,9 @@ var VolumeTypes = []func() VolumeWithExamples{}
type VolumeList []Volume
-// UnmarshalJSON, given an array of objects, deserializes each object
-// as the volume type indicated by the object's Type field.
-func (vols *VolumeList) UnmarshalJSON(data []byte) error {
+// UnmarshalJSON -- given an array of objects -- deserializes each
+// object as the volume type indicated by the object's Type field.
+func (vl *VolumeList) UnmarshalJSON(data []byte) error {
typeMap := map[string]func() VolumeWithExamples{}
for _, factory := range VolumeTypes {
t := factory().Type()
@@ -252,7 +252,7 @@ func (vols *VolumeList) UnmarshalJSON(data []byte) error {
if err != nil {
return err
}
- *vols = append(*vols, vol)
+ *vl = append(*vl, vol)
}
return nil
}
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list