Skip to content

Commit b1e417f

Browse files
committed
Merge remote-tracking branch 'upstream/main' into status-history-sorting
2 parents a1e5811 + 8c1c6b5 commit b1e417f

File tree

1,146 files changed

+35918
-7997
lines changed

Some content is hidden

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

1,146 files changed

+35918
-7997
lines changed

.eslintrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2024 The Perses Authors
1+
// Copyright The Perses Authors
22
// Licensed under the Apache License, Version 2.0 (the "License");
33
// you may not use this file except in compliance with the License.
44
// You may obtain a copy of the License at

.github/CODEOWNERS

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# General codeowners for the entire repository
2+
/* @perses/frontend-maintainers-with-random
3+
4+
# Dedicated codeowners for a specific file type
5+
*.ts @perses/frontend-maintainers-with-random
6+
*.tsx @perses/frontend-maintainers-with-random
7+
*.cue @AntoineThebaud
8+
*.go @Nexucis
9+
10+
# Dedicated codeowners for a plugin
11+
/tempo @andreasgerstmayr
12+
13+
# Dedicated codeowners for a specific directory
14+
15+
/docs @AntoineThebaud
16+
/scripts @Nexucis

.github/dependabot.yml

Lines changed: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,29 @@
1-
# Until bug below is sorted we will not allow dependabot to run by itself for npm dependencies
2-
# https://github.com/dependabot/dependabot-core/issues/1190
31
version: 2
42
updates:
5-
- package-ecosystem: "gomod"
6-
directory: "/"
7-
open-pull-requests-limit: 10
8-
schedule:
9-
interval: "weekly"
10-
- package-ecosystem: "github-actions"
11-
directory: "/"
12-
schedule:
13-
interval: "weekly"
3+
- package-ecosystem: "gomod"
4+
directories:
5+
- "**/*"
6+
open-pull-requests-limit: 10
7+
schedule:
8+
interval: "weekly"
9+
groups:
10+
gomod:
11+
patterns:
12+
- "*"
13+
- package-ecosystem: "github-actions"
14+
directory: "/"
15+
schedule:
16+
interval: "weekly"
17+
groups:
18+
actions:
19+
patterns:
20+
- "*"
21+
- package-ecosystem: "docker"
22+
directories:
23+
- "/"
24+
schedule:
25+
interval: "weekly"
26+
groups:
27+
docker:
28+
patterns:
29+
- "*"

.github/pull_request_template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@
2121
## UI Changes
2222

