Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementation backend part of plugin in TypeScript #594

Open
wants to merge 72 commits into
base: v3.3
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
b484d6d
initial migration commit
lunaticusgreen Jul 7, 2024
515879f
initial migration commit
lunaticusgreen Jul 7, 2024
c0024d9
add binary builds
lunaticusgreen Jul 7, 2024
ef3f85b
fix tsconfig.json
lunaticusgreen Jul 8, 2024
1ecbb81
Add alerts data processing
lunaticusgreen Jul 9, 2024
13728b3
packages cleanup
lunaticusgreen Jul 10, 2024
068d4e5
packages cleanup
lunaticusgreen Jul 10, 2024
b9004f2
packages cleanup
lunaticusgreen Jul 11, 2024
8b0f07b
packages cleanup
lunaticusgreen Jul 11, 2024
46d4a64
packages cleanup
lunaticusgreen Jul 11, 2024
1ab8cbd
packages cleanup
lunaticusgreen Jul 11, 2024
250faa0
packages cleanup
lunaticusgreen Jul 12, 2024
d4ac99b
fix type
lunaticusgreen Jul 12, 2024
f3a0d2c
fix type
lunaticusgreen Jul 12, 2024
8500693
bugfixes
lunaticusgreen Jul 15, 2024
6df689b
bugfixes
lunaticusgreen Jul 15, 2024
f911620
fix data transformation
lunaticusgreen Jul 15, 2024
62af727
fix data transformation
lunaticusgreen Jul 15, 2024
80a1033
fix data transformation
lunaticusgreen Jul 15, 2024
8057687
fix data transformation
lunaticusgreen Jul 15, 2024
42d6ccb
Merge branch 'master' into be-plugin-ts
lunaticusgreen Jul 15, 2024
b3affa8
Merge branch 'be-plugin-ts' of github.com:Altinity/clickhouse-grafana…
Slach Jul 16, 2024
eb9f98f
package-lock.json after npm install
Slach Jul 16, 2024
9d64f5d
fix Invalid interpolation format for "command" option in service "ba…
Slach Jul 16, 2024
f7343ab
add PKG_CACHE_PATH to backend_builder
Slach Jul 16, 2024
8544934
return back grafana-clickhouse-datasource and upgrade external instal…
Slach Jul 16, 2024
d66ad19
try to debug testflows failures
Slach Jul 16, 2024
000bb74
added healthchecks to proper selenium-standalone works
Slach Jul 16, 2024
87cd379
we don't need grafana_external_install, return -o classic back
Slach Jul 16, 2024
ff43a37
why i need to struggle with testflows instead of develop plugin
Slach Jul 16, 2024
9daaacf
add healthcheck to mysql and postgres docker-compose.yaml services
Slach Jul 16, 2024
2dce9f0
add more logging to failed tests and add trickster to selenium-standa…
Slach Jul 17, 2024
3384e7e
change GF_UNIFIED_ALERTING_ENABLED: false, GF_ALERTING_ENABLED:…
Slach Jul 17, 2024
568ab1b
add Show machine IP
Slach Jul 17, 2024
19b1131
Merge branch 'master' of github.com:Altinity/clickhouse-grafana into …
Slach Jul 17, 2024
69a140b
continue merge with master
Slach Jul 17, 2024
487f21c
remove wrong double `-d` arg in docker-compose up
Slach Jul 17, 2024
aa0f90d
Merge branch 'master' into be-plugin-ts
Slach Aug 11, 2024
f48b182
Merge branch 'master' into be-plugin-ts
Slach Aug 11, 2024
39ae837
Merge branch 'master' into be-plugin-ts
Slach Aug 15, 2024
dd5ea47
Merge branch 'be-plugin-ts' of github.com:Altinity/clickhouse-grafana…
Slach Aug 15, 2024
5ffba51
FIx data processing
lunaticusgreen Aug 26, 2024
f18780c
FIx data processing
lunaticusgreen Aug 26, 2024
ac4349e
FIx data processing
lunaticusgreen Aug 26, 2024
08e20b2
FIx data processing
lunaticusgreen Aug 26, 2024
8dd7a20
Update.
antip00 Aug 28, 2024
fd585ed
Merge https://github.com/Altinity/clickhouse-grafana
antip00 Sep 2, 2024
da610e7
Update.
antip00 Sep 3, 2024
369fd08
merge with master
Slach Sep 5, 2024
accf84f
Merge branch 'be-plugin-ts' of github.com:Altinity/clickhouse-grafana…
Slach Sep 5, 2024
d85e3ea
sync package.json with package-lock.json
Slach Sep 5, 2024
0aa590b
Merge branch 'v3.3' into be-plugin-ts
Slach Sep 13, 2024
c8c51bc
run CI and testflows in any PR
Slach Sep 13, 2024
b9c2a4b
run CI and testflows in any PR
Slach Sep 13, 2024
0ed5e45
Update.
antip00 Sep 16, 2024
404046a
Bump dompurify from 2.5.1 to 2.5.6
dependabot[bot] Sep 16, 2024
26233b4
Adding tests for legacy alerts.
antip00 Sep 18, 2024
a1fd944
Update.
antip00 Sep 18, 2024
cd1233e
Merge https://github.com/Altinity/clickhouse-grafana
antip00 Sep 18, 2024
feddd4c
Update.
antip00 Sep 18, 2024
fdc5498
Update.
antip00 Sep 18, 2024
c14f507
Bump github.com/grafana/grafana-plugin-sdk-go from 0.228.0 to 0.250.0
dependabot[bot] Sep 19, 2024
47a0cbb
Merge pull request #629 from Altinity/dependabot/go_modules/github.co…
Slach Sep 19, 2024
7e3158d
Merge pull request #627 from Altinity/dependabot/npm_and_yarn/dompuri…
Slach Sep 19, 2024
6562289
Merge pull request #628 from antip00/master
Slach Sep 19, 2024
d7a27f7
merge master with be-plugin-ts, resolved conflicts
Slach Sep 19, 2024
e4c7e23
return ffails back
Slach Sep 20, 2024
cfd1cf1
Fix incorrect import
lunaticusgreen Sep 23, 2024
e65cb15
Adding tests for default values.
antip00 Sep 23, 2024
cc4158f
Update.
antip00 Sep 23, 2024
453760e
Merge pull request #631 from antip00/master
Slach Oct 1, 2024
68113d7
merged with master, resolve conflicts
Slach Oct 1, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .config/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
"noImplicitAny": false,
"alwaysStrict": true,
"declaration": false,
"rootDir": "../src",
"baseUrl": "../src",
"typeRoots": ["../node_modules/@types"],
"resolveJsonModule": true
Expand All @@ -22,6 +21,6 @@
},
"transpileOnly": true
},
"include": ["../src", "./types"],
"include": ["../src", "./types", "/Users/lunaticus/Documents/Work/grafana-plugin-sdk-typescript3/**/*"],
Slach marked this conversation as resolved.
Show resolved Hide resolved
"extends": "@grafana/tsconfig"
}
30 changes: 3 additions & 27 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,34 +32,10 @@ jobs:
run: npm run test:ci
- name: Build frontend
run: npm run build

