Skip to content

Commit 2b9ef1a

Browse files
authored
Add ResponseLimitMiddleware to the datasource (#559)
1 parent ea8aada commit 2b9ef1a

File tree

3 files changed

+27
-1
lines changed

3 files changed

+27
-1
lines changed

CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,27 @@
11
# Changelog
22

3+
## 2.3.0
4+
5+
- Add ResponseLimitMiddleware to the datasource in [#559](https://github.com/grafana/redshift-datasourcce/pull/559)
6+
- Bump github.com/aws/aws-sdk-go-v2 from 1.37.1 to 1.37.2 in [#565](https://github.com/grafana/redshift-datasourcce/pull/565)
7+
- Bump github.com/aws/aws-sdk-go-v2/service/secretsmanager from 1.36.0 to 1.36.1 in [#564](https://github.com/grafana/redshift-datasourcce/pull/564)
8+
- Bump github.com/aws/aws-sdk-go-v2/service/redshiftserverless from 1.27.5 to 1.28.1 in [#562](https://github.com/grafana/redshift-datasourcce/pull/562)
9+
- Bump github.com/aws/aws-sdk-go-v2/service/redshift from 1.54.7 to 1.55.1 in [#561](https://github.com/grafana/redshift-datasourcce/pull/561)
10+
- Bump github.com/aws/aws-sdk-go-v2/service/redshiftdata from 1.33.4 to 1.34.1 in [#560](https://github.com/grafana/redshift-datasourcce/pull/560)
11+
- Bump github.com/aws/aws-sdk-go-v2/service/secretsmanager from 1.35.8 to 1.36.0 in [#555](https://github.com/grafana/redshift-datasourcce/pull/555)
12+
- Bump github.com/aws/aws-sdk-go-v2 from 1.36.6 to 1.37.0 in [#554](https://github.com/grafana/redshift-datasourcce/pull/554)
13+
- Bump @typescript-eslint/eslint-plugin from 8.37.0 to 8.38.0 in [#551](https://github.com/grafana/redshift-datasourcce/pull/551)
14+
- Bump @grafana/plugin-e2e from 2.1.7 to 2.1.8 in [#550](https://github.com/grafana/redshift-datasourcce/pull/550)
15+
- Bump @typescript-eslint/parser from 8.37.0 to 8.38.0 in [#549](https://github.com/grafana/redshift-datasourcce/pull/549)
16+
- Bump jest-environment-jsdom from 30.0.4 to 30.0.5 in [#548](https://github.com/grafana/redshift-datasourcce/pull/548)
17+
- Bump @playwright/test from 1.54.1 to 1.54.2 in [#547](https://github.com/grafana/redshift-datasourcce/pull/547)
18+
- Bump github.com/aws/aws-sdk-go-v2/service/redshift from 1.54.6 to 1.54.7 in [#546](https://github.com/grafana/redshift-datasourcce/pull/546)
19+
- Bump eslint-plugin-prettier from 5.5.1 to 5.5.3 in [#545](https://github.com/grafana/redshift-datasourcce/pull/545)
20+
- Bump jest from 30.0.4 to 30.0.5 in [#544](https://github.com/grafana/redshift-datasourcce/pull/544)
21+
- Bump github.com/grafana/sqlds/v4 from 4.2.6 to 4.2.7 in [#542](https://github.com/grafana/redshift-datasourcce/pull/542)
22+
- Bump github.com/grafana/grafana-aws-sdk from 1.0.5 to 1.1.0 in [#543](https://github.com/grafana/redshift-datasourcce/pull/543)
23+
- Bump github.com/aws/aws-sdk-go-v2/service/redshiftserverless from 1.27.4 to 1.27.5 in [#541](https://github.com/grafana/redshift-datasourcce/pull/541)
24+
325
## 2.2.0
426

527
- Set the default format to table in [#527](https://github.com/grafana/redshift-datasource/pull/527)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "grafana-redshift-datasource",
3-
"version": "2.2.0",
3+
"version": "2.3.0",
44
"description": "Use Amazon Redshift in Grafana",
55
"scripts": {
66
"build": "webpack -c ./.config/webpack/webpack.config.ts --env production",

pkg/redshift/api/api.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ func New(ctx context.Context, settings awsModels.Settings) (api.AWSAPI, error) {
4040
httpClientProvider := sdkhttpclient.NewProvider()
4141
// TODO: Context needs to be added, see https://github.com/grafana/oss-plugin-partnerships/issues/648
4242
httpClientOptions, err := redshiftSettings.Config.HTTPClientOptions(ctx)
43+
44+
cfg := backend.GrafanaConfigFromContext(ctx)
45+
httpClientOptions.Middlewares = append(httpClientOptions.Middlewares, sdkhttpclient.ResponseLimitMiddleware(cfg.ResponseLimit()))
46+
4347
if err != nil {
4448
backend.Logger.Error("failed to create HTTP client options", "error", err.Error())
4549
return nil, err

0 commit comments

Comments
 (0)