2323
- [ ] Changes that impact the UI include screenshots and/or screencasts of the relevant changes.
24-
- [ ] Code follows the [UI guidelines](https://github.com/perses/perses/blob/main/ui/ui-guidelines.md).
24+
- [ ] Code follows the [UI guidelines](https://github.com/perses/perses/blob/main/ui/ui-guidelines.md).

.github/workflows/ci.yml

Lines changed: 27 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,20 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- name: checkout
18-
uses: actions/checkout@v4
19-
- uses: perses/github-actions@v0.9.0
18+
uses: actions/checkout@v6
19+
- uses: perses/github-actions@v0.11.0
2020
- uses: ./.github/perses-ci/actions/setup_environment
2121
with:
2222
enable_npm: true
2323
enable_go: true
2424
enable_cue: true
25-
cue_version: "v0.12.0"
25+
cue_version: "v0.14.0"
2626
- name: install percli
2727
uses: perses/cli-actions/actions/install_percli@v0.2.0
2828
with:
29-
cli-version: "main-2025-03-20-398b7919-distroless"
29+
cli-version: "v0.53.0-beta.1"
3030
- name: cache cue deps
31-
uses: actions/cache@v4
31+
uses: actions/cache@v5
3232
with:
3333
path: ~/.cache/cue
3434
key: ${{ runner.os }}-cue-${{ hashFiles('**/module.cue') }}
@@ -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@v4
46+
uses: actions/upload-artifact@v6
4747
with:
4848
name: archives
4949
path: |
@@ -56,21 +56,20 @@ jobs:
5656
runs-on: ubuntu-latest
5757
steps:
5858
- name: checkout
59-
uses: actions/checkout@v4
60-
- uses: perses/github-actions@v0.9.0
59+
uses: actions/checkout@v6
60+
- uses: perses/github-actions@v0.11.0
6161
- uses: ./.github/perses-ci/actions/setup_environment
6262
with:
6363
enable_npm: true
6464
- run: npm ci
6565
- run: npm run lint
66-
6766
test-npm:
6867
name: "test-npm"
6968
runs-on: ubuntu-latest
7069
steps:
7170
- name: checkout
72-
uses: actions/checkout@v4
73-
- uses: perses/github-actions@v0.9.0
71+
uses: actions/checkout@v6
72+
- uses: perses/github-actions@v0.11.0
7473
- uses: ./.github/perses-ci/actions/setup_environment
7574
with:
7675
enable_npm: true
@@ -82,52 +81,52 @@ jobs:
8281
runs-on: ubuntu-latest
8382
steps:
8483
- name: checkout
85-
uses: actions/checkout@v4
86-
- uses: perses/github-actions@v0.9.0
84+
uses: actions/checkout@v6
85+
- uses: perses/github-actions@v0.11.0
8786
- uses: ./.github/perses-ci/actions/setup_environment
8887
with:
8988
enable_npm: true
9089
- run: npm ci
9190
- run: npm run type-check
9291

93-
lint-schemas:
92+
validate-schemas:
9493
name: "Validate plugin schemas"
9594
runs-on: ubuntu-latest
9695
steps:
9796
- name: checkout
98-
uses: actions/checkout@v4
99-
- uses: perses/github-actions@v0.9.0
97+
uses: actions/checkout@v6
98+
- uses: perses/github-actions@v0.11.0
10099
- uses: ./.github/perses-ci/actions/setup_environment
101100
with:
102101
enable_go: true
103102
enable_cue: true
104-
cue_version: "v0.12.0"
103+
cue_version: "v0.14.0"
105104
- name: Install percli
106105
uses: perses/cli-actions/actions/install_percli@v0.2.0
107106
with:
108-
cli-version: "v0.51.0-beta.1"
109-
- uses: actions/cache@v4
107+
cli-version: "v0.53.0-beta.1"
108+
- uses: actions/cache@v5
110109
id: cache
111110
with:
112111
path: ~/.cache/cue
113112
key: ${{ runner.os }}-cue-${{ hashFiles('**/module.cue') }}
114113
restore-keys: |
115114
${{ runner.os }}-cue-
116115
- run: make lint-plugins
117-
116+
- run: make test-schemas-plugins
118117
module-check:
119118
name: "Check plugin modules"
120119
runs-on: ubuntu-latest
121120
steps:
122121
- name: checkout
123-
uses: actions/checkout@v4
124-
- uses: perses/github-actions@v0.9.0
122+
uses: actions/checkout@v6
123+
- uses: perses/github-actions@v0.11.0
125124
- uses: ./.github/perses-ci/actions/setup_environment
126125
with:
127126
enable_go: true
128127
enable_cue: true
129-
cue_version: "v0.12.0"
130-
- uses: actions/cache@v4
128+
cue_version: "v0.14.0"
129+
- uses: actions/cache@v5
131130
id: cache
132131
with:
133132
path: ~/.cache/cue
@@ -150,17 +149,17 @@ jobs:
150149
GITHUB_TOKEN: ${{ github.TOKEN }}
151150
steps:
152151
- name: checkout
153-
uses: actions/checkout@v4
154-
- uses: perses/github-actions@v0.9.0
152+
uses: actions/checkout@v6
153+
- uses: perses/github-actions@v0.11.0
155154
- uses: ./.github/perses-ci/actions/setup_environment
156155
with:
157156
enable_npm: true
158157
enable_go: true
159158
enable_cue: true
160-
cue_version: "v0.12.0"
159+
cue_version: "v0.14.0"
161160
nvmrc_path: "./.nvmrc"
162161
- name: Download archive
163-
uses: actions/download-artifact@v4
162+
uses: actions/download-artifact@v7
164163
with:
165164
name: archives
166165
- run: go run ./scripts/upload-archive/upload-archive.go -tag=${{ github.event.release.tag_name }}

.github/workflows/doc.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ jobs:
1616
runs-on: ubuntu-latest
1717
steps:
1818
- name: checkout
19-
uses: actions/checkout@v4
20-
- uses: perses/github-actions@v0.9.0
19+
uses: actions/checkout@v6
20+
- uses: perses/github-actions@v0.11.0
2121
- uses: ./.github/perses-ci/actions/setup_environment
2222
with:
2323
enable_go: true

.github/workflows/go.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: go
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
merge_group:
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: ${{ github.event_name == 'pull_request' || github.ref_name != 'main' }}
12+
13+
jobs:
14+
test-go:
15+
name: "test-go"
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: checkout
19+
uses: actions/checkout@v6
20+
- uses: perses/github-actions@v0.11.0
21+
- uses: ./.github/perses-ci/actions/setup_environment
22+
with:
23+
enable_go: true
24+
enable_cue: true # needed for DaC CLI commands unit tests
25+
cue_version: "v0.14.0"
26+
- name: test
27+
run: make test
28+
golangci:
29+
name: lint
30+
runs-on: ubuntu-latest
31+
steps:
32+
- name: checkout
33+
uses: actions/checkout@v6
34+
- uses: perses/github-actions@v0.11.0
35+
- uses: ./.github/perses-ci/actions/setup_environment
36+
with:
37+
enable_go: true
38+
enable_go_cache: false
39+
enable_npm: false
40+
- name: golangci-lint
41+
uses: golangci/golangci-lint-action@v9.2.0
42+
with:
43+
# 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
45+
- run: make golangci-lint
46+
checklicense:
47+
name: "check license headers"
48+
runs-on: ubuntu-latest
49+
steps:
50+
- name: checkout
51+
uses: actions/checkout@v6
52+
- uses: perses/github-actions@v0.11.0
53+
- uses: ./.github/perses-ci/actions/setup_environment
54+
with:
55+
enable_go: true
56+
- name: check license headers
57+
run: make checklicense

.mdox.validate.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,7 @@ validators:
66
- regex: 'github\.com'
77
type: 'ignore'
88
- regex: 'perses\.dev'
9+
type: 'ignore'
10+
# getting 403 forbidden in the CI
11+
- regex: 'npmjs\.com'
912
type: 'ignore'

Makefile

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ lint-plugins:
1919
@echo ">> Lint all plugins"
2020
$(GO) run ./scripts/lint-plugins/lint-plugins.go
2121

22+
.PHONY: test-schemas-plugins
23+
test-schemas-plugins:
24+
@echo ">> Test schemas of all plugins"
25+
$(GO) run ./scripts/test-schemas-plugins/test-schemas-plugins.go
26+
2227
.PHONY: tidy-modules
2328
tidy-modules:
2429
@echo ">> Tidy CUE module for all plugins"
@@ -34,3 +39,28 @@ checkdocs:
3439
fmt-docs:
3540
@echo ">> format markdown document"
3641
$(MDOX) fmt --soft-wraps -l $$(find . -name '*.md' -not -path "**/node_modules/*" -print) --links.validate.config-file=./.mdox.validate.yaml
42+
43+
.PHONY: golangci-lint
44+
golangci-lint:
45+
@echo ">> Run golangci-lint on all plugins"
46+
$(GO) run ./scripts/golangci-lint/golangci-lint.go
47+
48+
.PHONY: build
49+
build:
50+
@echo ">> Build all plugins"
51+
$(GO) run ./scripts/build-plugins/build-plugins.go
52+
53+
.PHONY: test
54+
test:
55+
@echo ">> running all tests"
56+
$(GO) test -count=1 -v ./...
57+
58+
.PHONY: checklicense
59+
checklicense:
60+
@echo ">> checking license"
61+
$(GO) run ./scripts/check-license --check
62+
63+
.PHONY: fixlicense
64+
fixlicense:
65+
@echo ">> adding license header where it's missing"
66+
$(GO) run ./scripts/check-license --fix

README.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,47 @@ Then in [`perses`](https://github.com/perses/perses) repository:
2323
2. Start the backend: `./scripts/api_backend_dev.sh`
2424
3. Login percli to the backend `percli login http://localhost:8080`
2525
4. Start the plugin development server: `percli plugin start /path/to/the/plugin/dir`
26+
27+
### Working with Snapshots
28+
29+
This will allow you to use the updates from perses core in your plugin so you can test the changes.
30+
31+
1. In perses/perses create a [snapshot](https://github.com/perses/perses/blob/30758a963337564ab58c78646a1134e51d74e146/RELEASE.md?plain=1#L109-L146). Snapshots will be released in npm:
32+
- https://www.npmjs.com/package/@perses-dev/components/
33+
- https://www.npmjs.com/package/@perses-dev/core
34+
- https://www.npmjs.com/package/@perses-dev/plugin-system
35+
- https://www.npmjs.com/package/@perses-dev/dashboards
36+
- https://www.npmjs.com/package/@perses-dev/explore
37+
38+
2. Copy the name of your snapshot, for example `v0.0.0-snapshot-panel-actions-520389b`.
39+
40+
3. In perses/plugin, navigate to the plugin you are changing and install the snapshot npm packages, this should be installed as "dependencies" NOT "peerDependencies" for example:
41+
42+
```
43+
# perses/plugins/timeserieschart/package.json
44+
45+
"dependencies": {
46+
"color-hash": "^2.0.2"
47+
+ "@perses-dev/components": "v0.0.0-snapshot-panel-actions-520389b",
48+
+ "@perses-dev/core": "v0.0.0-snapshot-panel-actions-520389b",
49+
+ "@perses-dev/plugin-system": "v0.0.0-snapshot-panel-actions-520389b"
50+
},
51+
"peerDependencies": {
52+
"@emotion/react": "^11.7.1",
53+
"@emotion/styled": "^11.6.0",
54+
"@hookform/resolvers": "^3.2.0",
55+
- "@perses-dev/components": "^0.51.0-rc.1",
56+
- "@perses-dev/core": "^0.51.0-rc.1",
57+
- "@perses-dev/plugin-system": "^0.51.0-rc.1",
58+
"date-fns": "^4.1.0",
59+
"date-fns-tz": "^3.2.0",
60+
"echarts": "5.5.0",
61+
"lodash": "^4.17.21",
62+
"react": "^17.0.2 || ^18.0.0",
63+
"react-dom": "^17.0.2 || ^18.0.0",
64+
"use-resize-observer": "^9.0.0",
65+
"immer": "^10.1.1"
66+
}
67+
```
68+
69+
4. Then run `npm install` on the plugin folder to update the dependencies of your plugin (e.g., `cd perses/plugins/timeserieschart && npm install`).

0 commit comments

Comments
 (0)