Skip to content

Commit 2156466

Browse files
committed
merge
2 parents 31e6994 + 153db24 commit 2156466

28 files changed

+2383
-417
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: CI
22

33
on: [push, pull_request]
4-
4+
55
jobs:
66
build:
77
runs-on: ubuntu-latest
@@ -57,7 +57,7 @@ jobs:
5757
if: steps.check-for-backend.outputs.has-backend == 'true'
5858
uses: actions/setup-go@v2
5959
with:
60-
go-version: "1.16"
60+
go-version: "1.19"
6161

6262
- name: Test backend
6363
if: steps.check-for-backend.outputs.has-backend == 'true'

data/dump.rdb

-14.6 MB
Binary file not shown.

docker-compose.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ version: '3.4'
22

33
services:
44
redis:
5-
container_name: redismod
6-
image: redislabs/redismod:latest
5+
image: redis/redis-stack-server:latest
76
ports:
87
- '6379:6379'
98

docker-compose/dev.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ version: '3.4'
22

33
services:
44
redis:
5-
container_name: redismod
6-
image: redislabs/redismod:latest
5+
image: redis/redis-stack-server
76
ports:
87
- '6379:6379'
98
volumes:

docker-compose/master.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ version: '3.4'
22

33
services:
44
redis:
5-
container_name: redismod
6-
image: redislabs/redismod:latest
5+
image: redis/redis-stack-server
76
ports:
87
- '6379:6379'
98
volumes:

docker-compose/test.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@ version: '3.4'
22

33
services:
44
redis:
5-
container_name: redis-test
6-
image: redislabs/redismod:latest
5+
image: redis/redis-stack-server
76
ports:
8-
- '63790:6379'
7+
- '6379:6379'
98
volumes:
109
- '../data:/data/:rw'

go.mod

Lines changed: 3 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -4,33 +4,10 @@ go 1.14
44

55
require (
66
bitbucket.org/creachadair/shell v0.0.6
7-
github.com/apache/arrow/go/arrow v0.0.0-20211104181228-706a1d1e1879 // indirect
8-
github.com/cespare/xxhash/v2 v2.1.2 // indirect
9-
github.com/fatih/color v1.13.0 // indirect
10-
github.com/grafana/grafana-plugin-sdk-go v0.114.0
11-
github.com/hashicorp/go-hclog v1.0.0 // indirect
12-
github.com/hashicorp/go-plugin v1.4.3 // indirect
13-
github.com/hashicorp/yamux v0.0.0-20211028200310-0bc27b27de87 // indirect
7+
github.com/grafana/grafana-plugin-sdk-go v0.164.0
148
github.com/jhump/protoreflect v1.10.1 // indirect
15-
github.com/json-iterator/go v1.1.12 // indirect
16-
github.com/klauspost/compress v1.13.6 // indirect
17-
github.com/kr/text v0.2.0 // indirect
18-
github.com/magefile/mage v1.11.0
19-
github.com/mattn/go-colorable v0.1.11 // indirect
9+
github.com/magefile/mage v1.14.0
2010
github.com/mattn/go-runewidth v0.0.13 // indirect
2111
github.com/mediocregopher/radix/v3 v3.8.1
22-
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
23-
github.com/oklog/run v1.1.0 // indirect
24-
github.com/pierrec/lz4/v4 v4.1.10 // indirect
25-
github.com/prometheus/common v0.32.1 // indirect
26-
github.com/prometheus/procfs v0.7.3 // indirect
27-
github.com/stretchr/objx v0.3.0 // indirect
28-
github.com/stretchr/testify v1.7.0
29-
golang.org/x/net v0.0.0-20211104170005-ce137452f963 // indirect
30-
golang.org/x/sys v0.0.0-20211103235746-7861aae1554b // indirect
31-
golang.org/x/text v0.3.7 // indirect
32-
google.golang.org/genproto v0.0.0-20211102202547-e9cf271f7f2c // indirect
33-
google.golang.org/grpc v1.42.0 // indirect
34-
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
35-
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
12+
github.com/stretchr/testify v1.8.2
3613
)

go.sum

Lines changed: 1205 additions & 261 deletions
Large diffs are not rendered by default.

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,11 @@
99
"@types/enzyme": "^3.10.11",
1010
"@types/enzyme-adapter-react-16": "^1.0.6",
1111
"@types/lodash": "4.14.178",
12+
"@wojtekmaj/enzyme-adapter-react-17": "^0.8.0",
1213
"enzyme": "^3.11.0",
13-
"enzyme-adapter-react-16": "^1.15.5"
14+
"enzyme-adapter-react-16": "^1.15.5",
15+
"@types/react-dom": "18.0.11",
16+
"sinon": "^15.1.0"
1417
},
1518
"engines": {
1619
"node": ">=14"

pkg/datasource.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ func (ds *redisDatasource) QueryData(ctx context.Context, req *backend.QueryData
5252
log.DefaultLogger.Debug("QueryData", "request", req)
5353

5454
// Get Instance
55-
client, err := ds.getInstance(req.PluginContext)
55+
client, err := ds.getInstance(ctx, req.PluginContext)
5656
if err != nil {
5757
return nil, err
5858
}
@@ -137,7 +137,7 @@ func (ds *redisDatasource) CheckHealth(ctx context.Context, req *backend.CheckHe
137137
message := "Data Source health is yet to become known."
138138

139139
// Get Instance
140-
client, err := ds.getInstance(req.PluginContext)
140+
client, err := ds.getInstance(ctx, req.PluginContext)
141141

142142
if err != nil {
143143
status = backend.HealthStatusError
@@ -165,8 +165,8 @@ func (ds *redisDatasource) CheckHealth(ctx context.Context, req *backend.CheckHe
165165
/**
166166
* Return Instance
167167
*/
168-
func (ds *redisDatasource) getInstance(ctx backend.PluginContext) (redisClient, error) {
169-
s, err := ds.im.Get(ctx)
168+
func (ds *redisDatasource) getInstance(ctx context.Context, pluginContext backend.PluginContext) (redisClient, error) {
169+
s, err := ds.im.Get(ctx, pluginContext)
170170

171171
if err != nil {
172172
return nil, err

0 commit comments

Comments
 (0)