- name: Check for backend
id: check-for-backend
run: |
if [ -f "Magefile.go" ]
then
echo "has-backend=true" >> $GITHUB_OUTPUT
fi

- name: Setup Go environment
if: steps.check-for-backend.outputs.has-backend == 'true'
uses: actions/setup-go@v5
with:
go-version: '1.22'

- name: Test backend
if: steps.check-for-backend.outputs.has-backend == 'true'
uses: magefile/mage-action@v3
with:
version: latest
args: coverage

- name: Build backend
if: steps.check-for-backend.outputs.has-backend == 'true'
uses: magefile/mage-action@v3
with:
version: latest
args: buildAll
run: |
npm run backend:build
npm run backend:build:binary

- name: Check for E2E
id: check-for-e2e
Expand Down
27 changes: 3 additions & 24 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,38 +20,17 @@ jobs:
node-version: '20'
cache: 'npm'

- name: Setup Go environment
uses: actions/setup-go@v5
with:
go-version: '1.22'

- name: Install nodejs dependencies
run: npm ci

- name: Build and test frontend
run: npm run build

- name: Check for backend
id: check-for-backend
- name: Build backend
run: |
if [ -f "Magefile.go" ]
then
echo "has-backend=true" >> $GITHUB_OUTPUT
fi

- name: Test backend
if: steps.check-for-backend.outputs.has-backend == 'true'
uses: magefile/mage-action@v3
with:
version: latest
args: coverage
npm run backend:build
npm run backend:build:binary

