Skip to content

Commit fc0f611

Browse files
authored
Merge pull request #14 from questdb/misc
Clean up build
2 parents c5cc51c + 956abc0 commit fc0f611

14 files changed

+1518
-1073
lines changed

.github/workflows/dependabot-reviewer.yml

Lines changed: 0 additions & 16 deletions
This file was deleted.

.github/workflows/issue_commands.yml

Lines changed: 0 additions & 21 deletions
This file was deleted.
Lines changed: 133 additions & 133 deletions
Original file line numberDiff line numberDiff line change
@@ -1,133 +1,133 @@
1-
name: Create Docker image for local testing
2-
3-
on:
4-
pull_request:
5-
types: [opened, reopened, synchronize]
6-
branches:
7-
- main
8-
9-
permissions:
10-
pull-requests: write
11-
issues: write
12-
13-
jobs:
14-
build:
15-
name: Build and archive plugin build artifacts
16-
runs-on: ubuntu-latest
17-
strategy:
18-
fail-fast: true
19-
20-
steps:
21-
- uses: actions/checkout@v4
22-
23-
- name: Setup Node.js environment
24-
uses: actions/[email protected]
25-
with:
26-
node-version-file: '.nvmrc'
27-
28-
- name: Install Go environment
29-
uses: actions/setup-go@v5
30-
with:
31-
go-version: 'stable'
32-
33-
- name: Install yarn dependencies
34-
run: yarn install
35-
env:
36-
NODE_OPTIONS: '--max_old_space_size=4096'
37-
38-
- name: Build
39-
run: go build -v ./...
40-
41-
- name: Build Frontend
42-
run: yarn build
43-
env:
44-
NODE_OPTIONS: '--max_old_space_size=4096'
45-
46-
- name: Archive plugin build artifacts
47-
uses: actions/upload-artifact@v4
48-
with:
49-
name: plugin-dist
50-
path: |
51-
dist
52-
retention-days: 1
53-
push_to_registry:
54-
name: Push Docker image to Docker Hub
55-
runs-on: ubuntu-latest
56-
needs: build
57-
steps:
58-
- name: Download plugin build artifacts
59-
uses: actions/download-artifact@v4
60-
id: download
61-
with:
62-
name: plugin-dist
63-
64-
- name: Generate Dockerfile
65-
shell: bash
66-
run: |
67-
echo "FROM grafana/grafana-oss:latest
68-
69-
# Make it as simple as possible to access the grafana instance for development purposes
70-
# Do NOT enable these settings in a public facing / production grafana instance
71-
ENV GF_AUTH_ANONYMOUS_ORG_ROLE "Admin"
72-
ENV GF_AUTH_ANONYMOUS_ENABLED "true"
73-
ENV GF_AUTH_BASIC_ENABLED "false"
74-
75-
# Set development mode so plugins can be loaded without the need to sign
76-
ENV GF_DEFAULT_APP_MODE "development"
77-
78-
# TODO: Cleanup script should remove images from closed PRs using these labels
79-
LABEL gh-sha="${{ github.event.pull_request.head.sha }}"
80-
LABEL gh-repo="${{ github.event.repository.name }}"
81-
LABEL gh-pr-number="${{ github.event.number }}"
82-
83-
# Copy plugin build artifacts into the image
84-
COPY . /var/lib/grafana/plugins/${{ github.event.repository.name }}/" > Dockerfile
85-
86-
- name: Log in to Docker Hub
87-
uses: docker/login-action@v3
88-
with:
89-
username: ${{ secrets.DOCKERHUB_USERNAME }}
90-
password: ${{ secrets.DOCKERHUB_TOKEN }}
91-
92-
- name: Build and push Docker image
93-
uses: docker/build-push-action@v5
94-
with:
95-
context: .
96-
file: ./Dockerfile
97-
push: true
98-
tags: grafana/plugin-builds:${{ github.event.pull_request.head.sha }}pre
99-
add_pr_comment:
100-
name: Add PR comment
101-
runs-on: ubuntu-latest
102-
needs: push_to_registry
103-
steps:
104-
- name: Find previous comment (if any)
105-
uses: peter-evans/find-comment@v2
106-
id: fc
107-
with:
108-
issue-number: ${{ github.event.number }}
109-
body-includes: Use the following command to run this PR with Docker
110-
- name: Update comment on PR
111-
if: steps.fc.outputs.comment-id != ''
112-
uses: peter-evans/create-or-update-comment@v3
113-
with:
114-
comment-id: ${{ steps.fc.outputs.comment-id }}
115-
edit-mode: replace
116-
issue-number: ${{ github.event.number }}
117-
body: |
118-
Use the following command to run this PR with Docker at http://localhost:3000:
119-
120-
```
121-
docker run --rm -p 3000:3000 grafana/plugin-builds:${{ github.event.pull_request.head.sha }}pre
122-
```
123-
- name: Add comment to PR
124-
if: steps.fc.outputs.comment-id == ''
125-
uses: peter-evans/create-or-update-comment@v3
126-
with:
127-
issue-number: ${{ github.event.number }}
128-
body: |
129-
Use the following command to run this PR with Docker at http://localhost:3000:
130-
131-
```
132-
docker run --rm -p 3000:3000 grafana/plugin-builds:${{ github.event.pull_request.head.sha }}pre
133-
```
1+
#name: Create Docker image for local testing
2+
#
3+
#on:
4+
# pull_request:
5+
# types: [opened, reopened, synchronize]
6+
# branches:
7+
# - main
8+
#
9+
#permissions:
10+
# pull-requests: write
11+
# issues: write
12+
#
13+
#jobs:
14+
# build:
15+
# name: Build and archive plugin build artifacts
16+
# runs-on: ubuntu-latest
17+
# strategy:
18+
# fail-fast: true
19+
#
20+
# steps:
21+
# - uses: actions/checkout@v4
22+
#
23+
# - name: Setup Node.js environment
24+
# uses: actions/[email protected]
25+
# with:
26+
# node-version-file: '.nvmrc'
27+
#
28+
# - name: Install Go environment
29+
# uses: actions/setup-go@v5
30+
# with:
31+
# go-version: 'stable'
32+
#
33+
# - name: Install yarn dependencies
34+
# run: yarn install
35+
# env:
36+
# NODE_OPTIONS: '--max_old_space_size=4096'
37+
#
38+
# - name: Build
39+
# run: go build -v ./...
40+
#
41+
# - name: Build Frontend
42+
# run: yarn build
43+
# env:
44+
# NODE_OPTIONS: '--max_old_space_size=4096'
45+
#
46+
# - name: Archive plugin build artifacts
47+
# uses: actions/upload-artifact@v4
48+
# with:
49+
# name: plugin-dist
50+
# path: |
51+
# dist
52+
# retention-days: 1
53+
# push_to_registry:
54+
# name: Push Docker image to Docker Hub
55+
# runs-on: ubuntu-latest
56+
# needs: build
57+
# steps:
58+
# - name: Download plugin build artifacts
59+
# uses: actions/download-artifact@v4
60+
# id: download
61+
# with:
62+
# name: plugin-dist
63+
#
64+
# - name: Generate Dockerfile
65+
# shell: bash
66+
# run: |
67+
# echo "FROM grafana/grafana-oss:latest
68+
#
69+
# # Make it as simple as possible to access the grafana instance for development purposes
70+
# # Do NOT enable these settings in a public facing / production grafana instance
71+
# ENV GF_AUTH_ANONYMOUS_ORG_ROLE "Admin"
72+
# ENV GF_AUTH_ANONYMOUS_ENABLED "true"
73+
# ENV GF_AUTH_BASIC_ENABLED "false"
74+
#
75+
# # Set development mode so plugins can be loaded without the need to sign
76+
# ENV GF_DEFAULT_APP_MODE "development"
77+
#
78+
# # TODO: Cleanup script should remove images from closed PRs using these labels
79+
# LABEL gh-sha="${{ github.event.pull_request.head.sha }}"
80+
# LABEL gh-repo="${{ github.event.repository.name }}"
81+
# LABEL gh-pr-number="${{ github.event.number }}"
82+
#
83+
# # Copy plugin build artifacts into the image
84+
# COPY . /var/lib/grafana/plugins/${{ github.event.repository.name }}/" > Dockerfile
85+
#
86+
# - name: Log in to Docker Hub
87+
# uses: docker/login-action@v3
88+
# with:
89+
# username: ${{ secrets.DOCKERHUB_USERNAME }}
90+
# password: ${{ secrets.DOCKERHUB_TOKEN }}
91+
#
92+
# - name: Build and push Docker image
93+
# uses: docker/build-push-action@v5
94+
# with:
95+
# context: .
96+
# file: ./Dockerfile
97+
# push: true
98+
# tags: grafana/plugin-builds:${{ github.event.pull_request.head.sha }}pre
99+
# add_pr_comment:
100+
# name: Add PR comment
101+
# runs-on: ubuntu-latest
102+
# needs: push_to_registry
103+
# steps:
104+
# - name: Find previous comment (if any)
105+
# uses: peter-evans/find-comment@v2
106+
# id: fc
107+
# with:
108+
# issue-number: ${{ github.event.number }}
109+
# body-includes: Use the following command to run this PR with Docker
110+
# - name: Update comment on PR
111+
# if: steps.fc.outputs.comment-id != ''
112+
# uses: peter-evans/create-or-update-comment@v3
113+
# with:
114+
# comment-id: ${{ steps.fc.outputs.comment-id }}
115+
# edit-mode: replace
116+
# issue-number: ${{ github.event.number }}
117+
# body: |
118+
# Use the following command to run this PR with Docker at http://localhost:3000:
119+
#
120+
# ```
121+
# docker run --rm -p 3000:3000 grafana/plugin-builds:${{ github.event.pull_request.head.sha }}pre
122+
# ```
123+
# - name: Add comment to PR
124+
# if: steps.fc.outputs.comment-id == ''
125+
# uses: peter-evans/create-or-update-comment@v3
126+
# with:
127+
# issue-number: ${{ github.event.number }}
128+
# body: |
129+
# Use the following command to run this PR with Docker at http://localhost:3000:
130+
#
131+
# ```
132+
# docker run --rm -p 3000:3000 grafana/plugin-builds:${{ github.event.pull_request.head.sha }}pre
133+
# ```

