Cloudwatch: Change deprecated errorsource references (#97827)
This has been failing to compile, bringing down a _lot_ of tests along with it (notably the entire pkg/tests dir). The `experimental/errorsource` package was deprecated, so the recommended replacement was used.
This commit is contained in:
@@ -58,7 +58,7 @@ func (e *cloudWatchExecutor) executeAnnotationQuery(ctx context.Context, pluginC
|
|||||||
|
|
||||||
cli, err := e.getCWClient(ctx, pluginCtx, region)
|
cli, err := e.getCWClient(ctx, pluginCtx, region)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
result = errorsource.AddDownstreamErrorToResponse(query.RefID, result, fmt.Errorf("%v: %w", "failed to get client", err))
|
result.Responses[query.RefID] = backend.ErrorResponseWithErrorSource(fmt.Errorf("%v: %w", "failed to get client", err))
|
||||||
return result, nil
|
return result, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ var executeSyncLogQuery = func(ctx context.Context, e *cloudWatchExecutor, req *
|
|||||||
|
|
||||||
instance, err := e.getInstance(ctx, req.PluginContext)
|
instance, err := e.getInstance(ctx, req.PluginContext)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
errorsource.AddErrorToResponse(req.Queries[0].RefID, resp, err)
|
resp.Responses[req.Queries[0].RefID] = backend.ErrorResponseWithErrorSource(err)
|
||||||
return resp, nil
|
return resp, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ func (e *cloudWatchExecutor) executeTimeSeriesQuery(ctx context.Context, req *ba
|
|||||||
|
|
||||||
instance, err := e.getInstance(ctx, req.PluginContext)
|
instance, err := e.getInstance(ctx, req.PluginContext)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
errorsource.AddErrorToResponse(req.Queries[0].RefID, resp, err)
|
resp.Responses[req.Queries[0].RefID] = backend.ErrorResponseWithErrorSource(err)
|
||||||
return resp, nil
|
return resp, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user