| Index: logdog/appengine/coordinator/endpoints/services/getConfig.go
|
| diff --git a/logdog/appengine/coordinator/endpoints/services/getConfig.go b/logdog/appengine/coordinator/endpoints/services/getConfig.go
|
| index 576228d15dead9870849d76c7ff495b73631ab6e..c85671e0519982af2ab942696a0587ee3f5233df 100644
|
| --- a/logdog/appengine/coordinator/endpoints/services/getConfig.go
|
| +++ b/logdog/appengine/coordinator/endpoints/services/getConfig.go
|
| @@ -10,6 +10,8 @@ import (
|
| "github.com/luci/luci-go/grpc/grpcutil"
|
| "github.com/luci/luci-go/logdog/api/endpoints/coordinator/services/v1"
|
| "github.com/luci/luci-go/logdog/appengine/coordinator"
|
| + "github.com/luci/luci-go/luci_config/appengine/gaeconfig"
|
| +
|
| "golang.org/x/net/context"
|
| )
|
|
|
| @@ -18,15 +20,24 @@ import (
|
| func (s *server) GetConfig(c context.Context, req *google.Empty) (*logdog.GetConfigResponse, error) {
|
| gcfg, err := coordinator.GetServices(c).Config(c)
|
| if err != nil {
|
| - log.Fields{
|
| - log.ErrorKey: err,
|
| - }.Errorf(c, "Failed to load configuration.")
|
| + log.WithError(err).Errorf(c, "Failed to load configuration.")
|
| + return nil, grpcutil.Internal
|
| + }
|
| +
|
| + // Load our config service host from settings.
|
| + settings, err := gaeconfig.FetchCachedSettings(c)
|
| + if err != nil {
|
| + log.WithError(err).Errorf(c, "Failed to load settings.")
|
| return nil, grpcutil.Internal
|
| }
|
|
|
| return &logdog.GetConfigResponse{
|
| - ConfigServiceUrl: gcfg.ConfigServiceURL.String(),
|
| + ConfigServiceHost: settings.ConfigServiceHost,
|
| ConfigSet: string(gcfg.ConfigSet),
|
| ServiceConfigPath: gcfg.ServiceConfigPath,
|
| +
|
| + // TODO(dnj): Deprecate this field once everything has switched over to
|
| + // using host.
|
| + ConfigServiceUrl: gcfg.ConfigServiceURL.String(),
|
| }, nil
|
| }
|
|
|