.github/workflows/run-backend-tests.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,9 @@ name: run-backend-tests
33
on:
44
push:
55
branches:
6-
- v1
76
- main
87
pull_request:
98
branches:
10-
- v1
119
- main
1210
schedule:
1311
- cron: '0 9 1 * *'

.github/workflows/run-frontend-tests.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,9 @@ name: run-frontend-tests
33
on:
44
push:
55
branches:
6-
- v1
76
- main
87
pull_request:
98
branches:
10-
- v1
119
- main
1210
schedule:
1311
- cron: '0 9 1 * *'

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,4 @@ You need to have commit rights to the GitHub repository to publish a release.
5757
from [GitHub's Release drafter interface](https://github.com/questdb/grafana-questdb-datasource/releases/new) or by
5858
running `npm run generate-release-notes`.
5959
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
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)

README.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# QuestDB data source for Grafana
22

3+
<img alt="Sql builder" src="sql_builder.png" width="800"/>
4+
35
The QuestDB data source plugin allows you to query and visualize QuestDB
46
data from within Grafana.
57

@@ -19,11 +21,17 @@ example, statements like `UPDATE users SET name='blahblah'`
1921
and `DROP TABLE importantTable;` would be executed.
2022

2123
To configure a readonly user, follow these steps:
22-
1. Set the following properties in server.conf file:
23-
- pg.readonly.user.enabled=true
24-
- pg.readonly.user=myuser
25-
- pg.readonly.password=secret
26-
2. Restart QuestDB instance.
24+
* Open Source version
25+
1. Set the following properties in server.conf file:
26+
- pg.readonly.user.enabled=true
27+
- pg.readonly.user=myuser
28+
- pg.readonly.password=secret
29+
2. Restart QuestDB instance.
30+
* Enterprise version
31+
1. Create user:
32+
- CREATE USER grafana_readonly;
33+
2. Grant read permission on selected tables/table columns ;
34+
- GRANT SELECT ON table1, ... TO grafana_readonly;
2735

2836
### Manual configuration
2937

0 commit comments

Comments
 (0)