- name: Build backend
if: steps.check-for-backend.outputs.has-backend == 'true'
uses: magefile/mage-action@v3
with:
version: latest
args: buildAll

- name: Warn missing Grafana access policy token
run: |
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/testflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,7 @@ jobs:
run: tests/testflows/infra/setup.sh

- name: Run Altinity Grafana Plugin tests
run: python3
-u ./tests/testflows/regression.py --before=0.3 --after=0.3
--log raw.log
-o classic
run: python3 -u ./tests/testflows/regression.py --before=0.3 --after=0.3 --log raw.log -o classic

- name: Create reports
if: always()
Expand Down
12 changes: 0 additions & 12 deletions Magefile.go

This file was deleted.

10 changes: 0 additions & 10 deletions cypress/integration/01-smoke.spec.ts

This file was deleted.

35 changes: 14 additions & 21 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,8 @@ services:
- ./docker/grafana/provisioning/:/etc/grafana/provisioning/
- ./docker/grafana/dashboards/:/var/lib/grafana/dashboards/
- ./docker/grafana/alerting/:/etc/grafana/provisioning/alerting/

environment:
GF_INSTALL_PLUGINS: grafana-piechart-panel,grafana-worldmap-panel,grafana-clickhouse-datasource
GF_INSTALL_PLUGINS: grafana-piechart-panel,grafana-worldmap-panel
GF_LOG_LEVEL: debug
GF_DATABASE_WAL: "true"
GF_UNIFIED_ALERTING_ENABLED: ${GF_UNIFIED_ALERTING_ENABLED:-true}
Expand All @@ -79,13 +78,12 @@ services:
volumes:
- ./docker/grafana/provisioning/:/etc/grafana/provisioning/
- ./docker/grafana/dashboards/:/var/lib/grafana/dashboards/

environment:
GF_INSTALL_PLUGINS: "grafana-piechart-panel,grafana-worldmap-panel,grafana-clickhouse-datasource,https://github.com/Altinity/clickhouse-grafana/releases/download/v${CLICKHOUSE_PLUGIN_VERSION:-3.1.0}/vertamedia-clickhouse-datasource-${CLICKHOUSE_PLUGIN_VERSION:-3.1.0}.zip;vertamedia-clickhouse-datasource"
GF_LOG_LEVEL: debug
GF_DATABASE_WAL: "true"
GF_UNIFIED_ALERTING_ENABLED: ${GF_UNIFIED_ALERTING_ENABLED:-false}
GF_ALERTING_ENABLED: ${GF_ALERTING_ENABLED:-true}
GF_UNIFIED_ALERTING_ENABLED: ${GF_UNIFIED_ALERTING_ENABLED:-true}
GF_ALERTING_ENABLED: ${GF_ALERTING_ENABLED:-false}
ports:
- "3001:3000"
depends_on:
Expand Down Expand Up @@ -115,24 +113,19 @@ services:
'

backend_builder:
image: golang:1.22
working_dir: /go/src/grafana-clickhouse
environment:
GOCACHE: "/go-cache"
RUN_TESTS: "${RUN_TESTS:-.+}"
CGO_ENABLED: "0"
image: node:lts
working_dir: /grafana-clickhouse
volumes:
- ./:/go/src/grafana-clickhouse
- ./.go-cache:/go/pkg/mod
- ./.go-cache:/go-cache
command: |
bash -xec "
git config --global --add safe.directory /go/src/grafana-clickhouse &&
(command -v mage || go install -v github.com/magefile/mage@latest) &&
go test -timeout 1m -failfast -tags=integration -run "${RUN_TESTS:-.+}" -v ./pkg/ &&
mage -v &&
- ./:/grafana-clickhouse
command: >
bash -xec '
if [[ "$(ls -la ./node_modules/ | wc -l)" == "3" ]]; then
npm install;
fi &&
npm run backend:build &&
npm run backend:build:binary &&
chmod +x ./dist/altinity-clickhouse-plugin*
"
'

plugin_signer:
image: node:lts
Expand Down
98 changes: 0 additions & 98 deletions go.mod

This file was deleted.

Loading
Loading