Skip to content

Commit 411307e

Browse files
authored
Merge pull request #28 from questdb/test
cleanup
2 parents ae7a811 + 6a0528a commit 411307e

20 files changed

+63
-164
lines changed

.gitignore

-3
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,11 @@ dist/
2424
artifacts/
2525
work/
2626
ci/
27-
e2e-results/
2827

2928
# Editor
3029
.idea
3130

3231
pkg/__debug_bin
3332

34-
provisioning
35-
3633
**/.DS_Store
3734
.eslintcache

CONTRIBUTING.md

+19-22
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
11
# Contributing to QuestDB Datasource
22

33
Thank you for your interest in contributing to this repository. We are glad you want to help us to improve the project and join our community.
4-
Feel free to [browse the open issues](https://github.com/questdb/questdb-grafana-datasource/issues).
5-
If you want more straightforward tasks to complete, [we have some](https://github.com/questdb/grafana-questdb-datasource/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22).
6-
For more details about how you can help, please take a look at [Grafana’s Contributing Guide](https://github.com/questdb/grafana-questdb-datasource/blob/main/CONTRIBUTING.md).
4+
Feel free to [browse the open issues](https://github.com/questdb/questdb-grafana-datasource/issues).
75

86
## Development setup
97

108
### Getting started
119

12-
Clone this repository into your local environment. The frontend code lives in the `src` folder, alongside the [plugin.json file](https://grafana.com/docs/grafana/latest/developers/plugins/metadata/). The backend Go code is in the `pkg` folder. To build this plugin refer to [Build a plugin](https://grafana.com/docs/grafana/latest/developers/plugins/)
10+
Clone this repository into your local environment. The frontend code lives in the `src` folder, alongside the [plugin.json file](https://grafana.com/docs/grafana/latest/developers/plugins/metadata/).
11+
The backend Go code is in the `pkg` folder. To build this plugin refer to [plugin tools(https://grafana.com/developers/plugin-tools).
1312

1413
### Running the development version
1514

16-
Before you can set up the plugin, you need to set up your environment by following [Set up your environment](https://grafana.com/tutorials/build-a-data-source-backend-plugin/#set-up-your-environment).
15+
Before you can set up the plugin, you need to set up your environment by installing:
16+
- [golang 1.21+](https://go.dev/doc/install)
17+
- [nodejs 18+](https://nodejs.org/en/download)
18+
- [mage](https://github.com/magefile/mage)
19+
- [yarn](https://classic.yarnpkg.com/en/docs/install)
1720

1821
#### Compiling the backend
1922

@@ -24,6 +27,12 @@ mage test # run all Go test cases
2427
mage build:backend && mage reloadPlugin # builds and reloads the plugin in Grafana
2528
```
2629

30+
If host operating system is different from one used in grafana docker image use the following instead:
31+
32+
```sh
33+
mage -v buildAll
34+
```
35+
2736
#### Compiling the frontend
2837

2938
You can build and test the frontend by using `yarn`:
@@ -39,22 +48,10 @@ You can also have `yarn` watch for changes and automatically recompile them:
3948
yarn watch
4049
```
4150

42-
#### Running E2E tests locally
43-
44-
1. Install [K6](https://k6.io/docs/get-started/installation/)
45-
2. Run `yarn test:e2e:local`
51+
### Starting docker containers
4652

47-
## Create a pull request
53+
You can start grafana and questdb containers with:
4854

49-
Once you are ready to make a pull request, please read and follow [Create a pull request](https://github.com/grafana/grafana/blob/master/contribute/create-pull-request.md).
50-
51-
## Build a release for the QuestDB data source plugin
52-
53-
You need to have commit rights to the GitHub repository to publish a release.
54-
55-
1. Update the version number in the `package.json` file.
56-
2. Update the `CHANGELOG.md` by copy and pasting the relevant PRs
57-
from [GitHub's Release drafter interface](https://github.com/questdb/grafana-questdb-datasource/releases/new) or by
58-
running `npm run generate-release-notes`.
59-
3. PR the changes.
60-
4. Once merged, follow the Drone release process that you can find [here](https://github.com/grafana/integrations-team/wiki/Plugin-Release-Process#drone-release-proces)
55+
```sh
56+
docker-compose up
57+
```

README.md

+9-6
Original file line numberDiff line numberDiff line change
@@ -54,16 +54,19 @@ datasources:
5454
- name: QuestDB
5555
type: grafana-questdb-datasource
5656
jsonData:
57-
port: 8812
5857
server: localhost
59-
username: username
60-
tlsMode: require
61-
# tlsConfigurationMethod: file-path | file-content
58+
port: 8812
59+
username: admin
60+
tlsMode: disable
61+
# tlsConfigurationMethod: file-path | file-content
62+
# tlsCACertFile: <string>
6263
# timeout: <seconds>
6364
# queryTimeout: <seconds>
64-
# tlsCACertFile: <string>
65+
maxOpenConnections: 100
66+
maxIdleConnections: 100
67+
maxConnectionLifetime: 14400
6568
secureJsonData:
66-
password: password
69+
password: quest
6770
# tlsCACert: <string>
6871
```
6972

docker-compose.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ services:
1717

1818
questdb:
1919
image: 'questdb/questdb:7.3.9'
20-
container_name: 'grafana-qdb-server'
20+
container_name: 'grafana-questdb-server'
2121
ports:
2222
- '8812:8812'
2323
- '9000:9000'

go.mod

+1-10
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@ go 1.21
55
toolchain go1.21.4
66

77
require (
8-
dagger.io/dagger v0.9.6
98
github.com/docker/docker v24.0.7+incompatible
10-
github.com/docker/go-units v0.5.0
119
github.com/grafana/grafana-plugin-sdk-go v0.199.0
1210
github.com/grafana/sqlds/v2 v2.7.2
1311
github.com/lib/pq v1.10.9 // @grafana/backend-platform
@@ -18,19 +16,14 @@ require (
1816
)
1917

2018
require (
21-
github.com/99designs/gqlgen v0.17.31 // indirect
22-
github.com/Khan/genqlient v0.6.0 // indirect
23-
github.com/adrg/xdg v0.4.0 // indirect
2419
github.com/apache/arrow/go/v13 v13.0.0 // indirect
2520
github.com/containerd/log v0.1.0 // indirect
21+
github.com/docker/go-units v0.5.0 // indirect
2622
github.com/goccy/go-json v0.10.0 // indirect
27-
github.com/inconshreveable/mousetrap v1.1.0 // indirect
2823
github.com/klauspost/cpuid/v2 v2.2.3 // indirect
2924
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect
30-
github.com/vektah/gqlparser/v2 v2.5.6 // indirect
3125
github.com/zeebo/xxh3 v1.0.2 // indirect
3226
go.opentelemetry.io/contrib/samplers/jaegerremote v0.15.1 // indirect
33-
golang.org/x/sync v0.4.0 // indirect
3427
google.golang.org/genproto v0.0.0-20231002182017-d307bd883b97 // indirect
3528
)
3629

@@ -115,8 +108,6 @@ require (
115108
github.com/shoenig/go-m1cpu v0.1.6 // indirect
116109
github.com/sirupsen/logrus v1.9.3 // indirect
117110
github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a // indirect
118-
github.com/spf13/cobra v1.8.0
119-
github.com/spf13/pflag v1.0.5 // indirect
120111
github.com/tklauser/go-sysconf v0.3.12 // indirect
121112
github.com/tklauser/numcpus v0.6.1 // indirect
122113
github.com/unknwon/bra v0.0.0-20200517080246-1e3013ecaff8 // indirect

0 commit comments

Comments
 (0)