Skip to content

Commit 1eb261e

Browse files
authored
Merge branch 'perses:main' into add-sql-plugin-support
2 parents 3fa2a23 + b2e1a2f commit 1eb261e

662 files changed

Lines changed: 30225 additions & 6908 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintrc.js

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
// See the License for the specific language governing permissions and
1212
// limitations under the License.
1313

14+
// Base eslint configuration for typescript projects
1415
module.exports = {
1516
extends: [
1617
'eslint:recommended',
@@ -48,19 +49,28 @@ module.exports = {
4849
},
4950

5051
rules: {
52+
'@typescript-eslint/explicit-function-return-type': 'error',
53+
'@typescript-eslint/explicit-module-boundary-types': 'error',
54+
5155
'prettier/prettier': 'error',
52-
'@typescript-eslint/explicit-function-return-type': 'off',
53-
'@typescript-eslint/explicit-module-boundary-types': 'off',
5456
'@typescript-eslint/array-type': [
5557
'error',
5658
{
5759
default: 'array-simple',
5860
},
5961
],
62+
eqeqeq: ['error', 'always'],
6063
'import/order': 'error',
6164
// you must disable the base rule as it can report incorrect errors
6265
'no-unused-vars': 'off',
63-
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
66+
'@typescript-eslint/no-unused-vars': [
67+
'error',
68+
{
69+
argsIgnorePattern: '^_',
70+
varsIgnorePattern: '^_',
71+
caughtErrorsIgnorePattern: '^_',
72+
},
73+
],
6474

6575
'react/prop-types': 'off',
6676
'react-hooks/exhaustive-deps': 'error',
@@ -72,6 +82,30 @@ module.exports = {
7282
// because it avoids false errors on cases where we have a regular
7383
// import and an `import type`.
7484
'import/no-duplicates': 'error',
85+
86+
'no-restricted-imports': [
87+
'error',
88+
{
89+
patterns: [
90+
{
91+
/**
92+
* This library is gigantic and named imports end up slowing down builds/blowing out bundle sizes,
93+
* so this prevents that style of import.
94+
*/
95+
group: ['mdi-material-ui', '!mdi-material-ui/'],
96+
message: `
97+
Please use the default import from the icon file directly rather than using a named import.
98+
99+
Good:
100+
import IconName from 'mdi-material-ui/IconName';
101+
102+
Bad:
103+
import { IconName } from 'mdi-material-ui';
104+
`,
105+
},
106+
],
107+
},
108+
],
75109
},
76110

77111
ignorePatterns: ['**/dist'],

.github/dev/docker-compose.ci.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
services:
2+
perses:
3+
image: persesdev/perses:main-2026-02-26-739dc289-distroless-debug
4+
container_name: perses
5+
network_mode: host
6+
environment:
7+
- PERSES_PLUGIN_ENABLE_DEV=true
8+
- PERSES_PLUGIN_ARCHIVE_PATHS_0=/etc/perses/development-archives
9+
- PERSES_PROVISIONING_FOLDERS_0=/etc/perses/provisioning
10+
volumes:
11+
- ../../plugins/development-archives:/etc/perses/development-archives
12+
- ../../e2e/src/data:/etc/perses/provisioning

.github/workflows/ci.yml

Lines changed: 62 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ jobs:
1616
steps:
1717
- name: checkout
1818
uses: actions/checkout@v6
19-
- uses: perses/github-actions@v0.11.0
19+
- uses: perses/github-actions@v0.12.0
2020
- uses: ./.github/perses-ci/actions/setup_environment
2121
with:
2222
enable_npm: true
2323
enable_go: true
2424
enable_cue: true
2525
cue_version: "v0.15.1"
2626
- name: install percli
27-
uses: perses/cli-actions/actions/install_percli@v0.2.0
27+
uses: perses/cli-actions/actions/install_percli@v0.2.1
2828
with:
2929
cli-version: "v0.53.0-rc.0"
3030
- name: cache cue deps
@@ -43,7 +43,7 @@ jobs:
4343
if: github.event_name != 'release'
4444
run: go run ./scripts/build-plugins/build-plugins.go
4545
- name: store plugin archives
46-
uses: actions/upload-artifact@v6
46+
uses: actions/upload-artifact@v7
4747
with:
4848
name: archives
4949
path: |
@@ -57,7 +57,7 @@ jobs:
5757
steps:
5858
- name: checkout
5959
uses: actions/checkout@v6
60-
- uses: perses/github-actions@v0.11.0
60+
- uses: perses/github-actions@v0.12.0
6161
- uses: ./.github/perses-ci/actions/setup_environment
6262
with:
6363
enable_npm: true
@@ -69,40 +69,90 @@ jobs:
6969
steps:
7070
- name: checkout
7171
uses: actions/checkout@v6
72-
- uses: perses/github-actions@v0.11.0
72+
- uses: perses/github-actions@v0.12.0
7373
- uses: ./.github/perses-ci/actions/setup_environment
7474
with:
7575
enable_npm: true
7676
- run: npm ci
7777
- run: npm run test
7878

79+
e2e:
80+
name: "e2e tests"
81+
needs: build # <--- CRITICAL: Wait for build to finish. PERSES_PLUGIN_ARCHIVE_PATHS accepts archive files only
82+
runs-on: ubuntu-latest
83+
steps:
84+
- name: checkout
85+
uses: actions/checkout@v6
86+
- name: download plugin archives
87+
uses: actions/download-artifact@v8 # <--- Download the artifacts to use the archive files
88+
with:
89+
name: archives
90+
path: ./plugins/temp-archives
91+
- name: flatten plugin archives # <--- Move all plugins archive into a single folder for simplicity
92+
run: |
93+
mkdir -p ./plugins/development-archives
94+
find ./plugins/temp-archives -name "*.tar.gz" -exec mv {} ./plugins/development-archives/ \;
95+
rm -rf ./plugins/temp-archives
96+
ls -R ./plugins/development-archives
97+
- name: start dev env
98+
uses: hoverkraft-tech/compose-action@v2.6.0
99+
with:
100+
compose-file: .github/dev/docker-compose.ci.yml
101+
- uses: perses/github-actions@v0.12.0
102+
- uses: ./.github/perses-ci/actions/setup_environment
103+
with:
104+
enable_npm: true
105+
nvmrc_path: ".nvmrc"
106+
- name: install dependencies
107+
run: npm ci
108+
- name: install Playwright browsers
109+
run: npx playwright install --with-deps
110+
working-directory: e2e
111+
- name: run e2e tests
112+
run: npm run test:ci --prefix e2e -- src/tests
113+
114+
79115
type-check:
80116
name: "type-check"
81117
runs-on: ubuntu-latest
82118
steps:
83119
- name: checkout
84120
uses: actions/checkout@v6
85-
- uses: perses/github-actions@v0.11.0
121+
- uses: perses/github-actions@v0.12.0
86122
- uses: ./.github/perses-ci/actions/setup_environment
87123
with:
88124
enable_npm: true
89125
- run: npm ci
90126
- run: npm run type-check
127+
128+
checkformat-cue:
129+
name: "Check CUE files format"
130+
runs-on: ubuntu-latest
131+
steps:
132+
- name: checkout
133+
uses: actions/checkout@v6
134+
- uses: perses/github-actions@v0.12.0
135+
- uses: ./.github/perses-ci/actions/setup_environment
136+
with:
137+
enable_go: true
138+
enable_cue: true
139+
cue_version: "v0.15.1"
140+
- run: make checkformat-cue
91141

92142
validate-schemas:
93143
name: "Validate plugin schemas"
94144
runs-on: ubuntu-latest
95145
steps:
96146
- name: checkout
97147
uses: actions/checkout@v6
98-
- uses: perses/github-actions@v0.11.0
148+
- uses: perses/github-actions@v0.12.0
99149
- uses: ./.github/perses-ci/actions/setup_environment
100150
with:
101151
enable_go: true
102152
enable_cue: true
103153
cue_version: "v0.15.1"
104154
- name: Install percli
105-
uses: perses/cli-actions/actions/install_percli@v0.2.0
155+
uses: perses/cli-actions/actions/install_percli@v0.2.1
106156
with:
107157
cli-version: "v0.53.0-rc.0"
108158
- uses: actions/cache@v5
@@ -114,13 +164,14 @@ jobs:
114164
${{ runner.os }}-cue-
115165
- run: make lint-plugins
116166
- run: make test-schemas-plugins
167+
117168
module-check:
118169
name: "Check plugin modules"
119170
runs-on: ubuntu-latest
120171
steps:
121172
- name: checkout
122173
uses: actions/checkout@v6
123-
- uses: perses/github-actions@v0.11.0
174+
- uses: perses/github-actions@v0.12.0
124175
- uses: ./.github/perses-ci/actions/setup_environment
125176
with:
126177
enable_go: true
@@ -150,7 +201,7 @@ jobs:
150201
steps:
151202
- name: checkout
152203
uses: actions/checkout@v6
153-
- uses: perses/github-actions@v0.11.0
204+
- uses: perses/github-actions@v0.12.0
154205
- uses: ./.github/perses-ci/actions/setup_environment
155206
with:
156207
enable_npm: true
@@ -159,7 +210,7 @@ jobs:
159210
cue_version: "v0.15.1"
160211
nvmrc_path: "./.nvmrc"
161212
- name: Download archive
162-
uses: actions/download-artifact@v7
213+
uses: actions/download-artifact@v8
163214
with:
164215
name: archives
165216
- run: go run ./scripts/upload-archive/upload-archive.go -tag=${{ github.event.release.tag_name }}

.github/workflows/doc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
steps:
1818
- name: checkout
1919
uses: actions/checkout@v6
20-
- uses: perses/github-actions@v0.11.0
20+
- uses: perses/github-actions@v0.12.0
2121
- uses: ./.github/perses-ci/actions/setup_environment
2222
with:
2323
enable_go: true

.github/workflows/go.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
steps:
1818
- name: checkout
1919
uses: actions/checkout@v6
20-
- uses: perses/github-actions@v0.11.0
20+
- uses: perses/github-actions@v0.12.0
2121
- uses: ./.github/perses-ci/actions/setup_environment
2222
with:
2323
enable_go: true
@@ -31,25 +31,25 @@ jobs:
3131
steps:
3232
- name: checkout
3333
uses: actions/checkout@v6
34-
- uses: perses/github-actions@v0.11.0
34+
- uses: perses/github-actions@v0.12.0
3535
- uses: ./.github/perses-ci/actions/setup_environment
3636
with:
3737
enable_go: true
3838
enable_go_cache: false
3939
enable_npm: false
4040
- name: golangci-lint
41-
uses: golangci/golangci-lint-action@v9.2.0
41+
uses: golangci/golangci-lint-action@v9.2.1
4242
with:
4343
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
44-
version: v2.4.0
44+
version: v2.12.2
4545
- run: make golangci-lint
4646
checklicense:
4747
name: "check license headers"
4848
runs-on: ubuntu-latest
4949
steps:
5050
- name: checkout
5151
uses: actions/checkout@v6
52-
- uses: perses/github-actions@v0.11.0
52+
- uses: perses/github-actions@v0.12.0
5353
- uses: ./.github/perses-ci/actions/setup_environment
5454
with:
5555
enable_go: true

Makefile

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@ tidy-modules:
3131

3232
.PHONY: checkdocs
3333
checkdocs:
34-
@echo ">> check format markdown docs"
34+
@echo ">> Check markdown docs format"
3535
@make fmt-docs
3636
@git diff --exit-code -- *.md
3737

3838
.PHONY: fmt-docs
3939
fmt-docs:
40-
@echo ">> format markdown document"
40+
@echo ">> Format markdown documents"
4141
$(MDOX) fmt --soft-wraps -l $$(find . -name '*.md' -not -path "**/node_modules/*" -print) --links.validate.config-file=./.mdox.validate.yaml
4242

4343
.PHONY: golangci-lint
@@ -52,15 +52,25 @@ build:
5252

5353
.PHONY: test
5454
test:
55-
@echo ">> running all tests"
55+
@echo ">> Run all tests"
5656
$(GO) test -count=1 -v ./...
5757

5858
.PHONY: checklicense
5959
checklicense:
60-
@echo ">> checking license"
60+
@echo ">> Check license"
6161
$(GO) run ./scripts/check-license --check
6262

6363
.PHONY: fixlicense
6464
fixlicense:
65-
@echo ">> adding license header where it's missing"
65+
@echo ">> Add license header where it's missing"
6666
$(GO) run ./scripts/check-license --fix
67+
68+
.PHONY: fmt-cue
69+
fmt-cue:
70+
@echo ">> Format CUE files"
71+
./scripts/cue.sh --fmt
72+
73+
.PHONY: checkformat-cue
74+
checkformat-cue:
75+
@echo ">> Check CUE files format"
76+
./scripts/cue.sh --checkformat

barchart/cue.mod/module.cue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ source: {
77
}
88
deps: {
99
"github.com/perses/shared/cue@v0": {
10-
v: "v0.53.0-rc.2"
10+
v: "v0.53.1"
1111
default: true
1212
}
1313
}

barchart/go.mod

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
module github.com/perses/plugins/barchart
22

3-
go 1.25.5
3+
go 1.26.0
44

5-
require github.com/perses/perses v0.53.0-rc.1
5+
require github.com/perses/perses v0.53.1
66

77
require (
88
github.com/beorn7/perks v1.0.1 // indirect
@@ -15,17 +15,18 @@ require (
1515
github.com/muhlemmer/gu v0.3.1 // indirect
1616
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
1717
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect
18+
github.com/perses/common v0.31.0 // indirect
1819
github.com/prometheus/client_golang v1.23.2 // indirect
1920
github.com/prometheus/client_model v0.6.2 // indirect
2021
github.com/prometheus/common v0.67.5 // indirect
2122
github.com/prometheus/procfs v0.17.0 // indirect
22-
github.com/zitadel/oidc/v3 v3.45.3 // indirect
23+
github.com/zitadel/oidc/v3 v3.45.4 // indirect
2324
github.com/zitadel/schema v1.3.2 // indirect
2425
go.yaml.in/yaml/v2 v2.4.3 // indirect
25-
golang.org/x/net v0.48.0 // indirect
26+
golang.org/x/net v0.53.0 // indirect
2627
golang.org/x/oauth2 v0.35.0 // indirect
27-
golang.org/x/sys v0.40.0 // indirect
28-
golang.org/x/text v0.33.0 // indirect
28+
golang.org/x/sys v0.43.0 // indirect
29+
golang.org/x/text v0.36.0 // indirect
2930
google.golang.org/protobuf v1.36.11 // indirect
3031
gopkg.in/yaml.v3 v3.0.1 // indirect
3132
)

0 commit comments

Comments
 (0)