merge main
This commit is contained in:
@@ -13,7 +13,6 @@ import (
|
||||
"github.com/grafana/grafana/pkg/plugins/backendplugin"
|
||||
"github.com/grafana/grafana/pkg/plugins/backendplugin/pluginextensionv2"
|
||||
"github.com/grafana/grafana/pkg/plugins/backendplugin/secretsmanagerplugin"
|
||||
"github.com/grafana/grafana/pkg/util/errutil"
|
||||
"github.com/hashicorp/go-plugin"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
@@ -134,7 +133,7 @@ func (c *ClientV2) CheckHealth(ctx context.Context, req *backend.CheckHealthRequ
|
||||
}
|
||||
|
||||
protoContext := backend.ToProto().PluginContext(req.PluginContext)
|
||||
protoResp, err := c.DiagnosticsClient.CheckHealth(ctx, &pluginv2.CheckHealthRequest{PluginContext: protoContext})
|
||||
protoResp, err := c.DiagnosticsClient.CheckHealth(ctx, &pluginv2.CheckHealthRequest{PluginContext: protoContext, Headers: req.Headers})
|
||||
|
||||
if err != nil {
|
||||
if status.Code(err) == codes.Unimplemented {
|
||||
@@ -162,7 +161,7 @@ func (c *ClientV2) QueryData(ctx context.Context, req *backend.QueryDataRequest)
|
||||
return nil, backendplugin.ErrMethodNotImplemented
|
||||
}
|
||||
|
||||
return nil, errutil.Wrap("Failed to query data", err)
|
||||
return nil, fmt.Errorf("%v: %w", "Failed to query data", err)
|
||||
}
|
||||
|
||||
return backend.FromProto().QueryDataResponse(protoResp)
|
||||
@@ -180,7 +179,7 @@ func (c *ClientV2) CallResource(ctx context.Context, req *backend.CallResourceRe
|
||||
return backendplugin.ErrMethodNotImplemented
|
||||
}
|
||||
|
||||
return errutil.Wrap("Failed to call resource", err)
|
||||
return fmt.Errorf("%v: %w", "Failed to call resource", err)
|
||||
}
|
||||
|
||||
for {
|
||||
@@ -194,7 +193,7 @@ func (c *ClientV2) CallResource(ctx context.Context, req *backend.CallResourceRe
|
||||
return nil
|
||||
}
|
||||
|
||||
return errutil.Wrap("failed to receive call resource response", err)
|
||||
return fmt.Errorf("%v: %w", "failed to receive call resource response", err)
|
||||
}
|
||||
|
||||
if err := sender.Send(backend.FromProto().CallResourceResponse(protoResp)); err != nil {
|
||||
@@ -236,7 +235,7 @@ func (c *ClientV2) RunStream(ctx context.Context, req *backend.RunStreamRequest,
|
||||
if status.Code(err) == codes.Unimplemented {
|
||||
return backendplugin.ErrMethodNotImplemented
|
||||
}
|
||||
return errutil.Wrap("Failed to call resource", err)
|
||||
return fmt.Errorf("%v: %w", "Failed to call resource", err)
|
||||
}
|
||||
|
||||
for {
|
||||
|
||||
Reference in New Issue
Block a user