Chore: Bump Go to 1.23.0 (#92105)
* chore: Bump Go to 1.23.0 Signed-off-by: Dave Henderson <dave.henderson@grafana.com> * update swagger files Signed-off-by: Dave Henderson <dave.henderson@grafana.com> * chore: update .bingo/README.md formatting to satisfy prettier Signed-off-by: Dave Henderson <dave.henderson@grafana.com> * chore(lint): Fix new lint errors found by golangci-lint 1.60.1 and Go 1.23 Signed-off-by: Dave Henderson <dave.henderson@grafana.com> * keep golden file * update openapi * add name to expected output * chore(lint): rearrange imports to a sensible order Signed-off-by: Dave Henderson <dave.henderson@grafana.com> --------- Signed-off-by: Dave Henderson <dave.henderson@grafana.com> Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
This commit is contained in:
co-authored by
Ryan McKinley
parent
02c820382d
commit
df3d8915ba
@@ -41,13 +41,13 @@ func executeQuery(ctx context.Context, logger log.Logger, query queryModel, runn
|
||||
// the error happens, there is not enough info to create a nice error message)
|
||||
var maxPointError maxPointsExceededError
|
||||
if errors.As(dr.Error, &maxPointError) {
|
||||
text := fmt.Sprintf("A query returned too many datapoints and the results have been truncated at %d points to prevent memory issues. At the current graph size, Grafana can only draw %d.", maxPointError.Count, query.MaxDataPoints)
|
||||
errMsg := "A query returned too many datapoints and the results have been truncated at %d points to prevent memory issues. At the current graph size, Grafana can only draw %d."
|
||||
// we recommend to the user to use AggregateWindow(), but only if it is not already used
|
||||
if !strings.Contains(query.RawQuery, "aggregateWindow(") {
|
||||
text += " Try using the aggregateWindow() function in your query to reduce the number of points returned."
|
||||
errMsg += " Try using the aggregateWindow() function in your query to reduce the number of points returned."
|
||||
}
|
||||
|
||||
dr.Error = fmt.Errorf(text)
|
||||
dr.Error = fmt.Errorf(errMsg, maxPointError.Count, query.MaxDataPoints)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user