Plugins: Bump Plugin SDK version and address instance management breaking changes (#68900)

* bump sdk and propagate ctx

* fix tests
This commit is contained in:
Will Browne
2023-05-24 10:19:34 +02:00
committed by GitHub
parent 7e816d010c
commit 286b9e08e9
50 changed files with 199 additions and 170 deletions
+3 -3
View File
@@ -83,7 +83,7 @@ func (s *Service) QueryData(ctx context.Context, req *backend.QueryDataRequest)
logger.Debug("OpenTsdb request", "params", tsdbQuery)
}
dsInfo, err := s.getDSInfo(req.PluginContext)
dsInfo, err := s.getDSInfo(ctx, req.PluginContext)
if err != nil {
return nil, err
}
@@ -252,8 +252,8 @@ func (s *Service) buildMetric(query backend.DataQuery) map[string]interface{} {
return metric
}
func (s *Service) getDSInfo(pluginCtx backend.PluginContext) (*datasourceInfo, error) {
i, err := s.im.Get(pluginCtx)
func (s *Service) getDSInfo(ctx context.Context, pluginCtx backend.PluginContext) (*datasourceInfo, error) {
i, err := s.im.Get(ctx, pluginCtx)
if err != nil {
return nil, err
}