Index: logdog/appengine/coordinator/service.go |
diff --git a/logdog/appengine/coordinator/service.go b/logdog/appengine/coordinator/service.go |
index 4a451e654eab64bb4be044ef7c373558988736f8..26dadb169af8e40ff4aa88f16749ec8babc831de 100644 |
--- a/logdog/appengine/coordinator/service.go |
+++ b/logdog/appengine/coordinator/service.go |
@@ -257,12 +257,13 @@ func (s *prodServicesInst) newBigTableStorage(c context.Context) (Storage, error |
return nil, errors.New("failed to create BigTable credentials") |
} |
+ // Use an AppEngine Context so we have access to the socket API. This is |
Vadim Sh.
2016/12/20 21:25:15
this doesn't look like a part of this CL
|
+ // needed by AppEngine Classic for gRPC connections. |
+ // |
// Explicitly clear gRPC metadata from the Context. It is forwarded to |
// delegate calls by default, and standard request metadata can break BigTable |
// calls. |
- c = metadata.NewContext(c, nil) |
- |
- st, err := bigtable.New(c, bigtable.Options{ |
+ st, err := bigtable.New(metadata.NewContext(s.aeCtx, nil), bigtable.Options{ |
Project: bt.Project, |
Instance: bt.Instance, |
LogTable: bt.LogTableName, |
@@ -469,6 +470,9 @@ type URLSigningResponse struct { |
type bigTableStorage struct { |
// Storage is the base storage.Storage instance. |
storage.Storage |
+ // aeCtx is an AppEngine Context with "luci/gae" services also installed. This |
+ // must be used for BigTable access in order to use the AppEngine sockets API. |
+ aeCtx context.Context |
} |
func (*bigTableStorage) GetSignedURLs(context.Context, *URLSigningRequest) (*URLSigningResponse, error) { |