mirror of
https://github.com/grafana/grafana.git
synced 2026-01-06 17:33:49 +08:00
Compare commits
217 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b2c053e5b4 | ||
|
|
fccf08107b | ||
|
|
4fdbca747c | ||
|
|
249218b089 | ||
|
|
ed487355a9 | ||
|
|
17f973b8e6 | ||
|
|
dbbb357681 | ||
|
|
5fcb301765 | ||
|
|
18aeac0c5b | ||
|
|
9ca175cbfb | ||
|
|
d564bec2c4 | ||
|
|
4dce0b3ce7 | ||
|
|
4c76044f05 | ||
|
|
4d58cbd301 | ||
|
|
c2535206ce | ||
|
|
96f879808b | ||
|
|
7d6566959b | ||
|
|
eb1b89b26d | ||
|
|
32e24d1d7d | ||
|
|
13fb4acc31 | ||
|
|
aec2368800 | ||
|
|
ec687036e5 | ||
|
|
8d41b98037 | ||
|
|
639ed2366d | ||
|
|
c9e5cc32fd | ||
|
|
9fe605265d | ||
|
|
46651214d8 | ||
|
|
13dbd81407 | ||
|
|
2e2ef4e402 | ||
|
|
b0faef336b | ||
|
|
249f8fe115 | ||
|
|
4be9eebb8e | ||
|
|
44f2b5d9c5 | ||
|
|
ed5b6179ac | ||
|
|
dcdf148140 | ||
|
|
1256172df5 | ||
|
|
9731d7c0f7 | ||
|
|
09ed2369ce | ||
|
|
33eaec336e | ||
|
|
312b99f68e | ||
|
|
da500a56b3 | ||
|
|
783216e4b9 | ||
|
|
cc2941b1b8 | ||
|
|
1c6687ac61 | ||
|
|
53d92abf74 | ||
|
|
bacab3498c | ||
|
|
90646fa1e6 | ||
|
|
ca5554e88d | ||
|
|
d6dd16fdf9 | ||
|
|
fc43fecb81 | ||
|
|
b549030921 | ||
|
|
e998da3163 | ||
|
|
374e83718e | ||
|
|
b6d5da870d | ||
|
|
90cd1d9ca2 | ||
|
|
0eef9d22d2 | ||
|
|
34d6127e3d | ||
|
|
07005383db | ||
|
|
d5a6f8eed0 | ||
|
|
0d08409945 | ||
|
|
ee41006ac2 | ||
|
|
4d59d59425 | ||
|
|
567fbab84a | ||
|
|
7045ce16dd | ||
|
|
49b6f2847d | ||
|
|
a07b6c7c95 | ||
|
|
f19611aa9f | ||
|
|
a3e7b4bbba | ||
|
|
59c9ddba40 | ||
|
|
6941bd5fc8 | ||
|
|
ae03217b9c | ||
|
|
68665e4ce9 | ||
|
|
738cc49ec5 | ||
|
|
bb5d2c83ef | ||
|
|
b7d434faaf | ||
|
|
f4e7402e3f | ||
|
|
4c70fd6a3e | ||
|
|
78d19bfa11 | ||
|
|
4aa2bb630e | ||
|
|
8c9d4696e1 | ||
|
|
39df6fb2fa | ||
|
|
3d38f30ff4 | ||
|
|
fe032f10c7 | ||
|
|
61d9102d98 | ||
|
|
99bd39539b | ||
|
|
a1751ab900 | ||
|
|
2c084e6113 | ||
|
|
93d25da8c1 | ||
|
|
78680389b3 | ||
|
|
a8ed6c49e3 | ||
|
|
9f22e97ab6 | ||
|
|
8a8679fc4e | ||
|
|
8a219d5d18 | ||
|
|
c17f395374 | ||
|
|
8007be0b57 | ||
|
|
ec81c967b6 | ||
|
|
beac3bdbcb | ||
|
|
00614f2813 | ||
|
|
16bca1736d | ||
|
|
907916dc39 | ||
|
|
417edf5c43 | ||
|
|
a034ed6f1b | ||
|
|
bf264b2df3 | ||
|
|
bd59be01e8 | ||
|
|
8ecf1dff7e | ||
|
|
12a3a261a2 | ||
|
|
b4f4b3e9b4 | ||
|
|
c2e78f5cd6 | ||
|
|
f5cebcca1b | ||
|
|
009a75f796 | ||
|
|
7e742cdaa2 | ||
|
|
17fce96f7f | ||
|
|
220f0a5b42 | ||
|
|
61662f3574 | ||
|
|
2c8c2199a1 | ||
|
|
6a9fc2ac93 | ||
|
|
af6b53420b | ||
|
|
ed0cd7ee06 | ||
|
|
104daa45db | ||
|
|
7e9f8a8779 | ||
|
|
1d30eb36d9 | ||
|
|
27cd35a97b | ||
|
|
41bd47700a | ||
|
|
6f27663318 | ||
|
|
be8ff40d58 | ||
|
|
e0dbd8f3f2 | ||
|
|
af1aaab3a6 | ||
|
|
b1a552bd07 | ||
|
|
26822fae62 | ||
|
|
abd9e86fe6 | ||
|
|
eab471a17c | ||
|
|
c5ea48aec9 | ||
|
|
5c39ab885d | ||
|
|
2efd32d5e4 | ||
|
|
1af63c69f8 | ||
|
|
3124df86a9 | ||
|
|
e5bbc6f17a | ||
|
|
64b649e407 | ||
|
|
b8c48273db | ||
|
|
06a25efb55 | ||
|
|
d4241ea163 | ||
|
|
0d3206db83 | ||
|
|
6920f9118c | ||
|
|
cbf4bd59fa | ||
|
|
c20fd6e7f5 | ||
|
|
37b9d659a7 | ||
|
|
6452e9665e | ||
|
|
2d0723ffc8 | ||
|
|
a56e351bc8 | ||
|
|
cae1635c8f | ||
|
|
b1751659c7 | ||
|
|
2835a1c9c7 | ||
|
|
460dfdd63d | ||
|
|
69139f20a5 | ||
|
|
8c8a2d77bf | ||
|
|
e60254c952 | ||
|
|
8caf0df5a4 | ||
|
|
11b8626b36 | ||
|
|
c032def097 | ||
|
|
5510541ae7 | ||
|
|
81c03daac3 | ||
|
|
244d0cf46a | ||
|
|
fbcdaccb6d | ||
|
|
bd64166681 | ||
|
|
60ea823a60 | ||
|
|
b908b86d22 | ||
|
|
9cafc1abe4 | ||
|
|
e0c2a0a219 | ||
|
|
801dd891b8 | ||
|
|
bf610cb029 | ||
|
|
36102bbaef | ||
|
|
66034f5eb7 | ||
|
|
6f5e8414b3 | ||
|
|
4cf941e19f | ||
|
|
64e4b0ec6a | ||
|
|
80b3b5d292 | ||
|
|
82eccf0672 | ||
|
|
6a89d906cc | ||
|
|
795025156e | ||
|
|
b5eeb5fd92 | ||
|
|
7910226cdf | ||
|
|
446501ffd1 | ||
|
|
fe6cc7bcb5 | ||
|
|
0b55fd04bc | ||
|
|
b1a42dd55a | ||
|
|
b97bf4c632 | ||
|
|
bbefb6a4eb | ||
|
|
9b283e650d | ||
|
|
e4a82fedbd | ||
|
|
d19a851353 | ||
|
|
3531b585e3 | ||
|
|
e62f0388da | ||
|
|
6257deeae6 | ||
|
|
5ec9cd017b | ||
|
|
10e913ac79 | ||
|
|
f96fb799a9 | ||
|
|
212fe5d179 | ||
|
|
36dbcbc78a | ||
|
|
3418e01da5 | ||
|
|
c4f072e4a9 | ||
|
|
ba5cc1b089 | ||
|
|
34289b84fd | ||
|
|
cdc07eb126 | ||
|
|
1d165ba391 | ||
|
|
4690d88c52 | ||
|
|
7535629551 | ||
|
|
badcca2bb2 | ||
|
|
96ba44c802 | ||
|
|
37b9dc0a37 | ||
|
|
9bfa4a6ce6 | ||
|
|
5c6f18a18b | ||
|
|
cad1d4541b | ||
|
|
36dd8f50de | ||
|
|
1d6d252e1d | ||
|
|
92ba78cd95 | ||
|
|
db381f3afd | ||
|
|
e20392c206 |
1169
.betterer.results
1169
.betterer.results
File diff suppressed because it is too large
Load Diff
15
.betterer.ts
15
.betterer.ts
@@ -7,11 +7,9 @@ import { glob } from 'glob';
|
||||
// Why are we ignoring these?
|
||||
// They're all deprecated/being removed so doesn't make sense to fix types
|
||||
const eslintPathsToIgnore = [
|
||||
'packages/grafana-ui/src/graveyard', // will be removed alongside angular in Grafana 12
|
||||
'public/app/angular', // will be removed in Grafana 12
|
||||
'public/app/plugins/panel/graph', // will be removed alongside angular in Grafana 12
|
||||
'public/app/plugins/panel/table-old', // will be removed alongside angular in Grafana 12
|
||||
'e2e/test-plugins',
|
||||
'public/app/angular', // will be removed in Grafana 11
|
||||
'public/app/plugins/panel/graph', // will be removed alongside angular
|
||||
'public/app/plugins/panel/table-old', // will be removed alongside angular
|
||||
];
|
||||
|
||||
// Avoid using functions that report the position of the issues, as this causes a lot of merge conflicts
|
||||
@@ -22,9 +20,10 @@ export default {
|
||||
.exclude(new RegExp(eslintPathsToIgnore.join('|'))),
|
||||
'no undocumented stories': () => countUndocumentedStories().include('**/!(*.internal).story.tsx'),
|
||||
'no gf-form usage': () =>
|
||||
regexp(/gf-form/gm, 'gf-form usage has been deprecated. Use a component from @grafana/ui or custom CSS instead.')
|
||||
.include('**/*.{ts,tsx,html}')
|
||||
.exclude(new RegExp('packages/grafana-ui/src/themes/GlobalStyles')),
|
||||
regexp(
|
||||
/gf-form/gm,
|
||||
'gf-form usage has been deprecated. Use a component from @grafana/ui or custom CSS instead.'
|
||||
).include('**/*.{ts,tsx,html}'),
|
||||
};
|
||||
|
||||
function countUndocumentedStories() {
|
||||
|
||||
@@ -35,11 +35,11 @@ $(DRONE): $(BINGO_DIR)/drone.mod
|
||||
@echo "(re)installing $(GOBIN)/drone-v1.5.0"
|
||||
@cd $(BINGO_DIR) && GOWORK=off CGO_ENABLED=0 $(GO) build -mod=mod -modfile=drone.mod -o=$(GOBIN)/drone-v1.5.0 "github.com/drone/drone-cli/drone"
|
||||
|
||||
GOLANGCI_LINT := $(GOBIN)/golangci-lint-v1.64.2
|
||||
GOLANGCI_LINT := $(GOBIN)/golangci-lint-v1.59.0
|
||||
$(GOLANGCI_LINT): $(BINGO_DIR)/golangci-lint.mod
|
||||
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
|
||||
@echo "(re)installing $(GOBIN)/golangci-lint-v1.64.2"
|
||||
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=golangci-lint.mod -o=$(GOBIN)/golangci-lint-v1.64.2 "github.com/golangci/golangci-lint/cmd/golangci-lint"
|
||||
@echo "(re)installing $(GOBIN)/golangci-lint-v1.59.0"
|
||||
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=golangci-lint.mod -o=$(GOBIN)/golangci-lint-v1.59.0 "github.com/golangci/golangci-lint/cmd/golangci-lint"
|
||||
|
||||
JB := $(GOBIN)/jb-v0.5.1
|
||||
$(JB): $(BINGO_DIR)/jb.mod
|
||||
@@ -53,9 +53,11 @@ $(LEFTHOOK): $(BINGO_DIR)/lefthook.mod
|
||||
@echo "(re)installing $(GOBIN)/lefthook-v1.4.8"
|
||||
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=lefthook.mod -o=$(GOBIN)/lefthook-v1.4.8 "github.com/evilmartians/lefthook"
|
||||
|
||||
SWAGGER := $(GOBIN)/swagger-v0.30.6-0.20240310114303-db51e79a0e37
|
||||
# swagger 0.30.5 isn't compatibile with go 1.22 yet so pinning to a specific commit until there's a new release
|
||||
# https://github.com/go-swagger/go-swagger/issues/3070
|
||||
SWAGGER := $(GOBIN)/swagger-db51e79a0e37c572d8b59ae0c58bf2bbbbe53285
|
||||
$(SWAGGER): $(BINGO_DIR)/swagger.mod
|
||||
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
|
||||
@echo "(re)installing $(GOBIN)/swagger-v0.30.6-0.20240310114303-db51e79a0e37"
|
||||
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=swagger.mod -o=$(GOBIN)/swagger-v0.30.6-0.20240310114303-db51e79a0e37 "github.com/go-swagger/go-swagger/cmd/swagger"
|
||||
@echo "(re)installing $(GOBIN)/swagger-db51e79a0e37c572d8b59ae0c58bf2bbbbe53285"
|
||||
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=swagger.mod -o=$(GOBIN)/swagger-db51e79a0e37c572d8b59ae0c58bf2bbbbe53285 "github.com/go-swagger/go-swagger/cmd/swagger"
|
||||
|
||||
|
||||
@@ -46,7 +46,6 @@ github.com/Microsoft/go-winio v0.4.16-0.20201130162521-d1ffc52c7331/go.mod h1:XB
|
||||
github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0=
|
||||
github.com/Microsoft/go-winio v0.4.17-0.20210211115548-6eac466e5fa3/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84=
|
||||
github.com/Microsoft/go-winio v0.4.17-0.20210324224401-5516f17a5958/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84=
|
||||
github.com/Microsoft/go-winio v0.4.17 h1:iT12IBVClFevaf8PuVyi3UmZOVh4OqnaLxDTW2O6j3w=
|
||||
github.com/Microsoft/go-winio v0.4.17/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84=
|
||||
github.com/Microsoft/hcsshim v0.8.6/go.mod h1:Op3hHsoHPAvb6lceZHDtd9OkTew38wNoXnJs8iY7rUg=
|
||||
github.com/Microsoft/hcsshim v0.8.7-0.20190325164909-8abdbb8205e4/go.mod h1:Op3hHsoHPAvb6lceZHDtd9OkTew38wNoXnJs8iY7rUg=
|
||||
@@ -879,7 +878,6 @@ google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7
|
||||
google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
||||
google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0=
|
||||
google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
|
||||
google.golang.org/appengine v1.6.6 h1:lMO5rYAqUxkmaj76jAkRUvt5JZgFymx/+Q5Mzfivuhc=
|
||||
google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
|
||||
google.golang.org/cloud v0.0.0-20151119220103-975617b05ea8/go.mod h1:0H1ncTHf11KCFhTc/+EFRbzSCOZx+VUbRMk55Yv5MYk=
|
||||
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
|
||||
|
||||
go 1.24.2
|
||||
go 1.22
|
||||
|
||||
require github.com/golangci/golangci-lint v1.64.2 // cmd/golangci-lint
|
||||
toolchain go1.22.4
|
||||
|
||||
require github.com/golangci/golangci-lint v1.59.0 // cmd/golangci-lint
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -14,7 +14,7 @@ CUE="${GOBIN}/cue-v0.5.0"
|
||||
|
||||
DRONE="${GOBIN}/drone-v1.5.0"
|
||||
|
||||
GOLANGCI_LINT="${GOBIN}/golangci-lint-v1.64.2"
|
||||
GOLANGCI_LINT="${GOBIN}/golangci-lint-v1.59.0"
|
||||
|
||||
JB="${GOBIN}/jb-v0.5.1"
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
init_cmds = [
|
||||
["GO_BUILD_DEV=1", "make", "build-go"],
|
||||
["make", "gen-jsonnet"],
|
||||
["./bin/grafana", "server", "-profile", "-profile-addr=127.0.0.1", "-profile-port=6000", "-profile-block-rate=1", "-profile-mutex-rate=5", "-packaging=dev", "cfg:app_mode=development"]
|
||||
["./bin/grafana", "server", "-packaging=dev", "cfg:app_mode=development"]
|
||||
]
|
||||
watch_all = true
|
||||
follow_symlinks = true
|
||||
@@ -18,5 +18,5 @@ build_delay = 1500
|
||||
cmds = [
|
||||
["GO_BUILD_DEV=1", "make", "build-go"],
|
||||
["make", "gen-jsonnet"],
|
||||
["./bin/grafana", "server", "-profile", "-profile-addr=127.0.0.1", "-profile-port=6000", "-profile-block-rate=1", "-profile-mutex-rate=5", "-packaging=dev", "cfg:app_mode=development"]
|
||||
["./bin/grafana", "server", "-packaging=dev", "cfg:app_mode=development"]
|
||||
]
|
||||
|
||||
15
.drone.star
15
.drone.star
@@ -17,11 +17,18 @@ load(
|
||||
"publish_npm_pipelines",
|
||||
"publish_packages_pipeline",
|
||||
)
|
||||
load("scripts/drone/events/rrc-patch.star", "rrc_patch_pipelines")
|
||||
load(
|
||||
"scripts/drone/pipelines/ci_images.star",
|
||||
"publish_ci_windows_test_image_pipeline",
|
||||
)
|
||||
load(
|
||||
"scripts/drone/pipelines/publish_images.star",
|
||||
"publish_image_pipelines_public",
|
||||
)
|
||||
load(
|
||||
"scripts/drone/pipelines/windows.star",
|
||||
"windows_test_backend",
|
||||
)
|
||||
load(
|
||||
"scripts/drone/rgm.star",
|
||||
"rgm",
|
||||
@@ -32,13 +39,17 @@ def main(_ctx):
|
||||
return (
|
||||
pr_pipelines() +
|
||||
main_pipelines() +
|
||||
rrc_patch_pipelines() +
|
||||
publish_image_pipelines_public() +
|
||||
publish_artifacts_pipelines("public") +
|
||||
publish_npm_pipelines() +
|
||||
publish_packages_pipeline() +
|
||||
rgm() +
|
||||
[windows_test_backend({
|
||||
"event": ["promote"],
|
||||
"target": ["test-windows"],
|
||||
}, "oss", "testing")] +
|
||||
integration_test_pipelines() +
|
||||
publish_ci_windows_test_image_pipeline() +
|
||||
cronjobs() +
|
||||
secrets()
|
||||
)
|
||||
|
||||
2415
.drone.yml
2415
.drone.yml
File diff suppressed because it is too large
Load Diff
@@ -13,8 +13,6 @@ node_modules
|
||||
/public/lib/monaco
|
||||
/scripts/grafana-server/tmp
|
||||
vendor
|
||||
e2e/test-plugins
|
||||
playwright-report
|
||||
|
||||
# TS generate from cue by cuetsy
|
||||
**/*.gen.ts
|
||||
|
||||
15
.eslintrc
15
.eslintrc
@@ -1,18 +1,7 @@
|
||||
{
|
||||
"extends": ["@grafana/eslint-config", "plugin:react/jsx-runtime"],
|
||||
"extends": ["@grafana/eslint-config"],
|
||||
"root": true,
|
||||
"plugins": [
|
||||
"@emotion",
|
||||
"lodash",
|
||||
"jest",
|
||||
"import",
|
||||
"jsx-a11y",
|
||||
"@grafana",
|
||||
"no-barrel-files",
|
||||
// Included so betterer doesn't fail when processing all files,
|
||||
// as other parts of the code use testing-library plugin
|
||||
"testing-library",
|
||||
],
|
||||
"plugins": ["@emotion", "lodash", "jest", "import", "jsx-a11y", "@grafana", "no-barrel-files"],
|
||||
"settings": {
|
||||
"import/internal-regex": "^(app/)|(@grafana)",
|
||||
"import/external-module-folders": ["node_modules", ".yarn"],
|
||||
|
||||
244
.github/CODEOWNERS
vendored
244
.github/CODEOWNERS
vendored
@@ -36,17 +36,23 @@
|
||||
/docs/ @grafana/docs-tooling
|
||||
|
||||
/docs/.codespellignore @grafana/docs-tooling
|
||||
/docs/sources/ @irenerl24
|
||||
/docs/sources/ @Eve832
|
||||
|
||||
/docs/sources/administration/ @jdbaldry
|
||||
/docs/sources/alerting/ @brendamuir
|
||||
/docs/sources/dashboards/ @imatwawana
|
||||
/docs/sources/datasources/ @jdbaldry
|
||||
/docs/sources/explore/ @grafana/explore-squad @lwandz13
|
||||
/docs/sources/fundamentals @chri2547
|
||||
/docs/sources/getting-started/ @chri2547
|
||||
/docs/sources/introduction/ @chri2547
|
||||
/docs/sources/panels-visualizations/ @imatwawana
|
||||
/docs/sources/release-notes/ @irenerl24 @GrafanaWriter
|
||||
/docs/sources/release-notes/ @Eve832 @GrafanaWriter
|
||||
/docs/sources/setup-grafana/ @chri2547
|
||||
/docs/sources/upgrade-guide/ @imatwawana
|
||||
/docs/sources/whatsnew/ @imatwawana
|
||||
|
||||
/docs/sources/developers/plugins/ @grafana/plugins-platform-frontend @grafana/plugins-platform-backend
|
||||
/docs/sources/developers/plugins/ @Eve832 @josmperez @grafana/plugins-platform-frontend @grafana/plugins-platform-backend
|
||||
|
||||
/docs/sources/panels-visualizations/query-transform-data/transform-data/index.md @imatwawana @baldm0mma
|
||||
# END Technical documentation
|
||||
@@ -60,40 +66,27 @@
|
||||
/pkg/README.md @grafana/grafana-backend-group
|
||||
/pkg/ruleguard.rules.go @grafana/grafana-backend-group
|
||||
/.bra.toml @grafana/grafana-backend-group
|
||||
/.golangci.yml @grafana/grafana-backend-group
|
||||
/.golangci.toml @grafana/grafana-backend-group
|
||||
/build.go @grafana/grafana-backend-services-squad
|
||||
/scripts/modowners/ @grafana/grafana-backend-services-squad
|
||||
/scripts/go-workspace @grafana/grafana-app-platform-squad
|
||||
/hack/ @grafana/grafana-app-platform-squad
|
||||
|
||||
/apps/alerting/ @grafana/alerting-backend
|
||||
/apps/playlist/ @grafana/grafana-app-platform-squad
|
||||
/pkg/api/ @grafana/grafana-backend-group
|
||||
/pkg/apis/ @grafana/grafana-app-platform-squad
|
||||
/pkg/apis/alerting_notifications @grafana/grafana-app-platform-squad @grafana/alerting-backend @grafana/alerting-frontend
|
||||
/pkg/apis/query @grafana/grafana-datasources-core-services
|
||||
/pkg/bus/ @grafana/grafana-search-and-storage
|
||||
/pkg/cmd/ @grafana/grafana-backend-group
|
||||
/pkg/cmd/grafana-cli/commands/install_command.go @grafana/plugins-platform-backend
|
||||
/pkg/cmd/grafana-cli/commands/install_command_test.go @grafana/plugins-platform-backend
|
||||
/pkg/cmd/grafana-cli/commands/listremote_command.go @grafana/plugins-platform-backend
|
||||
/pkg/cmd/grafana-cli/commands/listversions_command.go @grafana/plugins-platform-backend
|
||||
/pkg/cmd/grafana-cli/commands/ls_command_test.go @grafana/plugins-platform-backend
|
||||
/pkg/cmd/grafana-cli/commands/ls_command.go @grafana/plugins-platform-backend
|
||||
/pkg/cmd/grafana-cli/commands/remove_command.go @grafana/plugins-platform-backend
|
||||
/pkg/cmd/grafana-cli/commands/upgrade_command.go @grafana/plugins-platform-backend
|
||||
/pkg/cmd/grafana-cli/commands/upgrade_all_command.go @grafana/plugins-platform-backend
|
||||
/pkg/cmd/grafana-cli/commands/upgrade_all_command_test.go @grafana/plugins-platform-backend
|
||||
/pkg/components/apikeygen/ @grafana/identity-squad
|
||||
/pkg/components/satokengen/ @grafana/identity-squad
|
||||
/pkg/cmd/grafana/apiserver @grafana/grafana-app-platform-squad
|
||||
/pkg/components/apikeygen/ @grafana/identity-access-team
|
||||
/pkg/components/satokengen/ @grafana/identity-access-team
|
||||
/pkg/components/dashdiffs/ @grafana/grafana-app-platform-squad
|
||||
/pkg/components/imguploader/ @grafana/alerting-backend
|
||||
/pkg/components/imguploader/ @grafana/grafana-backend-group
|
||||
/pkg/components/loki/ @grafana/grafana-backend-group
|
||||
/pkg/components/null/ @grafana/grafana-backend-group
|
||||
/pkg/components/simplejson/ @grafana/grafana-backend-group
|
||||
/pkg/events/ @grafana/grafana-backend-group
|
||||
/pkg/extensions/ @grafana/grafana-backend-group
|
||||
/pkg/ifaces/ @grafana/grafana-backend-group
|
||||
/pkg/infra/appcontext/ @grafana/grafana-backend-group
|
||||
/pkg/infra/db/ @grafana/grafana-backend-group
|
||||
/pkg/infra/localcache/ @grafana/grafana-backend-group
|
||||
/pkg/infra/log/ @grafana/grafana-backend-group
|
||||
@@ -108,19 +101,14 @@
|
||||
/pkg/middleware/ @grafana/grafana-backend-group
|
||||
/pkg/mocks/ @grafana/grafana-backend-group
|
||||
/pkg/models/ @grafana/grafana-backend-group
|
||||
/pkg/semconv/ @grafana/grafana-backend-group
|
||||
/pkg/server/ @grafana/grafana-backend-group
|
||||
/pkg/apiserver @grafana/grafana-app-platform-squad
|
||||
/pkg/aggregator @grafana/grafana-app-platform-squad
|
||||
/pkg/apimachinery @grafana/grafana-app-platform-squad
|
||||
/pkg/apimachinery/identity/ @grafana/identity-squad
|
||||
/pkg/apimachinery/errutil/ @grafana/grafana-backend-group
|
||||
/pkg/promlib @grafana/observability-metrics
|
||||
/pkg/storage/ @grafana/grafana-search-and-storage
|
||||
/pkg/services/annotations/ @grafana/grafana-search-and-storage
|
||||
/pkg/services/apikey/ @grafana/identity-squad
|
||||
/pkg/services/apikey/ @grafana/identity-access-team
|
||||
/pkg/services/cleanup/ @grafana/grafana-backend-group
|
||||
/pkg/services/contexthandler/ @grafana/grafana-backend-group @grafana/grafana-app-platform-squad
|
||||
/pkg/services/contexthandler/ @grafana/grafana-backend-group
|
||||
/pkg/services/correlations/ @grafana/explore-squad
|
||||
/pkg/services/dashboardimport/ @grafana/grafana-backend-group
|
||||
/pkg/services/dashboards/ @grafana/grafana-app-platform-squad
|
||||
@@ -137,9 +125,8 @@
|
||||
/pkg/services/playlist/ @grafana/grafana-app-platform-squad
|
||||
/pkg/services/preference/ @grafana/grafana-backend-group
|
||||
/pkg/services/provisioning/ @grafana/grafana-search-and-storage
|
||||
/pkg/services/provisioning/alerting/ @grafana/alerting-backend
|
||||
/pkg/services/query/ @grafana/grafana-app-platform-squad
|
||||
/pkg/services/queryhistory/ @grafana/explore-squad
|
||||
/pkg/services/queryhistory/ @grafana/grafana-app-platform-squad
|
||||
/pkg/services/quota/ @grafana/grafana-search-and-storage
|
||||
/pkg/services/screenshot/ @grafana/grafana-backend-group
|
||||
/pkg/services/search/ @grafana/grafana-search-and-storage
|
||||
@@ -147,27 +134,28 @@
|
||||
/pkg/services/secrets/ @grafana/grafana-operator-experience-squad
|
||||
/pkg/services/shorturls/ @grafana/grafana-backend-group
|
||||
/pkg/services/sqlstore/ @grafana/grafana-search-and-storage
|
||||
/pkg/services/ssosettings/ @grafana/identity-squad
|
||||
/pkg/services/ssosettings/ @grafana/identity-access-team
|
||||
/pkg/services/star/ @grafana/grafana-search-and-storage
|
||||
/pkg/services/stats/ @grafana/grafana-backend-group
|
||||
/pkg/services/tag/ @grafana/grafana-search-and-storage
|
||||
/pkg/services/team/ @grafana/access-squad
|
||||
/pkg/services/team/ @grafana/identity-access-team
|
||||
/pkg/services/temp_user/ @grafana/grafana-backend-group
|
||||
/pkg/services/updatechecker/ @grafana/grafana-backend-group
|
||||
/pkg/services/user/ @grafana/access-squad
|
||||
/pkg/services/user/ @grafana/identity-access-team
|
||||
/pkg/services/validations/ @grafana/grafana-backend-group
|
||||
/pkg/setting/ @grafana/grafana-backend-services-squad
|
||||
/pkg/tests/ @grafana/grafana-backend-services-squad
|
||||
/pkg/tests/apis/ @grafana/grafana-app-platform-squad
|
||||
/pkg/tests/apis/alerting @grafana/grafana-app-platform-squad @grafana/alerting-backend
|
||||
/pkg/tests/api/correlations/ @grafana/explore-squad
|
||||
/pkg/tsdb/grafanads/ @grafana/grafana-backend-group
|
||||
/pkg/tsdb/opentsdb/ @grafana/partner-datasources
|
||||
/pkg/tsdb/opentsdb/ @grafana/grafana-backend-group
|
||||
/pkg/util/ @grafana/grafana-backend-group
|
||||
/pkg/web/ @grafana/grafana-backend-group
|
||||
|
||||
/pkg/infra/kvstore/ @grafana/grafana-backend-group
|
||||
/pkg/infra/fs/ @grafana/grafana-backend-group
|
||||
/pkg/infra/x/ @grafana/grafana-backend-group
|
||||
|
||||
|
||||
# devenv
|
||||
# Backend code, developers environment
|
||||
@@ -175,7 +163,7 @@
|
||||
|
||||
# Logs code, developers environment
|
||||
/devenv/docker/blocks/loki* @grafana/observability-logs
|
||||
/devenv/docker/blocks/elastic* @grafana/aws-datasources
|
||||
/devenv/docker/blocks/elastic* @grafana/observability-logs
|
||||
/devenv/docker/blocks/self-instrumentation* @grafana/observability-metrics
|
||||
|
||||
/devenv/bulk-dashboards/ @grafana/dashboards-squad
|
||||
@@ -192,17 +180,16 @@
|
||||
/devenv/docker/blocks/collectd/ @grafana/observability-metrics
|
||||
/devenv/docker/blocks/etcd @grafana/grafana-app-platform-squad
|
||||
/devenv/docker/blocks/grafana/ @grafana/grafana-as-code
|
||||
/devenv/docker/blocks/graphite/ @grafana/partner-datasources
|
||||
/devenv/docker/blocks/graphite09/ @grafana/partner-datasources
|
||||
/devenv/docker/blocks/graphite1/ @grafana/partner-datasources
|
||||
/devenv/docker/blocks/influxdb/ @grafana/partner-datasources
|
||||
/devenv/docker/blocks/influxdb1/ @grafana/partner-datasources
|
||||
/devenv/docker/blocks/jaeger/ @grafana/oss-big-tent
|
||||
/devenv/docker/blocks/graphite/ @grafana/observability-metrics
|
||||
/devenv/docker/blocks/graphite09/ @grafana/observability-metrics
|
||||
/devenv/docker/blocks/graphite1/ @grafana/observability-metrics
|
||||
/devenv/docker/blocks/influxdb/ @grafana/observability-metrics
|
||||
/devenv/docker/blocks/influxdb1/ @grafana/observability-metrics
|
||||
/devenv/docker/blocks/jaeger/ @grafana/observability-traces-and-profiling
|
||||
/devenv/docker/blocks/maildev/ @grafana/alerting-frontend
|
||||
/devenv/docker/blocks/mariadb/ @grafana/oss-big-tent
|
||||
/devenv/docker/blocks/memcached/ @grafana/grafana-backend-group
|
||||
/devenv/docker/blocks/mimir_backend/ @grafana/alerting-backend
|
||||
/devenv/docker/blocks/mqtt/ @grafana/alerting-backend
|
||||
/devenv/docker/blocks/mssql/ @grafana/partner-datasources
|
||||
/devenv/docker/blocks/mssql_arm64/ @grafana/partner-datasources
|
||||
/devenv/docker/blocks/mssql_tests/ @grafana/partner-datasources
|
||||
@@ -211,12 +198,11 @@
|
||||
/devenv/docker/blocks/mysql_exporter/ @grafana/oss-big-tent
|
||||
/devenv/docker/blocks/mysql_opendata/ @grafana/oss-big-tent
|
||||
/devenv/docker/blocks/mysql_tests/ @grafana/oss-big-tent
|
||||
/devenv/docker/blocks/opentsdb/ @grafana/partner-datasources
|
||||
/devenv/docker/blocks/opentsdb/ @grafana/observability-metrics
|
||||
/devenv/docker/blocks/postgres/ @grafana/oss-big-tent
|
||||
/devenv/docker/blocks/postgres_tests/ @grafana/oss-big-tent
|
||||
/devenv/docker/blocks/prometheus/ @grafana/observability-metrics
|
||||
/devenv/docker/blocks/prometheus_random_data/ @grafana/observability-metrics
|
||||
/devenv/docker/blocks/prometheus_high_card/ @grafana/observability-metrics
|
||||
/devenv/docker/blocks/pyroscope/ @grafana/observability-traces-and-profiling
|
||||
/devenv/docker/blocks/redis/ @bergquist
|
||||
/devenv/docker/blocks/sensugo/ @grafana/grafana-backend-group
|
||||
@@ -224,7 +210,7 @@
|
||||
/devenv/docker/blocks/smtp/ @bergquist
|
||||
/devenv/docker/blocks/tempo/ @grafana/observability-traces-and-profiling
|
||||
/devenv/docker/blocks/traefik/ @mckn
|
||||
/devenv/docker/blocks/zipkin/ @grafana/oss-big-tent
|
||||
/devenv/docker/blocks/zipkin/ @grafana/observability-traces-and-profiling
|
||||
/devenv/docker/blocks/webdav/ @grafana/alerting-backend
|
||||
/devenv/docker/buildcontainer/ @bergquist
|
||||
/devenv/docker/compose_header.yml @grafana/grafana-backend-services-squad
|
||||
@@ -237,7 +223,6 @@
|
||||
/devenv/local-npm/ @grafana/frontend-ops
|
||||
/devenv/vscode/ @grafana/frontend-ops
|
||||
/devenv/setup.sh @grafana/grafana-backend-services-squad
|
||||
/devenv/plugins.yaml @grafana/plugins-platform-frontend
|
||||
|
||||
# Emails
|
||||
/emails/ @grafana/alerting-frontend
|
||||
@@ -256,7 +241,6 @@
|
||||
/Makefile @grafana/grafana-release-guild
|
||||
/scripts/build/ @grafana/grafana-release-guild
|
||||
/scripts/list-release-artifacts.sh @grafana/grafana-release-guild
|
||||
/.trivyignore @grafana/grafana-backend-services-squad
|
||||
|
||||
# OSS Plugin Partnerships backend code
|
||||
/pkg/tsdb/cloudwatch/ @grafana/aws-datasources
|
||||
@@ -265,11 +249,13 @@
|
||||
|
||||
# Observability backend code
|
||||
/pkg/tsdb/prometheus/ @grafana/observability-metrics
|
||||
/pkg/tsdb/elasticsearch/ @grafana/aws-datasources
|
||||
/pkg/tsdb/influxdb/ @grafana/observability-metrics
|
||||
/pkg/tsdb/elasticsearch/ @grafana/observability-logs
|
||||
/pkg/tsdb/graphite/ @grafana/observability-metrics
|
||||
/pkg/tsdb/loki/ @grafana/observability-logs
|
||||
/pkg/tsdb/tempo/ @grafana/observability-traces-and-profiling
|
||||
/pkg/tsdb/grafana-pyroscope-datasource/ @grafana/observability-traces-and-profiling
|
||||
/pkg/tsdb/parca/ @grafana/oss-big-tent
|
||||
/pkg/tsdb/parca/ @grafana/observability-traces-and-profiling
|
||||
|
||||
# OSS Big Tent backend code
|
||||
/pkg/tsdb/mysql/ @grafana/oss-big-tent
|
||||
@@ -277,8 +263,6 @@
|
||||
|
||||
# Partner Datasources backend code
|
||||
/pkg/tsdb/mssql/ @grafana/partner-datasources
|
||||
/pkg/tsdb/influxdb/ @grafana/partner-datasources
|
||||
/pkg/tsdb/graphite/ @grafana/partner-datasources
|
||||
|
||||
# Database migrations
|
||||
/pkg/services/sqlstore/migrations/ @grafana/grafana-search-and-storage
|
||||
@@ -292,7 +276,6 @@
|
||||
/pkg/modules/ @grafana/grafana-app-platform-squad
|
||||
/pkg/services/grpcserver/ @grafana/grafana-search-and-storage
|
||||
/pkg/generated @grafana/grafana-app-platform-squad
|
||||
/pkg/services/unifiedSearch/ @grafana/grafana-search-and-storage
|
||||
|
||||
# Alerting
|
||||
/pkg/services/ngalert/ @grafana/alerting-backend
|
||||
@@ -328,56 +311,43 @@
|
||||
/e2e/ @grafana/grafana-frontend-platform
|
||||
/e2e/cloud-plugins-suite/ @grafana/partner-datasources
|
||||
/e2e/plugin-e2e/plugin-e2e-api-tests/ @grafana/plugins-platform-frontend
|
||||
/e2e/test-plugins/grafana-extensionstest-app/ @grafana/plugins-platform-frontend
|
||||
|
||||
# Packages
|
||||
/packages/ @grafana/grafana-frontend-platform @grafana/plugins-platform-frontend
|
||||
/packages/grafana-data/src/**/*logs* @grafana/observability-logs
|
||||
/packages/grafana-data/src/transformations/ @grafana/dataviz-squad
|
||||
/packages/grafana-e2e-selectors/ @grafana/grafana-frontend-platform
|
||||
/packages/grafana-flamegraph/ @grafana/observability-traces-and-profiling
|
||||
/packages/grafana-o11y-ds-frontend/ @grafana/observability-logs
|
||||
/packages/grafana-o11y-ds-frontend/src/IntervalInput/ @grafana/observability-traces-and-profiling
|
||||
/packages/grafana-o11y-ds-frontend/src/NodeGraph/ @grafana/observability-traces-and-profiling
|
||||
/packages/grafana-o11y-ds-frontend/src/pyroscope/ @grafana/observability-traces-and-profiling
|
||||
/packages/grafana-o11y-ds-frontend/src/SpanBar/ @grafana/observability-traces-and-profiling
|
||||
/packages/grafana-o11y-ds-frontend/src/TraceToLogs/ @grafana/observability-traces-and-profiling
|
||||
/packages/grafana-o11y-ds-frontend/src/TraceToMetrics/ @grafana/observability-traces-and-profiling
|
||||
/packages/grafana-o11y-ds-frontend/src/TraceToProfiles/ @grafana/observability-traces-and-profiling
|
||||
/packages/grafana-plugin-configs/ @grafana/plugins-platform-frontend
|
||||
/packages/grafana-prometheus/ @grafana/observability-metrics
|
||||
/packages/grafana-schema/src/**/*canvas* @grafana/dataviz-squad
|
||||
/packages/grafana-schema/src/**/*tempo* @grafana/observability-traces-and-profiling
|
||||
/packages/grafana-sql/ @grafana/partner-datasources @grafana/oss-big-tent
|
||||
/packages/grafana-ui/.storybook/ @grafana/plugins-platform-frontend
|
||||
/packages/grafana-ui/src/components/ @grafana/grafana-frontend-platform
|
||||
/packages/grafana-ui/src/components/BarGauge/ @grafana/dataviz-squad
|
||||
/packages/grafana-ui/src/components/DataLinks/ @grafana/dataviz-squad
|
||||
/packages/grafana-ui/src/components/DateTimePickers/ @grafana/grafana-frontend-platform
|
||||
/packages/grafana-ui/src/components/Gauge/ @grafana/dataviz-squad
|
||||
/packages/grafana-ui/src/components/PluginSignatureBadge/ @grafana/plugins-platform-frontend
|
||||
/packages/grafana-ui/src/components/Sparkline/ @grafana/grafana-frontend-platform @grafana/app-o11y-visualizations
|
||||
/packages/grafana-ui/src/components/Table/ @grafana/dataviz-squad
|
||||
/packages/grafana-ui/src/components/Table/SparklineCell.tsx @grafana/dataviz-squad @grafana/app-o11y-visualizations
|
||||
/packages/grafana-ui/src/components/Gauge/ @grafana/dataviz-squad
|
||||
/packages/grafana-ui/src/components/BarGauge/ @grafana/dataviz-squad
|
||||
/packages/grafana-ui/src/components/uPlot/ @grafana/dataviz-squad
|
||||
/packages/grafana-ui/src/components/DataLinks/ @grafana/dataviz-squad
|
||||
/packages/grafana-ui/src/components/ValuePicker/ @grafana/dataviz-squad
|
||||
/packages/grafana-ui/src/components/VizLayout/ @grafana/dataviz-squad
|
||||
/packages/grafana-ui/src/components/VizLegend/ @grafana/dataviz-squad
|
||||
/packages/grafana-ui/src/components/VizRepeater/ @grafana/dataviz-squad
|
||||
/packages/grafana-ui/src/components/VizTooltip/ @grafana/dataviz-squad
|
||||
/packages/grafana-ui/src/components/Sparkline/ @grafana/grafana-frontend-platform @grafana/app-o11y-visualizations
|
||||
/packages/grafana-ui/src/graveyard/Graph/ @grafana/dataviz-squad
|
||||
/packages/grafana-ui/src/graveyard/GraphNG/ @grafana/dataviz-squad
|
||||
/packages/grafana-ui/src/graveyard/TimeSeries/ @grafana/dataviz-squad
|
||||
/packages/grafana-ui/src/utils/storybook/ @grafana/plugins-platform-frontend
|
||||
|
||||
/packages/grafana-data/src/transformations/ @grafana/dataviz-squad
|
||||
/packages/grafana-data/src/**/*logs* @grafana/observability-logs
|
||||
/packages/grafana-schema/src/**/*tempo* @grafana/observability-traces-and-profiling
|
||||
/packages/grafana-schema/src/**/*canvas* @grafana/dataviz-squad
|
||||
/packages/grafana-flamegraph/ @grafana/observability-traces-and-profiling
|
||||
/plugins-bundled/ @grafana/plugins-platform-frontend
|
||||
/packages/grafana-plugin-configs/ @grafana/plugins-platform-frontend
|
||||
/packages/grafana-prometheus/ @grafana/observability-metrics
|
||||
/packages/grafana-o11y-ds-frontend/ @grafana/observability-logs @grafana/observability-traces-and-profiling
|
||||
/packages/grafana-sql/ @grafana/partner-datasources @grafana/oss-big-tent
|
||||
|
||||
# root files, mostly frontend
|
||||
/.browserslistrc @grafana/frontend-ops
|
||||
/package.json @grafana/frontend-ops
|
||||
/nx.json @grafana/frontend-ops
|
||||
/project.json @grafana/frontend-ops
|
||||
/.nxignore @grafana/frontend-ops
|
||||
/tsconfig.json @grafana/frontend-ops
|
||||
/.editorconfig @grafana/frontend-ops
|
||||
/.eslintignore @grafana/frontend-ops
|
||||
@@ -411,30 +381,26 @@ playwright.config.ts @grafana/plugins-platform-frontend
|
||||
/public/app/core/components/TimeSeries/ @grafana/dataviz-squad
|
||||
/public/app/core/components/TimelineChart/ @grafana/dataviz-squad
|
||||
/public/app/core/components/Form/ @grafana/grafana-frontend-platform
|
||||
/public/app/core/components/OptionsUI/ @grafana/dashboards-squad @grafana/dataviz-squad
|
||||
|
||||
|
||||
/public/app/core/history/ @grafana/explore-squad
|
||||
/public/app/features/all.ts @grafana/grafana-frontend-platform
|
||||
/public/app/features/admin/ @grafana/identity-access-team
|
||||
|
||||
# Temp owners until Enterprise team takes over
|
||||
/public/app/features/migrate-to-cloud @grafana/grafana-frontend-platform
|
||||
|
||||
/public/app/features/actions/ @grafana/dataviz-squad
|
||||
/public/app/features/auth-config/ @grafana/identity-squad
|
||||
/public/app/features/auth-config/ @grafana/identity-access-team
|
||||
/public/app/features/annotations/ @grafana/dashboards-squad
|
||||
/public/app/features/api-keys/ @grafana/identity-squad
|
||||
/public/app/features/api-keys/ @grafana/identity-access-team
|
||||
/public/app/features/canvas/ @grafana/dataviz-squad
|
||||
/public/app/features/geo/ @grafana/dataviz-squad
|
||||
/public/app/features/visualization/data-hover/ @grafana/dataviz-squad
|
||||
/public/app/features/commandPalette/ @grafana/grafana-frontend-platform
|
||||
/public/app/features/connections/ @grafana/plugins-platform-frontend
|
||||
/public/app/features/connections/ @grafana/plugins-platform-frontend @mikkancso
|
||||
/public/app/features/correlations/ @grafana/explore-squad
|
||||
/public/app/features/dashboard/ @grafana/dashboards-squad
|
||||
/public/app/features/dashboard/components/TransformationsEditor/ @grafana/dataviz-squad
|
||||
/public/app/features/dashboard-scene/ @grafana/dashboards-squad
|
||||
/public/app/features/scopes/ @grafana/dashboards-squad
|
||||
/public/app/features/datasources/ @grafana/plugins-platform-frontend
|
||||
/public/app/features/datasources/ @grafana/plugins-platform-frontend @mikkancso
|
||||
/public/app/features/dimensions/ @grafana/dataviz-squad
|
||||
/public/app/features/dataframe-import/ @grafana/dataviz-squad
|
||||
/public/app/features/explore/ @grafana/explore-squad
|
||||
@@ -444,9 +410,10 @@ playwright.config.ts @grafana/plugins-platform-frontend
|
||||
/public/app/features/invites/ @grafana/grafana-frontend-platform
|
||||
/public/app/features/library-panels/ @grafana/dashboards-squad
|
||||
/public/app/features/logs/ @grafana/observability-logs
|
||||
/public/app/features/live/ @grafana/dashboards-squad
|
||||
/public/app/features/live/ @grafana/grafana-app-platform-squad
|
||||
/public/app/features/apiserver/ @grafana/grafana-app-platform-squad
|
||||
/public/app/features/manage-dashboards/ @grafana/dashboards-squad
|
||||
/public/app/features/manage-dashboards/RecentlyDeletedPage.tsx @grafana/grafana-frontend-platform
|
||||
/public/app/features/notifications/ @grafana/grafana-frontend-platform
|
||||
/public/app/features/org/ @grafana/grafana-frontend-platform
|
||||
/public/app/features/panel/ @grafana/dashboards-squad
|
||||
@@ -459,16 +426,15 @@ playwright.config.ts @grafana/plugins-platform-frontend
|
||||
/public/app/features/sandbox/ @grafana/grafana-frontend-platform
|
||||
/public/app/features/browse-dashboards/ @grafana/grafana-frontend-platform
|
||||
/public/app/features/search/ @grafana/grafana-frontend-platform
|
||||
/public/app/features/serviceaccounts/ @grafana/identity-squad
|
||||
/public/app/features/serviceaccounts/ @grafana/identity-access-team
|
||||
/public/app/features/storage/ @grafana/grafana-app-platform-squad
|
||||
/public/app/features/teams/ @grafana/access-squad
|
||||
/public/app/features/teams/ @grafana/identity-access-team
|
||||
/public/app/features/templating/ @grafana/dashboards-squad
|
||||
/public/app/features/trails/ @grafana/observability-metrics
|
||||
/public/app/features/trails/ @torkelo
|
||||
/public/app/features/transformers/ @grafana/dataviz-squad
|
||||
/public/app/features/transformers/timeSeriesTable/ @grafana/dataviz-squad @grafana/app-o11y-visualizations
|
||||
/public/app/features/users/ @grafana/access-squad
|
||||
/public/app/features/users/ @grafana/identity-access-team
|
||||
/public/app/features/variables/ @grafana/dashboards-squad
|
||||
/public/app/features/preferences/ @grafana/grafana-frontend-platform
|
||||
/public/app/plugins/panel/alertlist/ @grafana/alerting-frontend
|
||||
/public/app/plugins/panel/annolist/ @grafana/grafana-frontend-platform
|
||||
/public/app/plugins/panel/barchart/ @grafana/dataviz-squad
|
||||
@@ -496,7 +462,7 @@ playwright.config.ts @grafana/plugins-platform-frontend
|
||||
/public/app/plugins/panel/geomap/ @grafana/dataviz-squad
|
||||
/public/app/plugins/panel/canvas/ @grafana/dataviz-squad
|
||||
/public/app/plugins/panel/candlestick/ @grafana/dataviz-squad
|
||||
/public/app/plugins/panel/live/ @grafana/dashboards-squad
|
||||
/public/app/plugins/panel/live/ @grafana/grafana-app-platform-squad
|
||||
/public/app/plugins/panel/news/ @grafana/grafana-frontend-platform
|
||||
/public/app/plugins/panel/stat/ @grafana/dataviz-squad
|
||||
/public/app/plugins/panel/text/ @grafana/grafana-frontend-platform
|
||||
@@ -520,8 +486,7 @@ playwright.config.ts @grafana/plugins-platform-frontend
|
||||
/public/test/ @grafana/grafana-frontend-platform
|
||||
/public/test/helpers/alertingRuleEditor.tsx @grafana/alerting-frontend
|
||||
/public/views/ @grafana/grafana-frontend-platform
|
||||
/public/views/swagger.html @grafana/grafana-app-platform-squad
|
||||
/public/swagger/ @grafana/grafana-app-platform-squad
|
||||
/public/views/swagger.html @grafana/grafana-backend-group
|
||||
|
||||
/public/app/features/explore/Logs/ @grafana/observability-logs
|
||||
|
||||
@@ -545,7 +510,7 @@ playwright.config.ts @grafana/plugins-platform-frontend
|
||||
|
||||
|
||||
|
||||
/scripts/benchmark-access-control.sh @grafana/access-squad
|
||||
/scripts/benchmark-access-control.sh @grafana/identity-access-team
|
||||
/scripts/check-breaking-changes.sh @grafana/plugins-platform-frontend
|
||||
/scripts/ci-* @grafana/grafana-release-guild
|
||||
/scripts/circle-* @grafana/grafana-release-guild
|
||||
@@ -570,9 +535,7 @@ playwright.config.ts @grafana/plugins-platform-frontend
|
||||
/scripts/verify-repo-update/ @grafana/grafana-release-guild
|
||||
/scripts/generate-icon-bundle.js @grafana/plugins-platform-frontend @grafana/grafana-frontend-platform
|
||||
/scripts/generate-rtk-apis.ts @grafana/grafana-frontend-platform
|
||||
/scripts/generate-alerting-rtk-apis.ts @grafana/alerting-frontend
|
||||
/scripts/levitate-parse-json-report.js @grafana/plugins-platform-frontend
|
||||
/scripts/levitate-show-affected-plugins.js @grafana/plugins-platform-frontend
|
||||
/scripts/codemods/explicit-barrel-imports.cjs @grafana/frontend-ops
|
||||
|
||||
/scripts/**/generate-transformations* @grafana/dataviz-squad
|
||||
@@ -593,29 +556,28 @@ playwright.config.ts @grafana/plugins-platform-frontend
|
||||
# Core datasources
|
||||
/public/app/plugins/datasource/dashboard/ @grafana/dashboards-squad
|
||||
/public/app/plugins/datasource/cloudwatch/ @grafana/aws-datasources
|
||||
/public/app/plugins/datasource/elasticsearch/ @grafana/aws-datasources
|
||||
/public/app/plugins/datasource/elasticsearch/ @grafana/observability-logs
|
||||
/public/app/plugins/datasource/grafana/ @grafana/grafana-frontend-platform
|
||||
/public/app/plugins/datasource/grafana-testdata-datasource/ @grafana/plugins-platform-frontend
|
||||
/public/app/plugins/datasource/azuremonitor/ @grafana/partner-datasources
|
||||
/public/app/plugins/datasource/graphite/ @grafana/partner-datasources
|
||||
/public/app/plugins/datasource/influxdb/ @grafana/partner-datasources
|
||||
/public/app/plugins/datasource/jaeger/ @grafana/oss-big-tent
|
||||
/public/app/plugins/datasource/graphite/ @grafana/observability-metrics
|
||||
/public/app/plugins/datasource/influxdb/ @grafana/observability-metrics
|
||||
/public/app/plugins/datasource/jaeger/ @grafana/observability-traces-and-profiling
|
||||
/public/app/plugins/datasource/loki/ @grafana/observability-logs
|
||||
/public/app/plugins/datasource/mixed/ @grafana/dashboards-squad
|
||||
/public/app/plugins/datasource/mssql/ @grafana/partner-datasources
|
||||
/public/app/plugins/datasource/mysql/ @grafana/oss-big-tent
|
||||
/public/app/plugins/datasource/opentsdb/ @grafana/partner-datasources
|
||||
/public/app/plugins/datasource/opentsdb/ @grafana/observability-metrics
|
||||
/public/app/plugins/datasource/grafana-postgresql-datasource/ @grafana/oss-big-tent
|
||||
/public/app/plugins/datasource/prometheus/ @grafana/observability-metrics
|
||||
/public/app/plugins/datasource/cloud-monitoring/ @grafana/partner-datasources
|
||||
/public/app/plugins/datasource/zipkin/ @grafana/oss-big-tent
|
||||
/public/app/plugins/datasource/zipkin/ @grafana/observability-traces-and-profiling
|
||||
/public/app/plugins/datasource/tempo/ @grafana/observability-traces-and-profiling
|
||||
/public/app/plugins/datasource/grafana-pyroscope-datasource/ @grafana/observability-traces-and-profiling
|
||||
/public/app/plugins/datasource/parca/ @grafana/oss-big-tent
|
||||
/public/app/plugins/datasource/parca/ @grafana/observability-traces-and-profiling
|
||||
/public/app/plugins/datasource/alertmanager/ @grafana/alerting-squad
|
||||
|
||||
# Grafana Sharing Squad
|
||||
/public/app/features/dashboard-scene/sharing/ @grafana/sharing-squad
|
||||
/public/app/features/dashboard/components/ShareModal/ @grafana/sharing-squad
|
||||
/public/app/features/manage-dashboards/components/PublicDashboardListTable/ @grafana/sharing-squad
|
||||
/public/app/features/dashboard/containers/PublicDashboardPage.tsx @grafana/sharing-squad
|
||||
@@ -632,23 +594,22 @@ playwright.config.ts @grafana/plugins-platform-frontend
|
||||
/grafana-mixin/ @grafana/grafana-backend-services-squad
|
||||
|
||||
# Grafana authentication and authorization
|
||||
/pkg/login/ @grafana/identity-squad
|
||||
/pkg/services/accesscontrol/ @grafana/access-squad
|
||||
/pkg/login/ @grafana/identity-access-team
|
||||
/pkg/services/accesscontrol/ @grafana/identity-access-team
|
||||
/pkg/services/anonymous/ @grafana/identity-access-team
|
||||
/pkg/services/auth/ @grafana/identity-squad
|
||||
/pkg/services/authn/ @grafana/identity-squad
|
||||
/pkg/services/authz/ @grafana/access-squad
|
||||
/pkg/services/signingkeys/ @grafana/identity-squad
|
||||
/pkg/services/dashboards/accesscontrol.go @grafana/access-squad
|
||||
/pkg/services/datasources/guardian/ @grafana/access-squad
|
||||
/pkg/services/guardian/ @grafana/access-squad
|
||||
/pkg/services/ldap/ @grafana/identity-squad
|
||||
/pkg/services/login/ @grafana/identity-squad
|
||||
/pkg/services/loginattempt/ @grafana/identity-squad
|
||||
/pkg/services/auth/ @grafana/identity-access-team
|
||||
/pkg/services/authn/ @grafana/identity-access-team
|
||||
/pkg/services/signingkeys/ @grafana/identity-access-team
|
||||
/pkg/services/dashboards/accesscontrol.go @grafana/identity-access-team
|
||||
/pkg/services/datasources/guardian/ @grafana/identity-access-team
|
||||
/pkg/services/guardian/ @grafana/identity-access-team
|
||||
/pkg/services/ldap/ @grafana/identity-access-team
|
||||
/pkg/services/login/ @grafana/identity-access-team
|
||||
/pkg/services/loginattempt/ @grafana/identity-access-team
|
||||
/pkg/services/extsvcauth/ @grafana/identity-access-team
|
||||
/pkg/services/oauthtoken/ @grafana/identity-squad
|
||||
/pkg/services/serviceaccounts/ @grafana/identity-squad
|
||||
/public/app/core/components/RolePicker/ @grafana/access-squad
|
||||
/pkg/services/oauthtoken/ @grafana/identity-access-team
|
||||
/pkg/services/serviceaccounts/ @grafana/identity-access-team
|
||||
/public/app/core/components/RolePicker/ @grafana/identity-access-team
|
||||
|
||||
# Support bundles
|
||||
/public/app/features/support-bundles/ @grafana/identity-access-team
|
||||
@@ -672,8 +633,6 @@ embed.go @grafana/grafana-as-code
|
||||
/pkg/kinds/ @grafana/grafana-as-code
|
||||
/pkg/registry/ @grafana/grafana-as-code
|
||||
/pkg/registry/apis/ @grafana/grafana-app-platform-squad
|
||||
/pkg/registry/apis/alerting @grafana/grafana-app-platform-squad @grafana/alerting-backend
|
||||
/pkg/registry/apis/query @grafana/grafana-datasources-core-services
|
||||
/pkg/codegen/ @grafana/grafana-as-code
|
||||
/pkg/codegen/generators @grafana/grafana-as-code
|
||||
/pkg/kinds/*/*_gen.go @grafana/grafana-as-code
|
||||
@@ -683,7 +642,7 @@ embed.go @grafana/grafana-as-code
|
||||
|
||||
# GitHub Workflows and Templates
|
||||
/.github/CODEOWNERS @tolzhabayev
|
||||
/.github/ISSUE_TEMPLATE/ @torkelo @sympatheticmoose
|
||||
/.github/ISSUE_TEMPLATE/ @torkelo
|
||||
/.github/PULL_REQUEST_TEMPLATE.md @torkelo
|
||||
/.github/bot.md @torkelo
|
||||
/.github/commands.json @torkelo
|
||||
@@ -695,14 +654,12 @@ embed.go @grafana/grafana-as-code
|
||||
/.github/renovate.json5 @grafana/frontend-ops
|
||||
/.github/teams.yml @armandgrillet
|
||||
/.github/workflows/alerting-swagger-gen.yml @grafana/alerting-backend
|
||||
/.github/workflows/auto-milestone.yml @grafana/grafana-developer-enablement-squad
|
||||
/.github/workflows/backport.yml @grafana/grafana-developer-enablement-squad
|
||||
/.github/workflows/bump-version.yml @grafana/grafana-developer-enablement-squad
|
||||
/.github/workflows/close-milestone.yml @grafana/grafana-developer-enablement-squad
|
||||
/.github/workflows/release-pr.yml @grafana/grafana-developer-enablement-squad
|
||||
/.github/workflows/release-comms.yml @grafana/grafana-developer-enablement-squad
|
||||
/.github/workflows/migrate-prs.yml @grafana/grafana-developer-enablement-squad
|
||||
/.github/workflows/create-next-release-branch.yml @grafana/grafana-developer-enablement-squad
|
||||
/.github/workflows/auto-milestone.yml @grafana/grafana-release-guild
|
||||
/.github/workflows/backport.yml @grafana/grafana-release-guild
|
||||
/.github/workflows/bump-version.yml @grafana/grafana-release-guild
|
||||
/.github/workflows/close-milestone.yml @grafana/grafana-release-guild
|
||||
/.github/workflows/release-pr.yml @grafana/grafana-release-guild
|
||||
/.github/workflows/release-comms.yml @grafana/grafana-release-guild
|
||||
/.github/workflows/codeowners-validator.yml @tolzhabayev
|
||||
/.github/workflows/codeql-analysis.yml @DanCech
|
||||
/.github/workflows/commands.yml @torkelo
|
||||
@@ -731,22 +688,21 @@ embed.go @grafana/grafana-as-code
|
||||
/.github/workflows/stale.yml @grafana/grafana-release-guild
|
||||
/.github/workflows/update-changelog.yml @grafana/grafana-release-guild
|
||||
/.github/workflows/update-make-docs.yml @grafana/docs-tooling
|
||||
/.github/workflows/snyk.yml @grafana/security-team
|
||||
/.github/workflows/scripts/kinds/verify-kinds.go @grafana/platform-cat
|
||||
/.github/workflows/publish-kinds-next.yml @grafana/platform-cat
|
||||
/.github/workflows/publish-kinds-release.yml @grafana/platform-cat
|
||||
/.github/workflows/verify-kinds.yml @grafana/platform-cat
|
||||
/.github/workflows/dashboards-issue-add-label.yml @grafana/dashboards-squad
|
||||
/.github/workflows/ephemeral-instances-pr-comment.yml @grafana/grafana-backend-services-squad
|
||||
/.github/workflows/ephemeral-instances-pr-comment.yml @grafana/grafana-operator-experience-squad
|
||||
/.github/workflows/ephemeral-instances-pr-opened-closed.yml @grafana/grafana-operator-experience-squad
|
||||
/.github/workflows/create-security-patch-from-security-mirror.yml @grafana/grafana-release-guild
|
||||
/.github/workflows/core-plugins-build-and-release.yml @grafana/plugins-platform-frontend @grafana/plugins-platform-backend
|
||||
/.github/workflows/i18n-crowdin-upload.yml @grafana/grafana-frontend-platform
|
||||
/.github/workflows/i18n-crowdin-download.yml @grafana/grafana-frontend-platform
|
||||
/.github/workflows/pr-go-workspace-check.yml @grafana/grafana-app-platform-squad
|
||||
/.github/workflows/pr-k8s-codegen-check.yml @grafana/grafana-app-platform-squad
|
||||
/.github/workflows/go-lint.yml @grafana/grafana-backend-services-squad
|
||||
/.github/workflows/trivy-scan.yml @grafana/grafana-backend-services-squad
|
||||
/.github/workflows/changelog.yml @zserge
|
||||
/.github/workflows/actions/changelog @zserge
|
||||
/.github/workflows/run-scenes-e2e.yml @grafana/dashboards-squad
|
||||
/.github/workflows/go_lint.yml @grafana/grafana-backend-services-squad
|
||||
|
||||
# Generated files not requiring owner approval
|
||||
/packages/grafana-data/src/types/featureToggles.gen.ts @grafanabot
|
||||
@@ -758,9 +714,9 @@ embed.go @grafana/grafana-as-code
|
||||
# Conf
|
||||
/conf/defaults.ini @torkelo
|
||||
/conf/sample.ini @torkelo
|
||||
/conf/ldap.toml @grafana/identity-squad
|
||||
/conf/ldap_multiple.toml @grafana/identity-squad
|
||||
/conf/provisioning/access-control/ @grafana/access-squad
|
||||
/conf/ldap.toml @grafana/identity-access-team
|
||||
/conf/ldap_multiple.toml @grafana/identity-access-team
|
||||
/conf/provisioning/access-control/ @grafana/identity-access-team
|
||||
/conf/provisioning/alerting/ @grafana/alerting-backend
|
||||
/conf/provisioning/dashboards/ @grafana/dashboards-squad
|
||||
/conf/provisioning/datasources/ @grafana/plugins-platform-backend
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
---
|
||||
name: New data source request
|
||||
description: Raise a request for a new data source plugin
|
||||
title: "[New Data Source]: <name-of-service>"
|
||||
labels:
|
||||
- area/datasource,type/new-plugin-request
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thank you for requesting a new data source plugin!
|
||||
|
||||
We greatly appreciate feedback from our community about which new data sources would be beneficial.
|
||||
|
||||
Grafana Labs regularly reviews these requests and uses them to inform our prioritization. Note: we cannot offer any guarantees on whether we or our community will build a given data source.
|
||||
|
||||
Please check our [roadmap](https://github.com/orgs/grafana/projects/619?pane=info) for existing requests and subscribe to stay informed of our plans. If no request exists, please fill out the following information.
|
||||
|
||||
Please do not request support or file bug reports and feature requests for existing plugins here.
|
||||
- For support, please use the community support resources [here](https://grafana.com/help/).
|
||||
- Please consider the `New Bug Report` or `Feature Requests` [issue templates](https://github.com/grafana/grafana/issues/new/choose) for other requests.
|
||||
- type: textarea
|
||||
id: background
|
||||
attributes:
|
||||
label: Background
|
||||
description: Tell us about the service you would like to see integrated as a data source
|
||||
placeholder: ACME_DB is an open source time-series database that is used by many organizations to store their metrics data. It is a popular choice for monitoring and observability.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: use_case
|
||||
attributes:
|
||||
label: Use case
|
||||
description: Describe any key requirements or data you would need surfaced, ideally including why they are useful for you.
|
||||
placeholder: My team uses ACME_DB as the application database to monitor our produciton workloads, so we'd like to alert on it and visualize ACME_DB data next to our logs and traces in Grafana.
|
||||
validations:
|
||||
required: true
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: Contribution
|
||||
description: If you are interested in creating the data source yourself and contributing to the [plugin catalog](https://grafana.com/grafana/plugins/), please fill in the following
|
||||
options:
|
||||
- label: Are you looking to create the plugin?
|
||||
- label: Are you affiliated with the project/product the data source integrates with?
|
||||
- label: Does the plugin integrate with a commercial product?
|
||||
39
.github/ISSUE_TEMPLATE/3-grafana_ui_component.md
vendored
Normal file
39
.github/ISSUE_TEMPLATE/3-grafana_ui_component.md
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
---
|
||||
name: '@grafana/ui component request'
|
||||
about: Suggest a component for the @grafana/ui package
|
||||
labels: 'area/grafana/ui'
|
||||
---
|
||||
|
||||
<!--
|
||||
By using this template you will make it easier for us to make sure that documentation and implementation stays up to date for every component in @grafana/ui
|
||||
|
||||
Thank you!
|
||||
-->
|
||||
|
||||
**Why is this component needed**:
|
||||
<!-- Explain your use case -->
|
||||
___
|
||||
- [ ] Is/could it be used in more than one place in Grafana?
|
||||
|
||||
**Where is/could it be used?**:
|
||||
|
||||
___
|
||||
- [ ] Post screenshots possible.
|
||||
- [ ] It has a single use case.
|
||||
- [ ] It is/could be used in multiple places.
|
||||
|
||||
**Implementation** (Checklist meant for the person implementing the component)
|
||||
|
||||
- [ ] Component has a story in Storybook.
|
||||
- [ ] Props and naming follows [our style guide](https://github.com/grafana/grafana/blob/main/contribute/style-guides/frontend.md).
|
||||
- [ ] It is extendable (rest props are spread, styles with className work, and so on).
|
||||
- [ ] Uses [theme for spacing, colors, and so on](https://github.com/grafana/grafana/blob/main/contribute/style-guides/themes.md).
|
||||
- [ ] Works with both light and dark theme.
|
||||
|
||||
**Documentation**
|
||||
|
||||
- [ ] Properties are documented.
|
||||
- [ ] Use cases are described.
|
||||
- [ ] Code examples for the different use cases.
|
||||
- [ ] Dos and don'ts.
|
||||
- [ ] Styling guidelines, specific color usage (if applicable).
|
||||
43
.github/ISSUE_TEMPLATE/4-UX-design.yaml
vendored
Normal file
43
.github/ISSUE_TEMPLATE/4-UX-design.yaml
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
name: UX design issue
|
||||
description: Create an issue for delivering wireframes, mockups or other design solutions.
|
||||
title: "UX: "
|
||||
labels: ["type/ux"]
|
||||
body:
|
||||
- type: textarea
|
||||
id: background
|
||||
attributes:
|
||||
label: "Background / Why we're doing this"
|
||||
description: Describe the problem and background of the issue. This could include research insights that inform the design changes, unmet user needs, or other usability issues.
|
||||
placeholder: Add UI improvements to make Grafana Alerting alert creation easier based on usability test results.
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
attributes:
|
||||
label: Is there existing research for this?
|
||||
description: Please link research results or insights in the Background section if you have any. If no research was conducted, you might want to consider usability testing your design later.
|
||||
options: [
|
||||
"Yes, I have linked it",
|
||||
"No research yet"
|
||||
]
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: problems-or-tasks
|
||||
attributes:
|
||||
label: Problems or tasks
|
||||
description: Describe problems the new design should solve or tasks the user needs to complete.
|
||||
placeholder:
|
||||
value: |
|
||||
- A problem we're trying to solve
|
||||
- A task the user needs to accomplish
|
||||
- …
|
||||
validations:
|
||||
required: false
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Deliverables
|
||||
description: Add a checklist of deliverables here. You can later add links to each deliverable.
|
||||
value: |
|
||||
- Figma mockup
|
||||
- Miro board
|
||||
- …
|
||||
17
.github/ISSUE_TEMPLATE/5-chore.md
vendored
Normal file
17
.github/ISSUE_TEMPLATE/5-chore.md
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
---
|
||||
name: Chore
|
||||
about: Create an issue for a chore needing completion
|
||||
labels: 'type: chore'
|
||||
---
|
||||
|
||||
<!--
|
||||
Please use this template to create your chore issue. You can use this template if you spot an out-of-date README, discover a misspelling, or happen upon a deeply nested 7-layer for-loop that could be better handled another way. Please use this template for your non-bug related fixes/updates/refactors.
|
||||
|
||||
- Questions should be posted to: https://community.grafana.com
|
||||
- Use query inspector to troubleshoot issues: https://bit.ly/2XNF6YS
|
||||
- How to record and attach gif: https://bit.ly/2Mi8T6K
|
||||
-->
|
||||
|
||||
**What is the chore?**:
|
||||
|
||||
**Is there anything else we need to know?**:
|
||||
65
.github/ISSUE_TEMPLATE/8-Saga_contribution.yaml
vendored
Normal file
65
.github/ISSUE_TEMPLATE/8-Saga_contribution.yaml
vendored
Normal file
@@ -0,0 +1,65 @@
|
||||
---
|
||||
name: Saga contribution template
|
||||
description: Contribute to the design system.
|
||||
title: "Saga: "
|
||||
labels:
|
||||
- area/grafana/ui, design-system
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
By using this template, you help expand our component and pattern solutions within the design system and let others reuse your work! You can contribute bug or design defect fixes, component, and pattern enhancements, or even net-new components! This template brings visibility to the great work everyone already does and in turn helps reduce duplicate efforts.
|
||||
Thank you!
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: What type of contribution is this?
|
||||
description: null
|
||||
options:
|
||||
- label: Fix - bug, design defect, typo, documentation conciseness
|
||||
- label: Unification - combining similar components/patterns into a single
|
||||
solution
|
||||
- label: Proposal - net-new component, additions, variants
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: background
|
||||
attributes:
|
||||
label: Why is this needed?
|
||||
description: Explain the use case and where it can be used.
|
||||
placeholder: null
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: use_case
|
||||
attributes:
|
||||
label: Where is this or where can it be used?
|
||||
description: Explain the current/future use case, be sure to include areas of impact
|
||||
placeholder: null
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Deliverables
|
||||
description: Add a checklist of deliverables here. You can later add links to
|
||||
each deliverable.
|
||||
value: |
|
||||
- Figma mockup
|
||||
- Storybook story
|
||||
- …
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: Contribution guiding principles
|
||||
description: Use this checklist of guiding principles to ensure your
|
||||
contribution makes Grafana a better product
|
||||
options:
|
||||
- label: Universal - not specific to a single product feature; able to be used
|
||||
product-wide
|
||||
- label: Accessible - inclusive to all types of users and assistive tools
|
||||
- label: Flexible - thoughtfully built and designed to solve various
|
||||
configurations and situations
|
||||
- label: Coherent - follows existing visual styling and patterns
|
||||
- label: Defined - documented clearly and concisely for ease of understanding
|
||||
- label: Distinct - solves a unique gap or problem that cannot be solved with
|
||||
current solutions
|
||||
validations:
|
||||
required: false
|
||||
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
@@ -47,4 +47,4 @@ Fixes #
|
||||
Please check that:
|
||||
- [ ] It works as expected from a user's perspective.
|
||||
- [ ] If this is a pre-GA feature, it is behind a feature toggle.
|
||||
- [ ] The docs are updated, and if this is a [notable improvement](https://grafana.com/docs/writers-toolkit/contribute/release-notes/#how-to-determine-if-content-belongs-in-whats-new), it's added to our [What's New](https://grafana.com/docs/writers-toolkit/contribute/release-notes/) doc.
|
||||
- [ ] The docs are updated, and if this is a [notable improvement](https://grafana.com/docs/writers-toolkit/writing-guide/contribute-release-notes/#how-to-determine-if-content-belongs-in-a-whats-new-document), it's added to our [What's New](https://grafana.com/docs/writers-toolkit/writing-guide/contribute-release-notes/) doc.
|
||||
|
||||
1028
.github/commands.json
vendored
1028
.github/commands.json
vendored
File diff suppressed because it is too large
Load Diff
8
.github/issue-opened.json
vendored
8
.github/issue-opened.json
vendored
@@ -1,11 +1,9 @@
|
||||
[
|
||||
{
|
||||
"type": "author",
|
||||
"memberOf": {
|
||||
"org": "grafana"
|
||||
},
|
||||
"memberOf": { "org": "grafana" },
|
||||
"noLabels": true,
|
||||
"addLabel": "internal",
|
||||
"comment": " please add one or more appropriate labels. Here are some tips:\r\n\r\n- if you are making an issue, TODO, or reminder for yourself or your team, please add one label that best describes the product or feature area. Please also add the issue to your project board. :rocket:\r\n\r\n- if you are making an issue for any other reason (docs typo, you found a bug, etc), please add at least one label that best describes the product or feature that you are discussing (e.g. `area/alerting`, `datasource/loki`, `type/docs`, `type/bug`, etc). [Our issue triage](https://github.com/grafana/grafana/blob/main/contribute/ISSUE_TRIAGE.md#3-categorize-an-issue) doc also provides additional guidance on labeling. :rocket:\r\n\r\n Thank you! :heart:"
|
||||
"comment": " please add one or more appropriate labels. Here are some tips:\r\n\r\n- if you are making an issue, TODO, or reminder for yourself or your team, please add one label that best describes the product or feature area. Please also add the issue to your project board. :rocket:\r\n\r\n- if you are making an issue for any other reason (docs typo, you found a bug, etc), please add at least one label that best describes the product or feature that you are discussing (e.g. `area/alerting`, `datasource/loki`, `type/docs`, `type/bug`, etc). [Our issue triage](https://github.com/grafana/grafana/blob/main/ISSUE_TRIAGE.md#3-categorizing-an-issue) doc also provides additional guidance on labeling. :rocket:\r\n\r\n Thank you! :heart:"
|
||||
}
|
||||
]
|
||||
]
|
||||
|
||||
2
.github/metrics-collector.json
vendored
2
.github/metrics-collector.json
vendored
@@ -29,4 +29,4 @@
|
||||
"query": "is:open is:pull-request"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
9
.github/pr-checks.json
vendored
9
.github/pr-checks.json
vendored
@@ -1,4 +1,11 @@
|
||||
[
|
||||
{
|
||||
"type": "check-milestone",
|
||||
"title": "Milestone Check",
|
||||
"targetUrl": "https://github.com/grafana/grafana/blob/main/contribute/merge-pull-request.md#assign-a-milestone",
|
||||
"success": "Milestone set",
|
||||
"failure": "Milestone not set"
|
||||
},
|
||||
{
|
||||
"type": "check-changelog",
|
||||
"title": "Changelog Check",
|
||||
@@ -20,4 +27,4 @@
|
||||
},
|
||||
"targetUrl": "https://github.com/grafana/grafana/blob/main/contribute/merge-pull-request.md#include-in-changelog-and-release-notes"
|
||||
}
|
||||
]
|
||||
]
|
||||
|
||||
405
.github/pr-commands.json
vendored
405
.github/pr-commands.json
vendored
@@ -2,8 +2,8 @@
|
||||
{
|
||||
"type": "changedfiles",
|
||||
"matches": [
|
||||
"docs/**/*",
|
||||
"contribute/**/*"
|
||||
"docs/**/*",
|
||||
"contribute/**/*"
|
||||
],
|
||||
"action": "updateLabel",
|
||||
"addLabel": "type/docs"
|
||||
@@ -11,21 +11,21 @@
|
||||
{
|
||||
"type": "changedfiles",
|
||||
"matches": [
|
||||
"public/**/*",
|
||||
"packages/**/*",
|
||||
"e2e/**/*",
|
||||
"plugins-bundled/**/*",
|
||||
"scripts/build/release-packages.sh",
|
||||
"scripts/circle-release-next-packages.sh",
|
||||
"scripts/ci-frontend-metrics.sh",
|
||||
"scripts/grunt/**/*",
|
||||
"scripts/webpack/**/*",
|
||||
"package.json",
|
||||
"tsconfig.json",
|
||||
"lerna.json",
|
||||
".prettierrc.js",
|
||||
".eslintrc",
|
||||
"**/*.mdx"
|
||||
"public/**/*",
|
||||
"packages/**/*",
|
||||
"e2e/**/*",
|
||||
"plugins-bundled/**/*",
|
||||
"scripts/build/release-packages.sh",
|
||||
"scripts/circle-release-next-packages.sh",
|
||||
"scripts/ci-frontend-metrics.sh",
|
||||
"scripts/grunt/**/*",
|
||||
"scripts/webpack/**/*",
|
||||
"package.json",
|
||||
"tsconfig.json",
|
||||
"lerna.json",
|
||||
".prettierrc.js",
|
||||
".eslintrc",
|
||||
"**/*.mdx"
|
||||
],
|
||||
"action": "updateLabel",
|
||||
"addLabel": "area/frontend"
|
||||
@@ -33,11 +33,11 @@
|
||||
{
|
||||
"type": "changedfiles",
|
||||
"matches": [
|
||||
"**/*.go",
|
||||
"go.mod",
|
||||
"go.sum",
|
||||
"contribute/style-guides/backend.md",
|
||||
"contribute/architecture/backend/**/*"
|
||||
"**/*.go",
|
||||
"go.mod",
|
||||
"go.sum",
|
||||
"contribute/style-guides/backend.md",
|
||||
"contribute/architecture/backend/**/*"
|
||||
],
|
||||
"action": "updateLabel",
|
||||
"addLabel": "area/backend"
|
||||
@@ -45,17 +45,15 @@
|
||||
{
|
||||
"type": "changedfiles",
|
||||
"matches": [
|
||||
"pkg/services/sqlstore/migrations/**/*",
|
||||
"**/*_mig.go"
|
||||
"pkg/services/sqlstore/migrations/**/*",
|
||||
"**/*_mig.go"
|
||||
],
|
||||
"action": "updateLabel",
|
||||
"addLabel": "area/backend/db/migration"
|
||||
},
|
||||
{
|
||||
"type": "changedfiles",
|
||||
"matches": [
|
||||
"public/app/features/explore/**/*"
|
||||
],
|
||||
"matches": [ "public/app/features/explore/**/*"],
|
||||
"action": "updateLabel",
|
||||
"addLabel": "area/explore"
|
||||
},
|
||||
@@ -84,357 +82,384 @@
|
||||
},
|
||||
{
|
||||
"type": "changedfiles",
|
||||
"matches": [
|
||||
"public/app/plugins/datasource/azuremonitor/**/*",
|
||||
"pkg/tsdb/azuremonitor/**/*"
|
||||
],
|
||||
"matches": [ "public/app/plugins/datasource/azuremonitor/**/*", "pkg/tsdb/azuremonitor/**/*"],
|
||||
"action": "updateLabel",
|
||||
"addLabel": "datasource/Azure"
|
||||
},
|
||||
{
|
||||
"type": "changedfiles",
|
||||
"matches": [
|
||||
"public/app/plugins/datasource/cloud-monitoring/**/*",
|
||||
"pkg/tsdb/cloud-monitoring/**/*"
|
||||
],
|
||||
"matches": [ "public/app/plugins/datasource/cloud-monitoring/**/*", "pkg/tsdb/cloud-monitoring/**/*"],
|
||||
"action": "updateLabel",
|
||||
"addLabel": "datasource/GoogleCloudMonitoring"
|
||||
},
|
||||
{
|
||||
"type": "changedfiles",
|
||||
"matches": [
|
||||
"public/app/plugins/datasource/cloudwatch/**/*",
|
||||
"pkg/tsdb/cloudwatch/**/*"
|
||||
],
|
||||
"matches": [ "public/app/plugins/datasource/cloudwatch/**/*", "pkg/tsdb/cloudwatch/**/*"],
|
||||
"action": "updateLabel",
|
||||
"addLabel": "datasource/CloudWatch"
|
||||
},
|
||||
{
|
||||
"type": "changedfiles",
|
||||
"matches": [
|
||||
"public/app/plugins/datasource/elasticsearch/**/*",
|
||||
"pkg/tsdb/elasticsearch/**/*"
|
||||
],
|
||||
"matches": [ "public/app/plugins/datasource/elasticsearch/**/*", "pkg/tsdb/elasticsearch/**/*"],
|
||||
"action": "updateLabel",
|
||||
"addLabel": "datasource/Elasticsearch"
|
||||
},
|
||||
{
|
||||
"type": "changedfiles",
|
||||
"matches": [
|
||||
"public/app/plugins/datasource/graphite/**/*",
|
||||
"pkg/tsdb/graphite/**/*"
|
||||
],
|
||||
"matches": [ "public/app/plugins/datasource/graphite/**/*", "pkg/tsdb/graphite/**/*"],
|
||||
"action": "updateLabel",
|
||||
"addLabel": "datasource/Graphite"
|
||||
},
|
||||
{
|
||||
"type": "changedfiles",
|
||||
"matches": [
|
||||
"public/app/plugins/datasource/influxdb/**/*",
|
||||
"pkg/tsdb/influx/**/*"
|
||||
],
|
||||
"matches": [ "public/app/plugins/datasource/influxdb/**/*", "pkg/tsdb/influx/**/*"],
|
||||
"action": "updateLabel",
|
||||
"addLabel": "datasource/InfluxDB"
|
||||
},
|
||||
{
|
||||
"type": "changedfiles",
|
||||
"matches": [
|
||||
"public/app/plugins/datasource/jaeger/**/*"
|
||||
],
|
||||
"matches": [ "public/app/plugins/datasource/jaeger/**/*"],
|
||||
"action": "updateLabel",
|
||||
"addLabel": "datasource/Jaeger"
|
||||
},
|
||||
{
|
||||
"type": "changedfiles",
|
||||
"matches": [
|
||||
"public/app/plugins/datasource/loki/**/*",
|
||||
"pkg/tsdb/loki/**/*"
|
||||
],
|
||||
"matches": [ "public/app/plugins/datasource/loki/**/*", "pkg/tsdb/loki/**/*"],
|
||||
"action": "updateLabel",
|
||||
"addLabel": "datasource/Loki"
|
||||
},
|
||||
{
|
||||
"type": "changedfiles",
|
||||
"matches": [
|
||||
"public/app/plugins/datasource/mssql/**/*",
|
||||
"pkg/tsdb/mssql/**/*"
|
||||
],
|
||||
"matches": [ "public/app/plugins/datasource/mssql/**/*", "pkg/tsdb/mssql/**/*"],
|
||||
"action": "updateLabel",
|
||||
"addLabel": "datasource/MSSQL"
|
||||
},
|
||||
{
|
||||
"type": "changedfiles",
|
||||
"matches": [
|
||||
"public/app/plugins/datasource/mysql/**/*",
|
||||
"pkg/tsdb/mysql/**/*"
|
||||
],
|
||||
"matches": [ "public/app/plugins/datasource/mysql/**/*", "pkg/tsdb/mysql/**/*"],
|
||||
"action": "updateLabel",
|
||||
"addLabel": "datasource/MySQL"
|
||||
},
|
||||
{
|
||||
"type": "changedfiles",
|
||||
"matches": [
|
||||
"public/app/plugins/datasource/opentsdb/**/*",
|
||||
"pkg/tsdb/opentsdb/**/*"
|
||||
],
|
||||
"matches": [ "public/app/plugins/datasource/opentsdb/**/*", "pkg/tsdb/opentsdb/**/*"],
|
||||
"action": "updateLabel",
|
||||
"addLabel": "datasource/OpenTSDB"
|
||||
},
|
||||
{
|
||||
"type": "changedfiles",
|
||||
"matches": [
|
||||
"public/app/plugins/datasource/parca/**/*"
|
||||
],
|
||||
"matches": [ "public/app/plugins/datasource/parca/**/*"],
|
||||
"action": "updateLabel",
|
||||
"addLabel": "datasource/Parca"
|
||||
},
|
||||
{
|
||||
"type": "changedfiles",
|
||||
"matches": [
|
||||
"public/app/plugins/datasource/grafana-pyroscope-datasource/**/*",
|
||||
"pkg/tsdb/grafana-pyroscope-datasource/**/*"
|
||||
],
|
||||
"matches": [ "public/app/plugins/datasource/grafana-pyroscope-datasource/**/*", "pkg/tsdb/grafana-pyroscope-datasource/**/*"],
|
||||
"action": "updateLabel",
|
||||
"addLabel": "datasource/grafana-pyroscope"
|
||||
},
|
||||
{
|
||||
"type": "changedfiles",
|
||||
"matches": [
|
||||
"public/app/plugins/datasource/grafana-postgresql-datasource/**/*",
|
||||
"pkg/tsdb/grafana-postgresql-datasource/**/*"
|
||||
],
|
||||
"matches": [ "public/app/plugins/datasource/grafana-postgresql-datasource/**/*", "pkg/tsdb/grafana-postgresql-datasource/**/*"],
|
||||
"action": "updateLabel",
|
||||
"addLabel": "datasource/Postgres"
|
||||
},
|
||||
{
|
||||
"type": "changedfiles",
|
||||
"matches": [
|
||||
"public/app/plugins/datasource/prometheus/**/*",
|
||||
"pkg/tsdb/prometheus/**/*"
|
||||
],
|
||||
"matches": [ "public/app/plugins/datasource/prometheus/**/*", "pkg/tsdb/prometheus/**/*"],
|
||||
"action": "updateLabel",
|
||||
"addLabel": "datasource/Prometheus"
|
||||
},
|
||||
{
|
||||
"type": "changedfiles",
|
||||
"matches": [
|
||||
"public/app/plugins/datasource/tempo/**/*",
|
||||
"pkg/tsdb/tempo/**/*"
|
||||
],
|
||||
"matches": [ "public/app/plugins/datasource/tempo/**/*", "pkg/tsdb/tempo/**/*"],
|
||||
"action": "updateLabel",
|
||||
"addLabel": "datasource/Tempo"
|
||||
},
|
||||
{
|
||||
"type": "changedfiles",
|
||||
"matches": [
|
||||
"public/app/plugins/datasource/zipkin/**/*"
|
||||
],
|
||||
"matches": [ "public/app/plugins/datasource/zipkin/**/*"],
|
||||
"action": "updateLabel",
|
||||
"addLabel": "datasource/Zipkin"
|
||||
},
|
||||
{
|
||||
"type": "changedfiles",
|
||||
"matches": [
|
||||
"public/app/features/variables/**/*",
|
||||
"public/app/features/templating/**/*"
|
||||
],
|
||||
"matches": ["public/app/features/variables/**/*", "public/app/features/templating/**/*"],
|
||||
"action": "updateLabel",
|
||||
"addLabel": "area/dashboard/templating"
|
||||
},
|
||||
{
|
||||
"type": "changedfiles",
|
||||
"matches": [
|
||||
"/pkg/services/ngalert/**/*",
|
||||
"/pkg/services/sqlstore/migrations/ualert/**/*",
|
||||
"/pkg/services/alerting/**/*",
|
||||
"/public/app/features/alerting/**/*",
|
||||
"/pkg/tests/api/alerting/**/*"
|
||||
],
|
||||
"matches": ["/pkg/services/ngalert/**/*", "/pkg/services/sqlstore/migrations/ualert/**/*", "/pkg/services/alerting/**/*", "/public/app/features/alerting/**/*", "/pkg/tests/api/alerting/**/*"],
|
||||
"action": "updateLabel",
|
||||
"addLabel": "area/alerting"
|
||||
},
|
||||
{
|
||||
"type": "author",
|
||||
"name": "pr/external",
|
||||
"notMemberOf": {
|
||||
"org": "grafana"
|
||||
},
|
||||
"ignoreList": [
|
||||
"renovate[bot]",
|
||||
"dependabot[bot]",
|
||||
"grafana-delivery-bot[bot]",
|
||||
"grafanabot"
|
||||
],
|
||||
"notMemberOf": { "org": "grafana" },
|
||||
"ignoreList": ["renovate[bot]","dependabot[bot]","grafana-delivery-bot[bot]","grafanabot"],
|
||||
"action": "updateLabel",
|
||||
"addLabel": "pr/external"
|
||||
},
|
||||
{
|
||||
"type": "label",
|
||||
"name": "type/docs",
|
||||
"action": "addToProject",
|
||||
"addToProject": {
|
||||
"url": "https://github.com/orgs/grafana/projects/69"
|
||||
"type":"label",
|
||||
"name":"type/docs",
|
||||
"action":"addToProject",
|
||||
"addToProject":{
|
||||
"url":"https://github.com/orgs/grafana/projects/69"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "changedfiles",
|
||||
"matches": [
|
||||
"public/app/plugins/panel/candlestick/**/*"
|
||||
],
|
||||
"matches": ["public/app/plugins/panel/candlestick/**/*"],
|
||||
"action": "updateLabel",
|
||||
"addLabel": "area/panel/candlestick"
|
||||
},
|
||||
{
|
||||
"type": "label",
|
||||
"name": "area/panel/candlestick",
|
||||
"action": "addToProject",
|
||||
"addToProject": {
|
||||
"url": "https://github.com/orgs/grafana/projects/56"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "changedfiles",
|
||||
"matches": [
|
||||
"public/app/plugins/panel/canvas/**/*",
|
||||
"/public/app/features/canvas/**/*"
|
||||
],
|
||||
"matches": ["public/app/plugins/panel/canvas/**/*", "/public/app/features/canvas/**/*"],
|
||||
"action": "updateLabel",
|
||||
"addLabel": "area/panel/canvas"
|
||||
},
|
||||
{
|
||||
"type": "label",
|
||||
"name": "area/panel/canvas",
|
||||
"action": "addToProject",
|
||||
"addToProject": {
|
||||
"url": "https://github.com/orgs/grafana/projects/56"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "changedfiles",
|
||||
"matches": [
|
||||
"public/app/plugins/panel/barchart/**/*"
|
||||
],
|
||||
"matches": ["public/app/plugins/panel/barchart/**/*"],
|
||||
"action": "updateLabel",
|
||||
"addLabel": "area/panel/barchart"
|
||||
},
|
||||
{
|
||||
"type": "label",
|
||||
"name": "area/panel/barchart",
|
||||
"action": "addToProject",
|
||||
"addToProject": {
|
||||
"url": "https://github.com/orgs/grafana/projects/56"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "changedfiles",
|
||||
"matches": [
|
||||
"public/app/plugins/panel/geomap/**/*",
|
||||
"/public/app/features/geo/**/*"
|
||||
],
|
||||
"matches": ["public/app/plugins/panel/geomap/**/*", "/public/app/features/geo/**/*"],
|
||||
"action": "updateLabel",
|
||||
"addLabel": "area/panel/geomap"
|
||||
},
|
||||
{
|
||||
"type": "label",
|
||||
"name": "area/panel/geomap",
|
||||
"action": "addToProject",
|
||||
"addToProject": {
|
||||
"url": "https://github.com/orgs/grafana/projects/56"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "changedfiles",
|
||||
"matches": [
|
||||
"public/app/plugins/panel/graph/**/*",
|
||||
"/packages/grafana-ui/src/components/Graph/**/*",
|
||||
"/packages/grafana-ui/src/components/GraphNG/**/*"
|
||||
],
|
||||
"matches": ["public/app/plugins/panel/graph/**/*", "/packages/grafana-ui/src/components/Graph/**/*", "/packages/grafana-ui/src/components/GraphNG/**/*"],
|
||||
"action": "updateLabel",
|
||||
"addLabel": "area/panel/graph"
|
||||
},
|
||||
{
|
||||
"type": "label",
|
||||
"name": "area/panel/graph",
|
||||
"action": "addToProject",
|
||||
"addToProject": {
|
||||
"url": "https://github.com/orgs/grafana/projects/56"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "changedfiles",
|
||||
"matches": [
|
||||
"public/app/plugins/panel/heatmap/**/*"
|
||||
],
|
||||
"matches": ["public/app/plugins/panel/heatmap/**/*"],
|
||||
"action": "updateLabel",
|
||||
"addLabel": "area/panel/heatmap"
|
||||
},
|
||||
{
|
||||
"type": "label",
|
||||
"name": "area/panel/heatmap",
|
||||
"action": "addToProject",
|
||||
"addToProject": {
|
||||
"url": "https://github.com/orgs/grafana/projects/56"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "changedfiles",
|
||||
"matches": [
|
||||
"public/app/plugins/panel/histogram/**/*"
|
||||
],
|
||||
"matches": ["public/app/plugins/panel/histogram/**/*"],
|
||||
"action": "updateLabel",
|
||||
"addLabel": "area/panel/histogram"
|
||||
},
|
||||
{
|
||||
"type": "label",
|
||||
"name": "area/panel/histogram",
|
||||
"action": "addToProject",
|
||||
"addToProject": {
|
||||
"url": "https://github.com/orgs/grafana/projects/56"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "changedfiles",
|
||||
"matches": [
|
||||
"public/app/plugins/panel/state-timeline/**/*"
|
||||
],
|
||||
"matches": ["public/app/plugins/panel/state-timeline/**/*"],
|
||||
"action": "updateLabel",
|
||||
"addLabel": "area/panel/state-timeline"
|
||||
},
|
||||
{
|
||||
"type": "label",
|
||||
"name": "area/panel/state-timeline",
|
||||
"action": "addToProject",
|
||||
"addToProject": {
|
||||
"url": "https://github.com/orgs/grafana/projects/56"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "changedfiles",
|
||||
"matches": [
|
||||
"public/app/plugins/panel/status-history/**/*"
|
||||
],
|
||||
"matches": ["public/app/plugins/panel/status-history/**/*"],
|
||||
"action": "updateLabel",
|
||||
"addLabel": "area/panel/status-history"
|
||||
},
|
||||
{
|
||||
"type": "label",
|
||||
"name": "area/panel/status-history",
|
||||
"action": "addToProject",
|
||||
"addToProject": {
|
||||
"url": "https://github.com/orgs/grafana/projects/56"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "changedfiles",
|
||||
"matches": [
|
||||
"public/app/plugins/panel/timeseries/**/*",
|
||||
"/packages/grafana-ui/src/components/TimeSeries/**/*"
|
||||
],
|
||||
"matches": ["public/app/plugins/panel/timeseries/**/*", "/packages/grafana-ui/src/components/TimeSeries/**/*"],
|
||||
"action": "updateLabel",
|
||||
"addLabel": "area/panel/timeseries"
|
||||
},
|
||||
{
|
||||
"type": "label",
|
||||
"name": "area/panel/timeseries",
|
||||
"action": "addToProject",
|
||||
"addToProject": {
|
||||
"url": "https://github.com/orgs/grafana/projects/56"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "changedfiles",
|
||||
"matches": [
|
||||
"public/app/plugins/panel/xychart/**/*"
|
||||
],
|
||||
"matches": ["public/app/plugins/panel/xychart/**/*"],
|
||||
"action": "updateLabel",
|
||||
"addLabel": "area/panel/xychart"
|
||||
},
|
||||
{
|
||||
"type": "label",
|
||||
"name": "area/panel/xychart",
|
||||
"action": "addToProject",
|
||||
"addToProject": {
|
||||
"url": "https://github.com/orgs/grafana/projects/56"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "changedfiles",
|
||||
"matches": [
|
||||
"public/app/plugins/panel/trend/**/*"
|
||||
],
|
||||
"matches": ["public/app/plugins/panel/trend/**/*"],
|
||||
"action": "updateLabel",
|
||||
"addLabel": "area/panel/trend"
|
||||
},
|
||||
{
|
||||
"type": "label",
|
||||
"name": "area/panel/trend",
|
||||
"action": "addToProject",
|
||||
"addToProject": {
|
||||
"url": "https://github.com/orgs/grafana/projects/56"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "changedfiles",
|
||||
"matches": [
|
||||
"/packages/grafana-ui/src/components/VizLegend/**/*"
|
||||
],
|
||||
"matches": ["/packages/grafana-ui/src/components/VizLegend/**/*"],
|
||||
"action": "updateLabel",
|
||||
"addLabel": "area/legend"
|
||||
},
|
||||
{
|
||||
"type": "label",
|
||||
"name": "area/legend",
|
||||
"action": "addToProject",
|
||||
"addToProject": {
|
||||
"url": "https://github.com/orgs/grafana/projects/56"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "changedfiles",
|
||||
"matches": [
|
||||
"/packages/grafana-ui/src/components/VizTooltip/**/*",
|
||||
"public/app/feature/visualization/data-hover/**/*"
|
||||
],
|
||||
"matches": ["/packages/grafana-ui/src/components/VizTooltip/**/*", "public/app/feature/visualization/data-hover/**/*" ],
|
||||
"action": "updateLabel",
|
||||
"addLabel": "area/tooltip"
|
||||
},
|
||||
{
|
||||
"type": "label",
|
||||
"name": "area/tooltip",
|
||||
"action": "addToProject",
|
||||
"addToProject": {
|
||||
"url": "https://github.com/orgs/grafana/projects/56"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "changedfiles",
|
||||
"matches": [
|
||||
"public/app/plugins/panel/gauge/**/*",
|
||||
"/packages/grafana-ui/src/components/Gauge/**/*"
|
||||
],
|
||||
"matches": ["public/app/plugins/panel/gauge/**/*", "/packages/grafana-ui/src/components/Gauge/**/*"],
|
||||
"action": "updateLabel",
|
||||
"addLabel": "area/panel/gauge"
|
||||
},
|
||||
{
|
||||
"type": "changedfiles",
|
||||
"matches": [
|
||||
"public/app/plugins/panel/bargauge/**/*",
|
||||
"/packages/grafana-ui/src/components/BarGauge/**/*"
|
||||
],
|
||||
"action": "updateLabel",
|
||||
"addLabel": "area/panel/bargauge"
|
||||
"type": "label",
|
||||
"name": "area/panel/gauge",
|
||||
"action": "addToProject",
|
||||
"addToProject": {
|
||||
"url": "https://github.com/orgs/grafana/projects/56"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "changedfiles",
|
||||
"matches": [
|
||||
"public/app/plugins/panel/stat/**/*"
|
||||
],
|
||||
"matches": ["public/app/plugins/panel/bargauge/**/*", "/packages/grafana-ui/src/components/BarGauge/**/*"],
|
||||
"action": "updateLabel",
|
||||
"addLabel": "area/panel/gauge"
|
||||
},
|
||||
{
|
||||
"type": "label",
|
||||
"name": "area/panel/bargauge",
|
||||
"action": "addToProject",
|
||||
"addToProject": {
|
||||
"url": "https://github.com/orgs/grafana/projects/56"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "changedfiles",
|
||||
"matches": ["public/app/plugins/panel/stat/**/*"],
|
||||
"action": "updateLabel",
|
||||
"addLabel": "area/panel/stat"
|
||||
},
|
||||
{
|
||||
"type": "label",
|
||||
"name": "area/panel/stat",
|
||||
"action": "addToProject",
|
||||
"addToProject": {
|
||||
"url": "https://github.com/orgs/grafana/projects/56"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "changedfiles",
|
||||
"matches": [
|
||||
"public/app/plugins/panel/piechart/**/*"
|
||||
],
|
||||
"matches": ["public/app/plugins/panel/piechart/**/*"],
|
||||
"action": "updateLabel",
|
||||
"addLabel": "area/panel/piechart"
|
||||
},
|
||||
{
|
||||
"type": "changedfiles",
|
||||
"matches": [
|
||||
"public/app/plugins/panel/table/**/*",
|
||||
"/packages/grafana-ui/src/components/Table/**/*"
|
||||
],
|
||||
"action": "updateLabel",
|
||||
"addLabel": "area/panel/table"
|
||||
"type": "label",
|
||||
"name": "area/panel/piechart",
|
||||
"action": "addToProject",
|
||||
"addToProject": {
|
||||
"url": "https://github.com/orgs/grafana/projects/56"
|
||||
}
|
||||
}
|
||||
]
|
||||
]
|
||||
|
||||
4
.github/workflows/actions/changelog/index.js
vendored
4
.github/workflows/actions/changelog/index.js
vendored
@@ -199,7 +199,7 @@ const getChangeLogItems = async (name, owner, sinceDate, to) => {
|
||||
hasLabel({ labels }, 'area/grafana/ui') ||
|
||||
hasLabel({ labels }, 'area/grafana/toolkit') ||
|
||||
hasLabel({ labels }, 'area/grafana/runtime');
|
||||
const author = item.commits.nodes[0].commit.author.user?.login;
|
||||
const author = item.commits.nodes[0].commit.author.user.login;
|
||||
return {
|
||||
repo: name,
|
||||
number,
|
||||
@@ -285,7 +285,7 @@ ${items
|
||||
`- ${item.title.replace(/^([^:]*:)/gm, '**$1**')} ${
|
||||
item.repo === 'grafana-enterprise'
|
||||
? '(Enterprise)'
|
||||
: `${pullRequestLink(item.number)}${item.author ? ', ' + userLink(item.author) : ''}`
|
||||
: `${pullRequestLink(item.number)}, ${userLink(item.author)}`
|
||||
}`
|
||||
)
|
||||
.join('\n')}
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"name": "changelog",
|
||||
"main": "index.js",
|
||||
"type": "module",
|
||||
"description": "changelog generator"
|
||||
}
|
||||
40
.github/workflows/auto-milestone.yml
vendored
40
.github/workflows/auto-milestone.yml
vendored
@@ -1,27 +1,39 @@
|
||||
name: Auto-milestone
|
||||
on:
|
||||
pull_request_target:
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
- reopened
|
||||
- closed
|
||||
- ready_for_review
|
||||
|
||||
permissions:
|
||||
pull-requests: write
|
||||
contents: write
|
||||
|
||||
# Note: this action runs with write permissions on GITHUB_TOKEN even from forks
|
||||
# so it must not run untrusted code (such as checking out the pull request)
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event.pull_request.draft == false
|
||||
config:
|
||||
runs-on: "ubuntu-latest"
|
||||
outputs:
|
||||
has-secrets: ${{ steps.check.outputs.has-secrets }}
|
||||
steps:
|
||||
# Note: Github will not trigger other actions from this because it uses
|
||||
# the GITHUB_TOKEN token
|
||||
- name: "Check for secrets"
|
||||
id: check
|
||||
shell: bash
|
||||
run: |
|
||||
if [ -n "${{ (secrets.GRAFANA_DELIVERY_BOT_APP_ID != '' && secrets.GRAFANA_DELIVERY_BOT_APP_PEM != '') || '' }}" ]; then
|
||||
echo "has-secrets=1" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
|
||||
main:
|
||||
needs: config
|
||||
if: needs.config.outputs.has-secrets
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: "Generate token"
|
||||
id: generate_token
|
||||
uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92
|
||||
with:
|
||||
app_id: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_ID }}
|
||||
private_key: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_PEM }}
|
||||
|
||||
- name: Run auto-milestone
|
||||
uses: grafana/grafana-github-actions-go/auto-milestone@main
|
||||
with:
|
||||
pr: ${{ github.event.pull_request.number }}
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
token: ${{ steps.generate_token.outputs.token }}
|
||||
|
||||
16
.github/workflows/backport.yml
vendored
16
.github/workflows/backport.yml
vendored
@@ -10,18 +10,24 @@ jobs:
|
||||
if: github.repository == 'grafana/grafana'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
- name: Checkout Actions
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: "grafana/grafana-github-actions"
|
||||
path: ./actions
|
||||
ref: main
|
||||
- name: Install Actions
|
||||
run: npm install --production --prefix ./actions
|
||||
- name: "Generate token"
|
||||
id: generate_token
|
||||
uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92
|
||||
with:
|
||||
app_id: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_ID }}
|
||||
private_key: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_PEM }}
|
||||
- run: git config --global user.email '132647405+grafana-delivery-bot[bot]@users.noreply.github.com'
|
||||
- run: git config --global user.name 'grafana-delivery-bot[bot]'
|
||||
- run: git remote set-url origin "https://grafana-delivery-bot:${{ steps.generate_token.outputs.token }}@github.com/grafana/grafana.git"
|
||||
- name: Run backport
|
||||
uses: grafana/grafana-github-actions-go/backport@main
|
||||
uses: ./actions/backport
|
||||
with:
|
||||
metricsWriteAPIKey: ${{secrets.GRAFANA_MISC_STATS_API_KEY}}
|
||||
token: ${{ steps.generate_token.outputs.token }}
|
||||
labelsToAdd: "backport"
|
||||
title: "[{{base}}] {{originalTitle}}"
|
||||
|
||||
9
.github/workflows/changelog.yml
vendored
9
.github/workflows/changelog.yml
vendored
@@ -2,10 +2,6 @@ name: Generate changelog
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
previous_version:
|
||||
type: string
|
||||
required: false
|
||||
description: 'The release version (semver, git tag, branch or commit) to use for comparison'
|
||||
version:
|
||||
type: string
|
||||
required: true
|
||||
@@ -30,10 +26,6 @@ on:
|
||||
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
previous_version:
|
||||
type: string
|
||||
required: false
|
||||
description: 'The release version (semver, git tag, branch or commit) to use for comparison'
|
||||
version:
|
||||
type: string
|
||||
required: true
|
||||
@@ -94,7 +86,6 @@ jobs:
|
||||
id: changelog
|
||||
uses: ./.github/workflows/actions/changelog
|
||||
with:
|
||||
previous: ${{ inputs.previous_version }}
|
||||
github_token: ${{ steps.generate_token.outputs.token }}
|
||||
target: v${{ inputs.version }}
|
||||
output_file: changelog_items.md
|
||||
|
||||
31
.github/workflows/commands.yml
vendored
31
.github/workflows/commands.yml
vendored
@@ -1,21 +1,11 @@
|
||||
name: Run commands when issues are labeled or comments added
|
||||
|
||||
# important: this workflow uses a github app that is strictly limited
|
||||
# to issues. If you want to change the triggers for this workflow,
|
||||
# please review if the permissions are still sufficient.
|
||||
on:
|
||||
issues:
|
||||
types: [labeled, unlabeled]
|
||||
issue_comment:
|
||||
types: [created]
|
||||
|
||||
concurrency:
|
||||
group: issue-commands-${{ github.event.issue.number }}
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
id-token: write
|
||||
|
||||
jobs:
|
||||
config:
|
||||
runs-on: "ubuntu-latest"
|
||||
@@ -26,7 +16,7 @@ jobs:
|
||||
id: check
|
||||
shell: bash
|
||||
run: |
|
||||
if [ "${{ github.repository }}" == "grafana/grafana" ] && [ -n "${{ secrets.GRAFANA_MISC_STATS_API_KEY }}" ]; then
|
||||
if [ -n "${{ (secrets.GRAFANA_MISC_STATS_API_KEY != '' && secrets.ISSUE_COMMANDS_TOKEN != '') || '' }}" ]; then
|
||||
echo "has-secrets=1" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
|
||||
@@ -35,34 +25,17 @@ jobs:
|
||||
if: needs.config.outputs.has-secrets
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: "Get vault secrets"
|
||||
id: vault-secrets
|
||||
uses: grafana/shared-workflows/actions/get-vault-secrets@main
|
||||
with:
|
||||
# Secrets placed in the ci/repo/grafana/grafana/plugins_platform_issue_commands_github_bot path in Vault
|
||||
repo_secrets: |
|
||||
GH_APP_ID=plugins_platform_issue_commands_github_bot:app_id
|
||||
GH_APP_PEM=plugins_platform_issue_commands_github_bot:app_pem
|
||||
|
||||
- name: "Generate token"
|
||||
id: generate_token
|
||||
uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92
|
||||
with:
|
||||
app_id: ${{ env.GH_APP_ID }}
|
||||
private_key: ${{ env.GH_APP_PEM }}
|
||||
|
||||
- name: Checkout Actions
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: "grafana/grafana-github-actions"
|
||||
path: ./actions
|
||||
ref: main
|
||||
|
||||
- name: Install Actions
|
||||
run: npm install --production --prefix ./actions
|
||||
- name: Run Commands
|
||||
uses: ./actions/commands
|
||||
with:
|
||||
metricsWriteAPIKey: ${{secrets.GRAFANA_MISC_STATS_API_KEY}}
|
||||
token: ${{ steps.generate_token.outputs.token }}
|
||||
token: ${{secrets.ISSUE_COMMANDS_TOKEN}}
|
||||
configPath: commands
|
||||
|
||||
53
.github/workflows/create-next-release-branch.yml
vendored
53
.github/workflows/create-next-release-branch.yml
vendored
@@ -1,53 +0,0 @@
|
||||
name: Create next release branch
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
ownerRepo:
|
||||
type: string
|
||||
description: Owner/repo of the repository where the branch is created (e.g. 'grafana/grafana')
|
||||
required: true
|
||||
source:
|
||||
description: The release branch to increment (eg providing `release-11.2.3` will result in `release-11.2.4` being created)
|
||||
type: string
|
||||
required: true
|
||||
secrets:
|
||||
GRAFANA_DELIVERY_BOT_APP_ID:
|
||||
required: true
|
||||
GRAFANA_DELIVERY_BOT_APP_PEM:
|
||||
required: true
|
||||
outputs:
|
||||
branch:
|
||||
description: The new branch that was created
|
||||
value: ${{ jobs.main.outputs.branch }}
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
ownerRepo:
|
||||
description: Owner/repo of the repository where the branch is created (e.g. 'grafana/grafana')
|
||||
source:
|
||||
description: The release branch to increment (eg providing `release-11.2.3` will result in `release-11.2.4` being created)
|
||||
type: string
|
||||
required: true
|
||||
secrets:
|
||||
GRAFANA_DELIVERY_BOT_APP_ID:
|
||||
required: true
|
||||
GRAFANA_DELIVERY_BOT_APP_PEM:
|
||||
required: true
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
branch: ${{ steps.branch.outputs.branch }}
|
||||
steps:
|
||||
- name: "Generate token"
|
||||
id: generate_token
|
||||
uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92
|
||||
with:
|
||||
app_id: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_ID }}
|
||||
private_key: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_PEM }}
|
||||
- name: Create release branch
|
||||
id: branch
|
||||
uses: grafana/grafana-github-actions-go/bump-release@main
|
||||
with:
|
||||
ownerRepo: ${{ inputs.ownerRepo }}
|
||||
source: ${{ inputs.source }}
|
||||
token: ${{ steps.generate_token.outputs.token }}
|
||||
@@ -11,7 +11,6 @@ on:
|
||||
branches:
|
||||
- "main"
|
||||
- "v*.*.*"
|
||||
- "release-*.*.*"
|
||||
|
||||
# This is run before the pull request has been merged, so we'll run against the src branch
|
||||
jobs:
|
||||
|
||||
@@ -2,10 +2,6 @@
|
||||
---
|
||||
name: Levitate / Detect breaking changes in PR
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
@@ -15,7 +11,7 @@ on:
|
||||
|
||||
jobs:
|
||||
buildPR:
|
||||
name: Build PR packages artifacts
|
||||
name: Build PR
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
@@ -31,7 +27,7 @@ jobs:
|
||||
|
||||
- name: Get yarn cache directory path
|
||||
id: yarn-cache-dir-path
|
||||
run: echo "dir=$(yarn config get cacheFolder)" >> "$GITHUB_OUTPUT"
|
||||
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Restore yarn cache
|
||||
uses: actions/cache@v4
|
||||
@@ -61,7 +57,7 @@ jobs:
|
||||
path: './pr/pr_built_packages.zip'
|
||||
|
||||
buildBase:
|
||||
name: Build Base packages artifacts
|
||||
name: Build Base
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
@@ -79,7 +75,7 @@ jobs:
|
||||
|
||||
- name: Get yarn cache directory path
|
||||
id: yarn-cache-dir-path
|
||||
run: echo "dir=$(yarn config get cacheFolder)" >> "$GITHUB_OUTPUT"
|
||||
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Restore yarn cache
|
||||
uses: actions/cache@v4
|
||||
@@ -109,14 +105,11 @@ jobs:
|
||||
path: './base/base_built_packages.zip'
|
||||
|
||||
Detect:
|
||||
name: Detect breaking changes between PR and base
|
||||
name: Detect breaking changes
|
||||
runs-on: ubuntu-latest
|
||||
needs: ['buildPR', 'buildBase']
|
||||
env:
|
||||
GITHUB_STEP_NUMBER: 8
|
||||
permissions:
|
||||
contents: 'read'
|
||||
id-token: 'write'
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
@@ -140,20 +133,6 @@ jobs:
|
||||
- name: Unzip artifact from base
|
||||
run: unzip -j base_built_packages.zip -d ./base && rm base_built_packages.zip
|
||||
|
||||
- id: 'auth'
|
||||
uses: 'google-github-actions/auth@v2'
|
||||
with:
|
||||
workload_identity_provider: ${{ secrets.WIF_PROVIDER }}
|
||||
service_account: ${{ secrets.LEVITATE_SA }}
|
||||
project_id: 'grafanalabs-global'
|
||||
|
||||
- name: 'Set up Cloud SDK'
|
||||
uses: 'google-github-actions/setup-gcloud@v2'
|
||||
with:
|
||||
version: '>= 363.0.0'
|
||||
project_id: 'grafanalabs-global'
|
||||
install_components: 'bq'
|
||||
|
||||
- name: Get link for the Github Action job
|
||||
id: job
|
||||
uses: actions/github-script@v6
|
||||
@@ -183,7 +162,7 @@ jobs:
|
||||
|
||||
|
||||
Report:
|
||||
name: Report breaking changes in PR comment
|
||||
name: Report breaking changes in PR
|
||||
runs-on: ubuntu-latest
|
||||
needs: ['Detect']
|
||||
|
||||
@@ -238,9 +217,9 @@ jobs:
|
||||
echo 'levitate_markdown<<EOF'
|
||||
cat levitate.md
|
||||
echo EOF
|
||||
} >> "$GITHUB_OUTPUT"
|
||||
} >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "levitate_markdown=No breaking changes detected" >> "$GITHUB_OUTPUT"
|
||||
echo "levitate_markdown=No breaking changes detected" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
|
||||
@@ -257,8 +236,7 @@ jobs:
|
||||
${{ steps.levitate-markdown.outputs.levitate_markdown }}
|
||||
|
||||
[Read our guideline](https://github.com/grafana/grafana/blob/main/contribute/breaking-changes-guide/breaking-changes-guide.md)
|
||||
|
||||
* Your pull request merge won't be blocked.
|
||||
[Console output](${{ steps.levitate-run.outputs.job_link }})
|
||||
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
|
||||
|
||||
# Remove comment from the PR (no more breaking changes)
|
||||
@@ -358,10 +336,5 @@ jobs:
|
||||
});
|
||||
|
||||
- name: Exit
|
||||
run: |
|
||||
if [ "${{ steps.levitate-run.outputs.exit_code }}" -ne 0 ]; then
|
||||
echo "Breaking changes detected. Please check the levitate report in your pull request. This workflow won't block merging."
|
||||
fi
|
||||
|
||||
exit ${{ steps.levitate-run.outputs.exit_code }}
|
||||
run: exit ${{ steps.levitate-run.outputs.exit_code }}
|
||||
shell: bash
|
||||
|
||||
21
.github/workflows/doc-validator.yml
vendored
21
.github/workflows/doc-validator.yml
vendored
@@ -1,18 +1,13 @@
|
||||
name: "doc-validator"
|
||||
on:
|
||||
pull_request:
|
||||
paths: ["docs/sources/**"]
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
include:
|
||||
description: |
|
||||
Regular expression that matches paths to include in linting.
|
||||
|
||||
For example: docs/sources/(?:alerting|fundamentals)/.+\.md
|
||||
required: true
|
||||
jobs:
|
||||
doc-validator:
|
||||
runs-on: "ubuntu-latest"
|
||||
container:
|
||||
image: "grafana/doc-validator:v5.2.0"
|
||||
image: "grafana/doc-validator:v5.0.0"
|
||||
steps:
|
||||
- name: "Checkout code"
|
||||
uses: "actions/checkout@v4"
|
||||
@@ -20,7 +15,15 @@ jobs:
|
||||
# Only run doc-validator on specific directories.
|
||||
run: >
|
||||
doc-validator
|
||||
'--include=${{ inputs.include }}'
|
||||
'--include=^docs/sources/(?:alerting|fundamentals|getting-started|introduction|setup-grafana|upgrade-guide|whatsnew/whats-new-in-v(?:9|10))/.+\.md$'
|
||||
'--skip-checks=^(?:image.+|canonical-does-not-match-pretty-URL)$'
|
||||
./docs/sources
|
||||
/docs/grafana/latest
|
||||
| reviewdog
|
||||
-f=rdjsonl
|
||||
--fail-on-error
|
||||
--filter-mode=nofilter
|
||||
--name=doc-validator
|
||||
--reporter=github-pr-review
|
||||
env:
|
||||
REVIEWDOG_GITHUB_API_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
name: 'Ephemeral instances'
|
||||
name: 'Ephemeral instances: PR comment'
|
||||
on:
|
||||
issue_comment:
|
||||
types: [created]
|
||||
pull_request:
|
||||
types: [closed]
|
||||
jobs:
|
||||
config:
|
||||
runs-on: "ubuntu-latest"
|
||||
if: github.event.sender.type == 'User' &&
|
||||
github.event.issue.pull_request &&
|
||||
startsWith(github.event.comment.body, '/deploy-to-hg')
|
||||
runs-on:
|
||||
labels: ubuntu-latest-8-cores
|
||||
outputs:
|
||||
has-secrets: ${{ steps.check.outputs.has-secrets }}
|
||||
steps:
|
||||
@@ -28,7 +30,9 @@ jobs:
|
||||
handle-pull-request-event:
|
||||
needs: config
|
||||
if: needs.config.outputs.has-secrets &&
|
||||
${{ github.event.issue.pull_request && (startsWith(github.event.comment.body, '/deploy-to-hg') || github.event.action == 'closed') }}
|
||||
github.event.sender.type == 'User' &&
|
||||
github.event.issue.pull_request &&
|
||||
startsWith(github.event.comment.body, '/deploy-to-hg')
|
||||
runs-on:
|
||||
labels: ubuntu-latest-8-cores
|
||||
continue-on-error: true
|
||||
@@ -48,14 +52,34 @@ jobs:
|
||||
ref: main
|
||||
path: ephemeral
|
||||
|
||||
- name: build and deploy ephemeral instance
|
||||
uses: ./ephemeral
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
github-token: ${{ steps.generate_token.outputs.token }}
|
||||
gcom-host: ${{ secrets.EI_GCOM_HOST }}
|
||||
gcom-token: ${{ secrets.EI_GCOM_TOKEN }}
|
||||
registry: "${{ secrets.EI_EPHEMERAL_INSTANCES_REGISTRY }}"
|
||||
gcp-service-account-key: "${{ secrets.EI_GCP_SERVICE_ACCOUNT_KEY_BASE64 }}"
|
||||
ephemeral-org-id: "${{ secrets.EI_EPHEMERAL_ORG_ID }}"
|
||||
oss-or-enterprise: oss
|
||||
verbose: true
|
||||
go-version-file: ephemeral/go.mod
|
||||
|
||||
- name: Get latest grafana version number
|
||||
run: |
|
||||
# if package.json contains e.g. 11.0.0-pre, this writes 11.0.0 to version.txt
|
||||
curl https://raw.githubusercontent.com/grafana/grafana/main/package.json | jq -r .version | grep -o '^[0-9\.]*' > version.txt
|
||||
|
||||
- name: Run action
|
||||
env:
|
||||
GITHUB_EVENT: ${{ toJson(github.event)}}
|
||||
run: |
|
||||
# Create a prerelease version number using the latest version from the package.json in the grafana repo.
|
||||
export GRAFANA_VERSION="$(cat version.txt)"
|
||||
echo "${GRAFANA_VERSION}"
|
||||
|
||||
cd $GITHUB_WORKSPACE/ephemeral/src
|
||||
go run . \
|
||||
-GITHUB_TOKEN="${{ steps.generate_token.outputs.token }}" \
|
||||
-GITHUB_WORKFLOW_RUN_ID="${{ github.run_id }}" \
|
||||
-GITHUB_EVENT="$GITHUB_EVENT" \
|
||||
-GITHUB_TRIGGERING_ACTOR="${{ github.triggering_actor }}" \
|
||||
-GCOM_HOST="${{ secrets.EI_GCOM_HOST }}" \
|
||||
-GCOM_TOKEN="${{ secrets.EI_GCOM_TOKEN }}" \
|
||||
-HOSTED_GRAFANA_IMAGE_TAG="$GRAFANA_VERSION-ephemeral-oss-${{ github.event.issue.number}}-${{ github.run_number }}-${{ github.run_attempt }}" \
|
||||
-REGISTRY="${{ secrets.EI_EPHEMERAL_INSTANCES_REGISTRY }}" \
|
||||
-GRAFANA_VERSION="$GRAFANA_VERSION" \
|
||||
-GCP_SERVICE_ACCOUNT_KEY_BASE64="${{ secrets.EI_GCP_SERVICE_ACCOUNT_KEY_BASE64 }}" \
|
||||
-EPHEMERAL_ORG_ID="${{ secrets.EI_EPHEMERAL_ORG_ID }}" || true
|
||||
|
||||
77
.github/workflows/ephemeral-instances-pr-opened-closed.yml
vendored
Normal file
77
.github/workflows/ephemeral-instances-pr-opened-closed.yml
vendored
Normal file
@@ -0,0 +1,77 @@
|
||||
name: 'Ephemeral instances: PR opened/closed'
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, reopened, closed]
|
||||
jobs:
|
||||
config:
|
||||
runs-on: "ubuntu-latest"
|
||||
outputs:
|
||||
has-secrets: ${{ steps.check.outputs.has-secrets }}
|
||||
steps:
|
||||
- name: "Check for secrets"
|
||||
id: check
|
||||
shell: bash
|
||||
run: |
|
||||
if [ -n "${{ (secrets.EI_APP_ID != '' &&
|
||||
secrets.EI_APP_PRIVATE_KEY != '' &&
|
||||
secrets.EI_GCOM_HOST != '' &&
|
||||
secrets.EI_GCOM_TOKEN != '' &&
|
||||
secrets.EI_EPHEMERAL_INSTANCES_REGISTRY != '' &&
|
||||
secrets.EI_GCP_SERVICE_ACCOUNT_KEY_BASE64 != '' &&
|
||||
secrets.EI_EPHEMERAL_ORG_ID != ''
|
||||
) || '' }}" ]; then
|
||||
echo "has-secrets=1" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
|
||||
handle-pull-request-event:
|
||||
needs: config
|
||||
if: needs.config.outputs.has-secrets
|
||||
runs-on: ubuntu-latest
|
||||
continue-on-error: true
|
||||
steps:
|
||||
- name: Generate a GitHub app installation token
|
||||
id: generate_token
|
||||
uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92
|
||||
with:
|
||||
app_id: ${{ secrets.EI_APP_ID }}
|
||||
private_key: ${{ secrets.EI_APP_PRIVATE_KEY }}
|
||||
|
||||
- name: Checkout ephemeral instances repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: grafana/ephemeral-grafana-instances-github-action
|
||||
token: ${{ steps.generate_token.outputs.token }}
|
||||
ref: main
|
||||
path: ephemeral
|
||||
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version-file: ephemeral/go.mod
|
||||
|
||||
- name: Get latest grafana version number
|
||||
run: |
|
||||
# if package.json contains e.g. 11.0.0-pre, this writes 11.0.0 to version.txt
|
||||
curl https://raw.githubusercontent.com/grafana/grafana/main/package.json | jq -r .version | grep -o '^[0-9\.]*' > version.txt
|
||||
|
||||
- name: Run action
|
||||
env:
|
||||
GITHUB_EVENT: ${{ toJson(github.event)}}
|
||||
run: |
|
||||
# Create a prerelease version number using the latest version from the package.json in the grafana repo.
|
||||
export GRAFANA_VERSION="$(cat version.txt)"
|
||||
echo "${GRAFANA_VERSION}"
|
||||
|
||||
cd $GITHUB_WORKSPACE/ephemeral/src
|
||||
go run . \
|
||||
-GITHUB_TOKEN="${{ steps.generate_token.outputs.token }}" \
|
||||
-GITHUB_WORKFLOW_RUN_ID="${{ github.run_id }}" \
|
||||
-GITHUB_EVENT="$GITHUB_EVENT" \
|
||||
-GITHUB_TRIGGERING_ACTOR="${{ github.triggering_actor }}" \
|
||||
-GCOM_HOST="${{ secrets.EI_GCOM_HOST }}" \
|
||||
-GCOM_TOKEN="${{ secrets.EI_GCOM_TOKEN }}" \
|
||||
-HOSTED_GRAFANA_IMAGE_TAG="unused" \
|
||||
-REGISTRY="${{ secrets.EI_EPHEMERAL_INSTANCES_REGISTRY }}" \
|
||||
-GRAFANA_VERSION="$GRAFANA_VERSION" \
|
||||
-GCP_SERVICE_ACCOUNT_KEY_BASE64="${{ secrets.EI_GCP_SERVICE_ACCOUNT_KEY_BASE64 }}" \
|
||||
-EPHEMERAL_ORG_ID="${{ secrets.EI_EPHEMERAL_ORG_ID }}" || true
|
||||
3
.github/workflows/github-release.yml
vendored
3
.github/workflows/github-release.yml
vendored
@@ -8,7 +8,7 @@ on:
|
||||
type: string
|
||||
latest:
|
||||
required: false
|
||||
default: "0"
|
||||
default: false
|
||||
description: Mark this release as latest (`1`) or not (`0`, default)
|
||||
type: string
|
||||
dry_run:
|
||||
@@ -23,7 +23,6 @@ on:
|
||||
type: string
|
||||
latest:
|
||||
required: false
|
||||
default: "0"
|
||||
description: Mark this release as latest (`1`) or not (`0`, default)
|
||||
type: string
|
||||
dry_run:
|
||||
|
||||
@@ -3,7 +3,7 @@ on:
|
||||
push:
|
||||
paths:
|
||||
- pkg/**
|
||||
- .github/workflows/go-lint.yml
|
||||
- .github/workflows/go_lint.yml
|
||||
- go.*
|
||||
branches:
|
||||
- main
|
||||
@@ -20,11 +20,14 @@ jobs:
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version-file: ./go.mod
|
||||
- run: CODEGEN_VERIFY=1 make gen-cue
|
||||
- run: make gen-go
|
||||
- name: golangci-lint
|
||||
uses: golangci/golangci-lint-action@v6
|
||||
uses: golangci/golangci-lint-action@v5
|
||||
with:
|
||||
version: v1.64.2
|
||||
version: v1.59.0
|
||||
args: |
|
||||
--verbose $(go list -m -f '{{.Dir}}' | xargs -I{} sh -c 'test ! -f {}/.nolint && echo {}/...')
|
||||
--config .golangci.toml --max-same-issues=0 --max-issues-per-linter=0 --verbose ./pkg/... ./pkg/apimachinery/... ./pkg/apiserver/... ./pkg/build/wire/... ./pkg/promlib/... ./pkg/util/xorm/...
|
||||
only-new-issues: true
|
||||
skip-cache: true
|
||||
install-mode: binary
|
||||
25
.github/workflows/i18n-crowdin-download.yml
vendored
25
.github/workflows/i18n-crowdin-download.yml
vendored
@@ -14,21 +14,13 @@ jobs:
|
||||
pull-requests: write # needed to update PR description, labels, etc
|
||||
|
||||
steps:
|
||||
- name: Generate token
|
||||
id: generate_token
|
||||
uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92
|
||||
with:
|
||||
app_id: ${{ secrets.GRAFANA_PR_AUTOMATION_APP_ID }}
|
||||
private_key: ${{ secrets.GRAFANA_PR_AUTOMATION_APP_PEM }}
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ github.head_ref }}
|
||||
token: ${{ steps.generate_token.outputs.token }}
|
||||
|
||||
- name: Download sources
|
||||
id: crowdin-download
|
||||
uses: crowdin/github-action@v2
|
||||
uses: crowdin/github-action@v1
|
||||
with:
|
||||
upload_sources: false
|
||||
upload_translations: false
|
||||
@@ -61,10 +53,18 @@ jobs:
|
||||
github_user_name: "github-actions[bot]"
|
||||
github_user_email: "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
|
||||
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
|
||||
|
||||
- name: Generate token
|
||||
if: steps.crowdin-download.outputs.pull_request_url
|
||||
id: generate_token
|
||||
uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92
|
||||
with:
|
||||
app_id: ${{ secrets.GRAFANA_PR_AUTOMATION_APP_ID }}
|
||||
private_key: ${{ secrets.GRAFANA_PR_AUTOMATION_APP_PEM }}
|
||||
|
||||
- name: Get pull request ID
|
||||
if: steps.crowdin-download.outputs.pull_request_url
|
||||
shell: bash
|
||||
@@ -74,7 +74,7 @@ jobs:
|
||||
pr_id=$(gh pr view ${{ steps.crowdin-download.outputs.pull_request_url }} --json id -q .id)
|
||||
echo "PULL_REQUEST_ID=$pr_id" >> "$GITHUB_ENV"
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Get project board ID
|
||||
uses: octokit/graphql-action@v2.x
|
||||
@@ -110,6 +110,7 @@ jobs:
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
|
||||
|
||||
@@ -118,4 +119,4 @@ jobs:
|
||||
if: steps.crowdin-download.outputs.pull_request_url
|
||||
with:
|
||||
pr: ${{ steps.crowdin-download.outputs.pull_request_number }}
|
||||
token: ${{ steps.generate_token.outputs.token }}
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
2
.github/workflows/i18n-crowdin-upload.yml
vendored
2
.github/workflows/i18n-crowdin-upload.yml
vendored
@@ -17,7 +17,7 @@ jobs:
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Upload sources
|
||||
uses: crowdin/github-action@v2
|
||||
uses: crowdin/github-action@v1
|
||||
with:
|
||||
upload_sources: true
|
||||
upload_sources_args: '--dest=public/locales/en-US/grafana.json'
|
||||
|
||||
16
.github/workflows/issue-labeled.yml
vendored
16
.github/workflows/issue-labeled.yml
vendored
@@ -49,8 +49,8 @@ jobs:
|
||||
fi
|
||||
|
||||
# set environment for next steps
|
||||
echo "CHANNEL=${CHANNEL}" >> "$GITHUB_ENV"
|
||||
echo "TEAM=${TEAM}" >> "$GITHUB_ENV"
|
||||
echo "CHANNEL=${CHANNEL}" >> $GITHUB_ENV
|
||||
echo "TEAM=${TEAM}" >> $GITHUB_ENV
|
||||
|
||||
- name: "Prepare payload"
|
||||
uses: frabert/replace-string-action@v2.5
|
||||
@@ -64,22 +64,22 @@ jobs:
|
||||
|
||||
- name: Get Token
|
||||
id: get_workflow_token
|
||||
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a
|
||||
uses: peter-murray/workflow-application-token-action@v3
|
||||
with:
|
||||
app_id: ${{ secrets.APP_GRAFANA_TEAM_CHECKER_ID }}
|
||||
private_key: ${{ secrets.APP_GRAFANA_TEAM_CHECKER_KEY }}
|
||||
application_id: ${{ secrets.APP_GRAFANA_TEAM_CHECKER_ID }}
|
||||
application_private_key: ${{ secrets.APP_GRAFANA_TEAM_CHECKER_KEY }}
|
||||
|
||||
- name: "Check that issue author is not part of the team"
|
||||
if: ${{ env.TEAM != 'null' }}
|
||||
run: |
|
||||
response=$(gh api /orgs/grafana/teams/${{ env.TEAM }}/memberships/${{ github.event.issue.user.login }} -i -H "Accept: application/vnd.github.v3+json")
|
||||
STATUS_CODE=$(echo "$response" | head -n 1 | cut -d' ' -f2)
|
||||
if [ "$STATUS_CODE" -eq "404" ]; then
|
||||
if [ "$status_code" -eq 404 ]; then
|
||||
echo "The user was not found in the team."
|
||||
echo "USER_FOUND=false" >> "$GITHUB_ENV"
|
||||
echo "USER_FOUND=false" >> $GITHUB_ENV
|
||||
else
|
||||
echo "The user was potentially found in the team"
|
||||
echo "USER_FOUND=maybe" >> "$GITHUB_ENV"
|
||||
echo "USER_FOUND=maybe" >> $GITHUB_ENV
|
||||
fi
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ steps.get_workflow_token.outputs.token }}
|
||||
|
||||
94
.github/workflows/issue-opened.yml
vendored
94
.github/workflows/issue-opened.yml
vendored
@@ -1,120 +1,28 @@
|
||||
name: Run commands when issues are opened
|
||||
|
||||
# important: this workflow uses a github app that is strictly limited
|
||||
# to issues. If you want to change the triggers for this workflow,
|
||||
# please review if the permissions are still sufficient.
|
||||
on:
|
||||
issues:
|
||||
types: [opened]
|
||||
|
||||
concurrency:
|
||||
group: issue-opened-${{ github.event.issue.number }}
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
id-token: write
|
||||
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'grafana/grafana'
|
||||
steps:
|
||||
|
||||
- name: Checkout Actions
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: "grafana/grafana-github-actions"
|
||||
path: ./actions
|
||||
ref: main
|
||||
|
||||
- name: Install Actions
|
||||
run: npm install --production --prefix ./actions
|
||||
|
||||
# give issue-openers a chance to add labels after submit
|
||||
- name: Sleep for 2 minutes
|
||||
run: sleep 2m
|
||||
shell: bash
|
||||
|
||||
- name: "Get vault secrets"
|
||||
id: vault-secrets
|
||||
uses: grafana/shared-workflows/actions/get-vault-secrets@main
|
||||
with:
|
||||
# Secrets placed in the ci/repo/grafana/grafana/plugins_platform_issue_commands_github_bot path in Vault
|
||||
repo_secrets: |
|
||||
GH_APP_ID=plugins_platform_issue_commands_github_bot:app_id
|
||||
GH_APP_PEM=plugins_platform_issue_commands_github_bot:app_pem
|
||||
|
||||
- name: "Generate token"
|
||||
id: generate_token
|
||||
uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92
|
||||
with:
|
||||
app_id: ${{ env.GH_APP_ID }}
|
||||
private_key: ${{ env.GH_APP_PEM }}
|
||||
|
||||
- name: Run Commands
|
||||
uses: ./actions/commands
|
||||
with:
|
||||
metricsWriteAPIKey: ${{secrets.GRAFANA_MISC_STATS_API_KEY}}
|
||||
token: ${{ steps.generate_token.outputs.token }}
|
||||
token: ${{secrets.ISSUE_COMMANDS_TOKEN}}
|
||||
configPath: "issue-opened"
|
||||
|
||||
auto-triage:
|
||||
needs: [main]
|
||||
if: github.repository == 'grafana/grafana' && github.event.issue.author_association != 'MEMBER' && github.event.issue.author_association != 'OWNER'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- name: "Get vault secrets"
|
||||
id: vault-secrets
|
||||
uses: grafana/shared-workflows/actions/get-vault-secrets@main
|
||||
with:
|
||||
# Secrets placed in the ci/repo/grafana/grafana/plugins_platform_issue_triager path in Vault
|
||||
repo_secrets: |
|
||||
AUTOTRIAGER_OPENAI_API_KEY=plugins_platform_issue_triager:AUTOTRIAGER_OPENAI_API_KEY
|
||||
AUTOTRIAGER_SLACK_WEBHOOK_URL=plugins_platform_issue_triager:AUTOTRIAGER_SLACK_WEBHOOK_URL
|
||||
GH_APP_ID=plugins_platform_issue_commands_github_bot:app_id
|
||||
GH_APP_PEM=plugins_platform_issue_commands_github_bot:app_pem
|
||||
|
||||
- name: "Generate token"
|
||||
id: generate_token
|
||||
uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92
|
||||
with:
|
||||
app_id: ${{ env.GH_APP_ID }}
|
||||
private_key: ${{ env.GH_APP_PEM }}
|
||||
|
||||
- name: Checkout auto-triager repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: grafana/auto-triager
|
||||
path: auto-triager
|
||||
token: ${{ steps.generate_token.outputs.token }}
|
||||
|
||||
- name: Send issue to the auto triager action
|
||||
id: auto_triage
|
||||
# https://github.com/grafana/auto-triager/blob/main/action.yml
|
||||
#uses: grafana/auto-triager@main
|
||||
uses: ./auto-triager
|
||||
with:
|
||||
token: ${{ steps.generate_token.outputs.token }}
|
||||
issue_number: ${{ github.event.issue.number }}
|
||||
openai_api_key: ${{ env.AUTOTRIAGER_OPENAI_API_KEY }}
|
||||
add_labels: true
|
||||
|
||||
- name: Labels from auto triage
|
||||
run: |
|
||||
echo ${{ steps.auto_triage.outputs.triage_labels }}
|
||||
|
||||
- name: "Send Slack notification"
|
||||
if: ${{ steps.auto_triage.outputs.triage_labels != '' }}
|
||||
uses: slackapi/slack-github-action@v1.27.0
|
||||
with:
|
||||
payload: >
|
||||
{
|
||||
"icon_emoji": ":robocto:",
|
||||
"username": "Auto Triager",
|
||||
"type": "mrkdwn",
|
||||
"text": "Auto triager found the following labels: ${{ steps.auto_triage.outputs.triage_labels }} for issue ${{ github.event.issue.html_url }}",
|
||||
"channel": "#triage-automation-ci"
|
||||
}
|
||||
env:
|
||||
SLACK_WEBHOOK_URL: ${{ env.AUTOTRIAGER_SLACK_WEBHOOK_URL }}
|
||||
|
||||
60
.github/workflows/migrate-prs.yml
vendored
60
.github/workflows/migrate-prs.yml
vendored
@@ -1,60 +0,0 @@
|
||||
name: Migrate open PRs
|
||||
# Migrate open PRs from a superseded release branch to the current release branch and notify authors
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
from:
|
||||
description: 'The base branch to check for open PRs'
|
||||
required: true
|
||||
type: string
|
||||
to:
|
||||
description: 'The base branch to migrate open PRs to'
|
||||
required: true
|
||||
type: string
|
||||
ownerRepo:
|
||||
description: Owner/repo of the repository where the branch is created (e.g. 'grafana/grafana')
|
||||
required: true
|
||||
type: string
|
||||
secrets:
|
||||
GRAFANA_DELIVERY_BOT_APP_ID:
|
||||
required: true
|
||||
GRAFANA_DELIVERY_BOT_APP_PEM:
|
||||
required: true
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
from:
|
||||
description: 'The base branch to check for open PRs'
|
||||
required: true
|
||||
type: string
|
||||
to:
|
||||
description: 'The base branch to migrate open PRs to'
|
||||
required: true
|
||||
type: string
|
||||
ownerRepo:
|
||||
description: Owner/repo of the repository where the branch is created (e.g. 'grafana/grafana')
|
||||
required: true
|
||||
type: string
|
||||
secrets:
|
||||
GRAFANA_DELIVERY_BOT_APP_ID:
|
||||
required: true
|
||||
GRAFANA_DELIVERY_BOT_APP_PEM:
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: "Generate token"
|
||||
id: generate_token
|
||||
uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92
|
||||
with:
|
||||
app_id: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_ID }}
|
||||
private_key: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_PEM }}
|
||||
- name: Migrate PRs
|
||||
uses: grafana/grafana-github-actions-go/migrate-open-prs@main
|
||||
with:
|
||||
token: ${{ steps.generate_token.outputs.token }}
|
||||
ownerRepo: ${{ inputs.ownerRepo }}
|
||||
from: ${{ inputs.from }}
|
||||
to: ${{ inputs.to }}
|
||||
binary_release_tag: 'dev'
|
||||
26
.github/workflows/pr-go-workspace-check.yml
vendored
26
.github/workflows/pr-go-workspace-check.yml
vendored
@@ -4,6 +4,11 @@ on:
|
||||
workflow_dispatch:
|
||||
pull_request:
|
||||
branches: [main]
|
||||
paths:
|
||||
- '**/go.work'
|
||||
- '**/go.work.sum'
|
||||
- '**/go.mod'
|
||||
- '**/go.sum'
|
||||
|
||||
jobs:
|
||||
check:
|
||||
@@ -19,17 +24,28 @@ jobs:
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
|
||||
- name: Update workspace
|
||||
run: make update-workspace
|
||||
- name: Workspace Sync
|
||||
run: go work sync
|
||||
|
||||
- name: Check for go mod & workspace changes
|
||||
run: |
|
||||
if ! git diff --exit-code --quiet; then
|
||||
echo "Changes detected:"
|
||||
git diff
|
||||
echo "Please run 'make update-workspace' and commit the changes."
|
||||
echo "Please run 'go work sync' and commit the changes."
|
||||
echo "If there is a change in enterprise dependencies, please update pkg/extensions/main.go."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Build
|
||||
run: make build-go
|
||||
|
||||
- name: Check for go workspace changes
|
||||
run: |
|
||||
if ! git diff --exit-code --quiet; then
|
||||
echo "Changes detected:"
|
||||
git diff
|
||||
echo "Please run 'make build-go' and commit the changes."
|
||||
echo "If there is a change in enterprise dependencies, please update pkg/extensions/main.go."
|
||||
exit 1
|
||||
fi
|
||||
- name: Ensure Dockerfile contains submodule COPY commands
|
||||
run: ./scripts/go-workspace/validate-dockerfile.sh
|
||||
38
.github/workflows/pr-k8s-codegen-check.yml
vendored
38
.github/workflows/pr-k8s-codegen-check.yml
vendored
@@ -1,38 +0,0 @@
|
||||
name: "K8s Codegen Check"
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
pull_request:
|
||||
branches: [main]
|
||||
paths:
|
||||
- "pkg/apis/**"
|
||||
- "pkg/aggregator/apis/**"
|
||||
- "pkg/apimachinery/apis/**"
|
||||
- "hack/**"
|
||||
- "*.sum"
|
||||
|
||||
jobs:
|
||||
check:
|
||||
name: K8s Codegen Check
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set go version
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
|
||||
- name: Update k8s codegen
|
||||
run: ./hack/update-codegen.sh
|
||||
|
||||
- name: Check for k8s codegen changes
|
||||
run: |
|
||||
if ! git diff --exit-code --quiet; then
|
||||
echo "Changes detected:"
|
||||
git diff
|
||||
echo "Please run './hack/update-codegen.sh' and commit the changes."
|
||||
exit 1
|
||||
fi
|
||||
@@ -1,21 +1,38 @@
|
||||
name: publish-technical-documentation-next
|
||||
name: "publish-technical-documentation-next"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- "main"
|
||||
paths:
|
||||
- "docs/sources/**"
|
||||
workflow_dispatch:
|
||||
jobs:
|
||||
sync:
|
||||
if: github.repository == 'grafana/grafana'
|
||||
permissions:
|
||||
contents: read
|
||||
id-token: write
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: "ubuntu-latest"
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: grafana/writers-toolkit/publish-technical-documentation@publish-technical-documentation/v1
|
||||
- name: "Checkout Grafana repo"
|
||||
uses: "actions/checkout@v4"
|
||||
|
||||
- name: "Clone website-sync Action"
|
||||
# WEBSITE_SYNC_TOKEN is a fine-grained GitHub Personal Access Token that expires.
|
||||
# It must be regenerated in the grafanabot GitHub account and requires a Grafana organization
|
||||
# GitHub administrator to update the organization secret.
|
||||
# The IT helpdesk can update the organization secret.
|
||||
run: "git clone --single-branch --no-tags --depth 1 -b master https://grafanabot:${{ secrets.WEBSITE_SYNC_TOKEN }}@github.com/grafana/website-sync ./.github/actions/website-sync"
|
||||
|
||||
- name: "Publish to website repository (next)"
|
||||
uses: "./.github/actions/website-sync"
|
||||
id: "publish-next"
|
||||
with:
|
||||
website_directory: content/docs/grafana/next
|
||||
repository: "grafana/website"
|
||||
branch: "master"
|
||||
host: "github.com"
|
||||
# PUBLISH_TO_WEBSITE_TOKEN is a fine-grained GitHub Personal Access Token that expires.
|
||||
# It must be regenerated in the grafanabot GitHub account and requires a Grafana organization
|
||||
# GitHub administrator to update the organization secret.
|
||||
# The IT helpdesk can update the organization secret.
|
||||
github_pat: "grafanabot:${{ secrets.PUBLISH_TO_WEBSITE_TOKEN }}"
|
||||
source_folder: "docs/sources"
|
||||
target_folder: "content/docs/grafana/next"
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
name: publish-technical-documentation-release
|
||||
name: "publish-technical-documentation-release"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- release-[0-9]+.[0-9]+.[0-9]+
|
||||
- v[0-9]+.[0-9]+.x
|
||||
tags:
|
||||
- v[0-9]+.[0-9]+.[0-9]+
|
||||
paths:
|
||||
@@ -12,18 +12,63 @@ on:
|
||||
jobs:
|
||||
sync:
|
||||
if: github.repository == 'grafana/grafana'
|
||||
permissions:
|
||||
contents: read
|
||||
id-token: write
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: "ubuntu-latest"
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: "Checkout Grafana repo"
|
||||
uses: "actions/checkout@v4"
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: grafana/writers-toolkit/publish-technical-documentation-release@publish-technical-documentation-release/v2
|
||||
|
||||
- name: "Checkout Actions library"
|
||||
uses: "actions/checkout@v4"
|
||||
with:
|
||||
release_tag_regexp: "^v(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)$"
|
||||
release_branch_regexp: "^release-(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)$"
|
||||
release_branch_with_patch_regexp: "^release-(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)$"
|
||||
website_directory: content/docs/grafana
|
||||
version_suffix: ""
|
||||
repository: "grafana/grafana-github-actions"
|
||||
path: "./actions"
|
||||
|
||||
- name: "Install Actions from library"
|
||||
run: "npm install --production --prefix ./actions"
|
||||
|
||||
- name: "Determine if there is a matching release tag"
|
||||
id: "has-matching-release-tag"
|
||||
uses: "./actions/has-matching-release-tag"
|
||||
with:
|
||||
ref_name: "${{ github.ref_name }}"
|
||||
release_tag_regexp: "^v(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)$"
|
||||
release_branch_regexp: "^v(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.x$"
|
||||
|
||||
- name: "Determine technical documentation version"
|
||||
if: "steps.has-matching-release-tag.outputs.bool == 'true'"
|
||||
uses: "./actions/docs-target"
|
||||
id: "target"
|
||||
with:
|
||||
ref_name: "${{ github.ref_name }}"
|
||||
|
||||
- name: "Clone website-sync Action"
|
||||
if: "steps.has-matching-release-tag.outputs.bool == 'true'"
|
||||
# WEBSITE_SYNC_TOKEN is a fine-grained GitHub Personal Access Token that expires.
|
||||
# It must be regenerated in the grafanabot GitHub account and requires a Grafana organization
|
||||
# GitHub administrator to update the organization secret.
|
||||
# The IT helpdesk can update the organization secret.
|
||||
run: "git clone --single-branch --no-tags --depth 1 -b master https://grafanabot:${{ secrets.WEBSITE_SYNC_TOKEN }}@github.com/grafana/website-sync ./.github/actions/website-sync"
|
||||
|
||||
- name: "Switch to HEAD of version branch for tags"
|
||||
# Tags aren't necessarily made to the HEAD of the version branch.
|
||||
# The documentation to be published is always on the HEAD of the version branch.
|
||||
if: "steps.has-matching-release-tag.outputs.bool == 'true' && github.ref_type == 'tag'"
|
||||
run: "git switch --detach origin/${{ steps.target.outputs.target }}.x"
|
||||
|
||||
- name: "Publish to website repository (release)"
|
||||
if: "steps.has-matching-release-tag.outputs.bool == 'true'"
|
||||
uses: "./.github/actions/website-sync"
|
||||
id: "publish-release"
|
||||
with:
|
||||
repository: "grafana/website"
|
||||
branch: "master"
|
||||
host: "github.com"
|
||||
# PUBLISH_TO_WEBSITE_TOKEN is a fine-grained GitHub Personal Access Token that expires.
|
||||
# It must be regenerated in the grafanabot GitHub account and requires a Grafana organization
|
||||
# GitHub administrator to update the organization secret.
|
||||
# The IT helpdesk can update the organization secret.
|
||||
github_pat: "grafanabot:${{ secrets.PUBLISH_TO_WEBSITE_TOKEN }}"
|
||||
source_folder: "docs/sources"
|
||||
target_folder: "content/docs/grafana/${{ steps.target.outputs.target }}"
|
||||
|
||||
56
.github/workflows/release-comms.yml
vendored
56
.github/workflows/release-comms.yml
vendored
@@ -8,18 +8,17 @@ on:
|
||||
dry_run:
|
||||
required: false
|
||||
default: true
|
||||
type: boolean
|
||||
version:
|
||||
required: true
|
||||
latest:
|
||||
type: boolean
|
||||
type: bool
|
||||
default: false
|
||||
pull_request:
|
||||
types:
|
||||
- closed
|
||||
branches:
|
||||
- 'main'
|
||||
- 'release-*.*.*'
|
||||
- 'v*.*.*'
|
||||
|
||||
jobs:
|
||||
setup:
|
||||
@@ -27,77 +26,30 @@ jobs:
|
||||
name: Setup and establish latest
|
||||
outputs:
|
||||
version: ${{ steps.output.outputs.version }}
|
||||
release_branch: ${{ steps.output.outputs.release_branch }}
|
||||
dry_run: ${{ steps.output.outputs.dry_run }}
|
||||
latest: ${{ steps.output.outputs.latest }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# The github-release action expects a `LATEST` value of a string of either '1' or '0'
|
||||
- if: ${{ github.event_name == 'workflow_dispatch' }}
|
||||
run: |
|
||||
echo setting up GITHUB_ENV for ${{ github.event_name }}
|
||||
echo "VERSION=${{ inputs.version }}" >> $GITHUB_ENV
|
||||
echo "DRY_RUN=${{ inputs.dry_run }}" >> $GITHUB_ENV
|
||||
echo "LATEST=${{ inputs.latest && '1' || '0' }}" >> $GITHUB_ENV
|
||||
echo "LATEST=${{ inputs.latest }}" >> $GITHUB_ENV
|
||||
- if: ${{ github.event.pull_request.merged == true && startsWith(github.head_ref, 'release/') }}
|
||||
run: |
|
||||
echo "VERSION=$(echo ${{ github.head_ref }} | sed -e 's/release\/.*\///g')" >> $GITHUB_ENV
|
||||
echo "DRY_RUN=${{ contains(github.event.pull_request.labels.*.name, 'release/dry-run') }}" >> $GITHUB_ENV
|
||||
echo "LATEST=${{ contains(github.event.pull_request.labels.*.name, 'release/latest') && '1' || '0' }}" >> $GITHUB_ENV
|
||||
echo "LATEST=${{ contains(github.event.pull_request.labels.*.name, 'release/latest') }}" >> $GITHUB_ENV
|
||||
- id: output
|
||||
run: |
|
||||
echo "dry_run: $DRY_RUN"
|
||||
echo "latest: $LATEST"
|
||||
echo "version: $VERSION"
|
||||
|
||||
echo "release_branch=$(echo $VERSION | sed -s 's/^v/release-/g')" >> "$GITHUB_OUTPUT"
|
||||
echo "dry_run=$DRY_RUN" >> "$GITHUB_OUTPUT"
|
||||
echo "latest=$LATEST" >> "$GITHUB_OUTPUT"
|
||||
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
|
||||
create_next_release_branch_grafana:
|
||||
name: Create next release branch (Grafana)
|
||||
needs: setup
|
||||
uses: ./.github/workflows/create-next-release-branch.yml
|
||||
secrets:
|
||||
GRAFANA_DELIVERY_BOT_APP_ID: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_ID }}
|
||||
GRAFANA_DELIVERY_BOT_APP_PEM: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_PEM }}
|
||||
with:
|
||||
ownerRepo: 'grafana/grafana'
|
||||
source: ${{ needs.setup.outputs.release_branch }}
|
||||
create_next_release_branch_enterprise:
|
||||
name: Create next release branch (Grafana Enterprise)
|
||||
needs: setup
|
||||
uses: ./.github/workflows/create-next-release-branch.yml
|
||||
secrets:
|
||||
GRAFANA_DELIVERY_BOT_APP_ID: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_ID }}
|
||||
GRAFANA_DELIVERY_BOT_APP_PEM: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_PEM }}
|
||||
with:
|
||||
ownerRepo: 'grafana/grafana-enterprise'
|
||||
source: ${{ needs.setup.outputs.release_branch }}
|
||||
migrate_prs_grafana:
|
||||
needs:
|
||||
- setup
|
||||
- create_next_release_branch_grafana
|
||||
uses: ./.github/workflows/migrate-prs.yml
|
||||
secrets:
|
||||
GRAFANA_DELIVERY_BOT_APP_ID: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_ID }}
|
||||
GRAFANA_DELIVERY_BOT_APP_PEM: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_PEM }}
|
||||
with:
|
||||
ownerRepo: 'grafana/grafana'
|
||||
from: ${{ needs.setup.outputs.release_branch }}
|
||||
to: ${{ needs.create_next_release_branch_grafana.outputs.branch }}
|
||||
migrate_prs_enterprise:
|
||||
needs:
|
||||
- setup
|
||||
- create_next_release_branch_enterprise
|
||||
uses: ./.github/workflows/migrate-prs.yml
|
||||
secrets:
|
||||
GRAFANA_DELIVERY_BOT_APP_ID: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_ID }}
|
||||
GRAFANA_DELIVERY_BOT_APP_PEM: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_PEM }}
|
||||
with:
|
||||
ownerRepo: 'grafana/grafana-enterprise'
|
||||
from: ${{ needs.setup.outputs.release_branch }}
|
||||
to: ${{ needs.create_next_release_branch_enterprise.outputs.branch }}
|
||||
post_changelog_on_forum:
|
||||
needs: setup
|
||||
uses: ./.github/workflows/community-release.yml
|
||||
|
||||
23
.github/workflows/release-pr.yml
vendored
23
.github/workflows/release-pr.yml
vendored
@@ -4,14 +4,10 @@
|
||||
# Please refrain from including any processes that do not result in code changes in this workflow. Instead, they should
|
||||
# either be triggered in the release promotion process or in the release comms process (that is triggered by merging
|
||||
# this PR).
|
||||
name: Grafana Release PR
|
||||
name: Complete a Grafana release
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
previous_version:
|
||||
type: string
|
||||
required: false
|
||||
description: 'The release version (semver, git tag, branch or commit) to use for comparison'
|
||||
version:
|
||||
required: true
|
||||
type: string
|
||||
@@ -19,7 +15,7 @@ on:
|
||||
target:
|
||||
required: true
|
||||
type: string
|
||||
description: The release branch pattern (eg v9.5.x) that these changes are being merged into
|
||||
description: The base branch that these changes are being merged into
|
||||
backport:
|
||||
required: false
|
||||
type: string
|
||||
@@ -42,7 +38,6 @@ jobs:
|
||||
name: Create PR to main to update the changelog
|
||||
uses: ./.github/workflows/changelog.yml
|
||||
with:
|
||||
previous_version: ${{inputs.previous_version}}
|
||||
version: ${{ inputs.version }}
|
||||
latest: ${{ inputs.latest }}
|
||||
dry_run: ${{ inputs.dry_run }}
|
||||
@@ -61,17 +56,10 @@ jobs:
|
||||
with:
|
||||
app_id: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_ID }}
|
||||
private_key: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_PEM }}
|
||||
- name: Get release branch
|
||||
id: branch
|
||||
uses: grafana/grafana-github-actions-go/latest-release-branch@main
|
||||
with:
|
||||
token: ${{ steps.generate_token.outputs.token }}
|
||||
ownerRepo: 'grafana/grafana'
|
||||
pattern: ${{ inputs.target }}
|
||||
- name: Checkout Grafana
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ steps.branch.outputs.branch }}
|
||||
ref: ${{ inputs.target }}
|
||||
fetch-depth: 0
|
||||
fetch-tags: true
|
||||
- name: Checkout Grafana (main)
|
||||
@@ -131,6 +119,7 @@ jobs:
|
||||
rm -f CHANGELOG.part changelog_items.md
|
||||
|
||||
git diff CHANGELOG.md
|
||||
|
||||
- name: "Prettify CHANGELOG.md"
|
||||
run: npx prettier --write CHANGELOG.md
|
||||
- name: Commit CHANGELOG.md changes
|
||||
@@ -157,7 +146,7 @@ jobs:
|
||||
$( [ "x${{ inputs.latest }}" == "xtrue" ] && printf %s '-l "release/latest"') \
|
||||
-l "no-changelog" \
|
||||
--dry-run=${{ inputs.dry_run }} \
|
||||
-B "${{ steps.branch.outputs.branch }}" \
|
||||
-B "${{ inputs.target }}" \
|
||||
--title "Release: ${{ inputs.version }}" \
|
||||
--body "These code changes must be merged after a release is complete"
|
||||
env:
|
||||
@@ -171,7 +160,7 @@ jobs:
|
||||
-l "product-approved" \
|
||||
-l "no-changelog" \
|
||||
--dry-run=${{ inputs.dry_run }} \
|
||||
-B "${{ steps.branch.outputs.branch }}" \
|
||||
-B "${{ inputs.target }}" \
|
||||
--title "Release: ${{ inputs.version }}" \
|
||||
--body "These code changes must be merged after a release is complete"
|
||||
env:
|
||||
|
||||
47
.github/workflows/run-scenes-e2e.yml
vendored
Normal file
47
.github/workflows/run-scenes-e2e.yml
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
name: Run dashboard scenes e2e
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 8 * * 1-5" # every day at 08:00UTC on weekdays
|
||||
# push # uncomment for test run during PR
|
||||
|
||||
env:
|
||||
ARCH: linux-amd64
|
||||
|
||||
jobs:
|
||||
dashboard-scenes-e2e:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Pin Go version to mod file
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version-file: 'go.mod'
|
||||
- run: go version
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
- name: Install dependencies
|
||||
run: yarn install --immutable
|
||||
- name: Build grafana
|
||||
run: make build
|
||||
- name: Install Cypress dependencies
|
||||
uses: cypress-io/github-action@v6
|
||||
with:
|
||||
runTests: false
|
||||
- name: Run dashboard scenes e2e
|
||||
run: yarn e2e:scenes
|
||||
- name: "Send Slack notification"
|
||||
if: ${{ failure() }}
|
||||
uses: slackapi/slack-github-action@v1.26.0
|
||||
with:
|
||||
payload: >
|
||||
{
|
||||
"icon_emoji": ":this-is-fine-fire:",
|
||||
"username": "Dashboard scenes e2e tests failed",
|
||||
"text": "Link to run: https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}",
|
||||
"channel": "#grafana-dashboards-squad"
|
||||
}
|
||||
env:
|
||||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
|
||||
14
.github/workflows/snyk.yml
vendored
Normal file
14
.github/workflows/snyk.yml
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
name: Snyk Monitor Scanning
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
push:
|
||||
branches:
|
||||
- 'main'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
snyk-scan-ci:
|
||||
uses: 'grafana/security-github-actions/.github/workflows/snyk_monitor.yml@main'
|
||||
secrets:
|
||||
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
|
||||
54
.github/workflows/trivy-scan.yml
vendored
54
.github/workflows/trivy-scan.yml
vendored
@@ -1,54 +0,0 @@
|
||||
name: Trivy Scan
|
||||
on:
|
||||
pull_request:
|
||||
# only run on PRs where go.mod/go.sum/etc have been updated
|
||||
paths:
|
||||
- go.*
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- go.*
|
||||
|
||||
jobs:
|
||||
trivy-scan:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Run Trivy vulnerability scanner (table output)
|
||||
uses: aquasecurity/trivy-action@0.24.0
|
||||
with:
|
||||
# scan the filesystem, rather than building a Docker image prior - the
|
||||
# downside is we won't catch dependencies that are only installed in the
|
||||
# image, but the upside is we'll only catch vulnerabilities that are
|
||||
# explicitly in the our dependencies
|
||||
scan-type: 'fs'
|
||||
scanners: 'vuln'
|
||||
format: 'table'
|
||||
exit-code: 1
|
||||
ignore-unfixed: true
|
||||
vuln-type: 'os,library'
|
||||
severity: 'CRITICAL,HIGH'
|
||||
trivyignores: .trivyignore
|
||||
# for the PR check, ignore JS-related issues
|
||||
skip-files: 'yarn.lock,package.json'
|
||||
- name: Run Trivy vulnerability scanner (SARIF)
|
||||
uses: aquasecurity/trivy-action@0.24.0
|
||||
with:
|
||||
scan-type: 'fs'
|
||||
scanners: 'vuln'
|
||||
# Note: The SARIF format ignores severity and uploads all vulns for
|
||||
# later triage. The table-format step above is used to fail the build
|
||||
# if there are any critical or high vulnerabilities.
|
||||
# See https://github.com/aquasecurity/trivy-action/issues/95
|
||||
format: 'sarif'
|
||||
output: 'trivy-results.sarif'
|
||||
ignore-unfixed: true
|
||||
vuln-type: 'os,library'
|
||||
trivyignores: .trivyignore
|
||||
if: always() && github.repository == 'grafana/grafana'
|
||||
- name: Upload Trivy scan results to GitHub Security tab
|
||||
uses: github/codeql-action/upload-sarif@v3
|
||||
with:
|
||||
sarif_file: 'trivy-results.sarif'
|
||||
if: always() && github.repository == 'grafana/grafana'
|
||||
4
.gitignore
vendored
4
.gitignore
vendored
@@ -87,7 +87,6 @@ example-apiserver/
|
||||
/devenv/docker/blocks/tempo/tempo-data/
|
||||
/devenv/docker/ha-test-unified-alerting/logs/webhook/dumps/
|
||||
/devenv/docker/ha-test-unified-alerting/logs/webhook/webhook-listener.log
|
||||
/devenv/docker/blocks/auth/openldap/certs/
|
||||
|
||||
conf/custom.ini
|
||||
|
||||
@@ -220,6 +219,3 @@ public/app/plugins/**/dist/
|
||||
|
||||
# Locally enabling the Go race detector until we can globally do so
|
||||
.go-race-enabled-locally
|
||||
|
||||
# Mock service worker used for fake API responses in frontend development
|
||||
public/mockServiceWorker.js
|
||||
|
||||
266
.golangci.toml
Normal file
266
.golangci.toml
Normal file
@@ -0,0 +1,266 @@
|
||||
[run]
|
||||
timeout = "10m"
|
||||
concurrency = 10
|
||||
|
||||
[linters-settings.exhaustive]
|
||||
default-signifies-exhaustive = true
|
||||
|
||||
[linters-settings.revive]
|
||||
ignore-generated-header = false
|
||||
severity = "warning"
|
||||
confidence = 3
|
||||
|
||||
[linters-settings.depguard.rules.main]
|
||||
allow = [] # allow all
|
||||
deny = [
|
||||
{ pkg = "io/ioutil", desc = "Deprecated: As of Go 1.16, the same functionality is now provided by package io or package os, and those implementations should be preferred in new code. See the specific function documentation for details." },
|
||||
{ pkg = "gopkg.in/yaml.v2", desc = "Grafana packages are not allowed to depend on gopkg.in/yaml.v2 as gopkg.in/yaml.v3 is now available" },
|
||||
{ pkg = "github.com/pkg/errors", desc = "Deprecated: Go 1.13 supports the functionality provided by pkg/errors in the standard library." },
|
||||
{ pkg = "github.com/xorcare/pointer", desc = "Use pkg/util.Pointer instead, which is a generic one-liner alternative" },
|
||||
{ pkg = "github.com/gofrs/uuid", desc = "Use github.com/google/uuid instead, which we already depend on." },
|
||||
{ pkg = "github.com/bmizerany/assert", desc = "Use github.com/stretchr/testify/assert instead, which we already depend on." },
|
||||
]
|
||||
|
||||
[linters-settings.depguard.rules.coreplugins]
|
||||
deny = [
|
||||
{ pkg = "github.com/grafana/grafana/pkg/api", desc = "Core plugins are not allowed to depend on Grafana core packages" },
|
||||
{ pkg = "github.com/grafana/grafana/pkg/cmd", desc = "Core plugins are not allowed to depend on Grafana core packages" },
|
||||
{ pkg = "github.com/grafana/grafana/pkg/cuectx", desc = "Core plugins are not allowed to depend on Grafana core packages" },
|
||||
{ pkg = "github.com/grafana/grafana/pkg/extensions", desc = "Core plugins are not allowed to depend on Grafana core packages" },
|
||||
{ pkg = "github.com/grafana/grafana/pkg/kinds", desc = "Core plugins are not allowed to depend on Grafana core packages" },
|
||||
{ pkg = "github.com/grafana/grafana/pkg/middleware", desc = "Core plugins are not allowed to depend on Grafana core packages" },
|
||||
{ pkg = "github.com/grafana/grafana/pkg/modules", desc = "Core plugins are not allowed to depend on Grafana core packages" },
|
||||
{ pkg = "github.com/grafana/grafana/pkg/registry", desc = "Core plugins are not allowed to depend on Grafana core packages" },
|
||||
{ pkg = "github.com/grafana/grafana/pkg/services", desc = "Core plugins are not allowed to depend on Grafana core packages" },
|
||||
{ pkg = "github.com/grafana/grafana/pkg/build", desc = "Core plugins are not allowed to depend on Grafana core packages" },
|
||||
{ pkg = "github.com/grafana/grafana/pkg/codegen", desc = "Core plugins are not allowed to depend on Grafana core packages" },
|
||||
{ pkg = "github.com/grafana/grafana/pkg/events", desc = "Core plugins are not allowed to depend on Grafana core packages" },
|
||||
{ pkg = "github.com/grafana/grafana/pkg/ifaces", desc = "Core plugins are not allowed to depend on Grafana core packages" },
|
||||
{ pkg = "github.com/grafana/grafana/pkg/kindsysreport", desc = "Core plugins are not allowed to depend on Grafana core packages" },
|
||||
{ pkg = "github.com/grafana/grafana/pkg/mocks", desc = "Core plugins are not allowed to depend on Grafana core packages" },
|
||||
{ pkg = "github.com/grafana/grafana/pkg/plugins", desc = "Core plugins are not allowed to depend on Grafana core packages" },
|
||||
{ pkg = "github.com/grafana/grafana/pkg/setting", desc = "Core plugins are not allowed to depend on Grafana core packages" },
|
||||
{ pkg = "github.com/grafana/grafana/pkg/util", desc = "Core plugins are not allowed to depend on Grafana core packages" },
|
||||
{ pkg = "github.com/grafana/grafana/pkg/bus", desc = "Core plugins are not allowed to depend on Grafana core packages" },
|
||||
{ pkg = "github.com/grafana/grafana/pkg/components", desc = "Core plugins are not allowed to depend on Grafana core packages" },
|
||||
{ pkg = "github.com/grafana/grafana/pkg/expr", desc = "Core plugins are not allowed to depend on Grafana core packages" },
|
||||
{ pkg = "github.com/grafana/grafana/pkg/infra", desc = "Core plugins are not allowed to depend on Grafana core packages" },
|
||||
{ pkg = "github.com/grafana/grafana/pkg/login", desc = "Core plugins are not allowed to depend on Grafana core packages" },
|
||||
{ pkg = "github.com/grafana/grafana/pkg/models", desc = "Core plugins are not allowed to depend on Grafana core packages" },
|
||||
{ pkg = "github.com/grafana/grafana/pkg/server", desc = "Core plugins are not allowed to depend on Grafana core packages" },
|
||||
{ pkg = "github.com/grafana/grafana/pkg/tests", desc = "Core plugins are not allowed to depend on Grafana core packages" },
|
||||
{ pkg = "github.com/grafana/grafana/pkg/web", desc = "Core plugins are not allowed to depend on Grafana core packages" },
|
||||
{ pkg = "github.com/grafana/grafana/pkg/tsdb/intervalv2", desc = "Core plugins are not allowed to depend on Grafana core packages" },
|
||||
]
|
||||
files = [
|
||||
"**/pkg/tsdb/grafana-pyroscope-datasource/*",
|
||||
"**/pkg/tsdb/grafana-pyroscope-datasource/**/*",
|
||||
"**/pkg/tsdb/grafana-testdata-datasource/*",
|
||||
"**/pkg/tsdb/grafana-testdata-datasource/**/*",
|
||||
"**/pkg/tsdb/azuremonitor/*",
|
||||
"**/pkg/tsdb/azuremonitor/**/*",
|
||||
"**/pkg/tsdb/cloud-monitoring/*",
|
||||
"**/pkg/tsdb/cloud-monitoring/**/*",
|
||||
"**/pkg/tsdb/mysql/*",
|
||||
"**/pkg/tsdb/mysql/**/*",
|
||||
"**/pkg/tsdb/parca/*",
|
||||
"**/pkg/tsdb/parca/**/*",
|
||||
"**/pkg/tsdb/tempo/*",
|
||||
"**/pkg/tsdb/tempo/**/*",
|
||||
"**/pkg/tsdb/cloudwatch/*",
|
||||
"**/pkg/tsdb/cloudwatch/**/*",
|
||||
]
|
||||
|
||||
[linters-settings.depguard.rules.apiserver]
|
||||
list-mode = "lax"
|
||||
allow = [
|
||||
"github.com/grafana/grafana/pkg/apimachinery",
|
||||
"github.com/grafana/grafana/pkg/apiserver",
|
||||
"github.com/grafana/grafana/pkg/services/apiserver/utils",
|
||||
"github.com/grafana/grafana/pkg/services/featuremgmt",
|
||||
"github.com/grafana/grafana/pkg/infra/kvstore",
|
||||
"github.com/grafana/grafana/pkg/services/apiserver/options",
|
||||
"github.com/grafana/grafana/pkg/apis/playlist/v0alpha1",
|
||||
]
|
||||
deny = [
|
||||
{ pkg = "github.com/grafana/grafana/pkg", desc = "apiserver is not allowed to import grafana core" }
|
||||
]
|
||||
files = [
|
||||
"**/pkg/apiserver/*",
|
||||
"**/pkg/apiserver/**/*"
|
||||
]
|
||||
|
||||
[linters-settings.depguard.rules.apimachinery]
|
||||
list-mode = "lax"
|
||||
allow = [
|
||||
"github.com/grafana/grafana/pkg/apimachinery",
|
||||
]
|
||||
deny = [
|
||||
{ pkg = "github.com/grafana/grafana/pkg", desc = "apimachinery is not allowed to import grafana core" }
|
||||
]
|
||||
files = [
|
||||
"**/pkg/apimachinery/*",
|
||||
"**/pkg/apimachinery/**/*"
|
||||
]
|
||||
|
||||
[linters-settings.depguard.rules.promlib]
|
||||
list-mode = "lax" # allow unless explicitely denied
|
||||
deny = [
|
||||
{ pkg = "github.com/grafana/grafana/pkg", desc = "promlib is not allowed to import grafana core" }
|
||||
]
|
||||
allow = [
|
||||
"github.com/grafana/grafana/pkg/promlib"
|
||||
]
|
||||
files = [
|
||||
"**/pkg/promlib/*",
|
||||
"**/pkg/promlib/**/*"
|
||||
]
|
||||
|
||||
[linters-settings.gocritic]
|
||||
enabled-checks = ["ruleguard"]
|
||||
[linters-settings.gocritic.settings.ruleguard]
|
||||
rules = "pkg/ruleguard.rules.go"
|
||||
|
||||
[linters-settings.misspell]
|
||||
ignore-words = ["Unknwon", "Creater"]
|
||||
|
||||
[linters-settings.nakedret]
|
||||
max-func-lines = 60
|
||||
|
||||
[linters]
|
||||
disable-all = true
|
||||
enable = [
|
||||
"bodyclose",
|
||||
"depguard",
|
||||
"dogsled",
|
||||
"errcheck",
|
||||
# "gochecknoinits",
|
||||
# "goconst",
|
||||
# "gocritic", # Temporarily disabled on 2022-09-09, running into weird bug "ruleguard: execution error: used Run() with an empty rule set; forgot to call Load() first?"
|
||||
"goimports",
|
||||
"goprintffuncname",
|
||||
"gosec",
|
||||
"gosimple",
|
||||
"govet",
|
||||
"ineffassign",
|
||||
"misspell",
|
||||
"nakedret",
|
||||
"exportloopref",
|
||||
"staticcheck",
|
||||
"stylecheck",
|
||||
"typecheck",
|
||||
"unconvert",
|
||||
"unused",
|
||||
"whitespace",
|
||||
"gocyclo",
|
||||
"exhaustive",
|
||||
"typecheck",
|
||||
"asciicheck",
|
||||
"errorlint",
|
||||
"revive",
|
||||
]
|
||||
|
||||
# Disabled linters (might want them later)
|
||||
# "unparam"
|
||||
# "rowserrcheck" # The linter doesn't detect that both Scan and Close also returns the error message returned by Err.
|
||||
|
||||
[issues]
|
||||
exclude-use-default = false
|
||||
max-same-issues = 0
|
||||
|
||||
# Enable when appropriate
|
||||
# Poorly chosen identifier
|
||||
[[issues.exclude-rules]]
|
||||
linters = ["stylecheck"]
|
||||
text = "ST1003"
|
||||
|
||||
# Enable when appropriate
|
||||
# Dot imports that aren't in external test packages are discouraged.
|
||||
[[issues.exclude-rules]]
|
||||
linters = ["stylecheck"]
|
||||
text = "ST1001"
|
||||
|
||||
# Enable when appropriate
|
||||
# http.CloseNotifier has been deprecated since Go 1.11 and an alternative has been available since Go 1.7: We currently need it in pkg/web/response_writer.go.
|
||||
[[issues.exclude-rules]]
|
||||
linters = ["staticcheck"]
|
||||
text = "SA1019: http.CloseNotifier"
|
||||
|
||||
# strings.Title has been deprecated since Go 1.18 and an alternative has been available since Go 1.0: The rule Title uses for word boundaries does not handle Unicode punctuation properly.
|
||||
# Use golang.org/x/text/cases instead.
|
||||
[[issues.exclude-rules]]
|
||||
linters = ["staticcheck"]
|
||||
text = "SA1019: strings.Title"
|
||||
|
||||
# go.opentelemetry.io/otel/exporters/jaeger" is deprecated: This module is no longer supported. OpenTelemetry dropped support for Jaeger exporter in July 2023.
|
||||
# Jaeger officially accepts and recommends using OTLP.
|
||||
# Use [go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp] or [go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc] instead.
|
||||
[[issues.exclude-rules]]
|
||||
linters = ["staticcheck"]
|
||||
text = "SA1019: \"go.opentelemetry.io/otel/exporters/jaeger\""
|
||||
|
||||
[[issues.exclude-rules]]
|
||||
linters = ["staticcheck"]
|
||||
text = "use fake service and real access control evaluator instead"
|
||||
|
||||
[[issues.exclude-rules]]
|
||||
linters = ["gosec"]
|
||||
text = "G108"
|
||||
|
||||
[[issues.exclude-rules]]
|
||||
linters = ["gosec"]
|
||||
text = "G110"
|
||||
|
||||
[[issues.exclude-rules]]
|
||||
linters = ["gosec"]
|
||||
text = "G201"
|
||||
|
||||
[[issues.exclude-rules]]
|
||||
linters = ["gosec"]
|
||||
text = "G202"
|
||||
|
||||
[[issues.exclude-rules]]
|
||||
linters = ["gosec"]
|
||||
text = "G306"
|
||||
|
||||
[[issues.exclude-rules]]
|
||||
linters = ["gosec"]
|
||||
text = "401"
|
||||
|
||||
[[issues.exclude-rules]]
|
||||
linters = ["gosec"]
|
||||
text = "402"
|
||||
|
||||
[[issues.exclude-rules]]
|
||||
linters = ["gosec"]
|
||||
text = "501"
|
||||
|
||||
[[issues.exclude-rules]]
|
||||
linters = ["gosec"]
|
||||
text = "404"
|
||||
|
||||
[[issues.exclude-rules]]
|
||||
linters = ["errorlint"]
|
||||
text = "non-wrapping format verb for fmt.Errorf"
|
||||
|
||||
# TODO: Enable
|
||||
[[issues.exclude-rules]]
|
||||
linters = ["stylecheck"]
|
||||
text = "ST1000"
|
||||
|
||||
# TODO: Enable
|
||||
[[issues.exclude-rules]]
|
||||
linters = ["stylecheck"]
|
||||
text = "ST1020"
|
||||
|
||||
# TODO: Enable
|
||||
[[issues.exclude-rules]]
|
||||
linters = ["stylecheck"]
|
||||
text = "ST1021"
|
||||
|
||||
# Remove this when we have go v1.22 in place
|
||||
# https://stackoverflow.com/a/68247837/767660
|
||||
[[issues.exclude-rules]]
|
||||
linters = ["gosec"]
|
||||
path = '(.+)_test\.go'
|
||||
text = "G601"
|
||||
298
.golangci.yml
298
.golangci.yml
@@ -1,298 +0,0 @@
|
||||
run:
|
||||
timeout: 10m
|
||||
concurrency: 10
|
||||
allow-parallel-runners: true
|
||||
linters-settings:
|
||||
exhaustive:
|
||||
default-signifies-exhaustive: true
|
||||
revive:
|
||||
ignore-generated-header: false
|
||||
severity: warning
|
||||
confidence: 3
|
||||
depguard:
|
||||
rules:
|
||||
main:
|
||||
allow: []
|
||||
deny:
|
||||
- pkg: io/ioutil
|
||||
desc: >-
|
||||
Deprecated: As of Go 1.16, the same functionality is now provided
|
||||
by package io or package os, and those implementations should be
|
||||
preferred in new code. See the specific function documentation for
|
||||
details.
|
||||
- pkg: gopkg.in/yaml.v2
|
||||
desc: >-
|
||||
Grafana packages are not allowed to depend on gopkg.in/yaml.v2 as
|
||||
gopkg.in/yaml.v3 is now available
|
||||
- pkg: github.com/pkg/errors
|
||||
desc: >-
|
||||
Deprecated: Go 1.13 supports the functionality provided by
|
||||
pkg/errors in the standard library.
|
||||
- pkg: github.com/xorcare/pointer
|
||||
desc: >-
|
||||
Use pkg/util.Pointer instead, which is a generic one-liner
|
||||
alternative
|
||||
- pkg: github.com/gofrs/uuid
|
||||
desc: 'Use github.com/google/uuid instead, which we already depend on.'
|
||||
- pkg: github.com/bmizerany/assert
|
||||
desc: >-
|
||||
Use github.com/stretchr/testify/assert instead, which we already
|
||||
depend on.
|
||||
coreplugins:
|
||||
deny:
|
||||
- pkg: github.com/grafana/grafana/pkg/api
|
||||
desc: Core plugins are not allowed to depend on Grafana core packages
|
||||
- pkg: github.com/grafana/grafana/pkg/cmd
|
||||
desc: Core plugins are not allowed to depend on Grafana core packages
|
||||
- pkg: github.com/grafana/grafana/pkg/cuectx
|
||||
desc: Core plugins are not allowed to depend on Grafana core packages
|
||||
- pkg: github.com/grafana/grafana/pkg/extensions
|
||||
desc: Core plugins are not allowed to depend on Grafana core packages
|
||||
- pkg: github.com/grafana/grafana/pkg/kinds
|
||||
desc: Core plugins are not allowed to depend on Grafana core packages
|
||||
- pkg: github.com/grafana/grafana/pkg/middleware
|
||||
desc: Core plugins are not allowed to depend on Grafana core packages
|
||||
- pkg: github.com/grafana/grafana/pkg/modules
|
||||
desc: Core plugins are not allowed to depend on Grafana core packages
|
||||
- pkg: github.com/grafana/grafana/pkg/registry
|
||||
desc: Core plugins are not allowed to depend on Grafana core packages
|
||||
- pkg: github.com/grafana/grafana/pkg/services
|
||||
desc: Core plugins are not allowed to depend on Grafana core packages
|
||||
- pkg: github.com/grafana/grafana/pkg/build
|
||||
desc: Core plugins are not allowed to depend on Grafana core packages
|
||||
- pkg: github.com/grafana/grafana/pkg/codegen
|
||||
desc: Core plugins are not allowed to depend on Grafana core packages
|
||||
- pkg: github.com/grafana/grafana/pkg/events
|
||||
desc: Core plugins are not allowed to depend on Grafana core packages
|
||||
- pkg: github.com/grafana/grafana/pkg/ifaces
|
||||
desc: Core plugins are not allowed to depend on Grafana core packages
|
||||
- pkg: github.com/grafana/grafana/pkg/kindsysreport
|
||||
desc: Core plugins are not allowed to depend on Grafana core packages
|
||||
- pkg: github.com/grafana/grafana/pkg/mocks
|
||||
desc: Core plugins are not allowed to depend on Grafana core packages
|
||||
- pkg: github.com/grafana/grafana/pkg/plugins
|
||||
desc: Core plugins are not allowed to depend on Grafana core packages
|
||||
- pkg: github.com/grafana/grafana/pkg/setting
|
||||
desc: Core plugins are not allowed to depend on Grafana core packages
|
||||
- pkg: github.com/grafana/grafana/pkg/util
|
||||
desc: Core plugins are not allowed to depend on Grafana core packages
|
||||
- pkg: github.com/grafana/grafana/pkg/bus
|
||||
desc: Core plugins are not allowed to depend on Grafana core packages
|
||||
- pkg: github.com/grafana/grafana/pkg/components
|
||||
desc: Core plugins are not allowed to depend on Grafana core packages
|
||||
- pkg: github.com/grafana/grafana/pkg/expr
|
||||
desc: Core plugins are not allowed to depend on Grafana core packages
|
||||
- pkg: github.com/grafana/grafana/pkg/infra
|
||||
desc: Core plugins are not allowed to depend on Grafana core packages
|
||||
- pkg: github.com/grafana/grafana/pkg/login
|
||||
desc: Core plugins are not allowed to depend on Grafana core packages
|
||||
- pkg: github.com/grafana/grafana/pkg/models
|
||||
desc: Core plugins are not allowed to depend on Grafana core packages
|
||||
- pkg: github.com/grafana/grafana/pkg/server
|
||||
desc: Core plugins are not allowed to depend on Grafana core packages
|
||||
- pkg: github.com/grafana/grafana/pkg/tests
|
||||
desc: Core plugins are not allowed to depend on Grafana core packages
|
||||
- pkg: github.com/grafana/grafana/pkg/web
|
||||
desc: Core plugins are not allowed to depend on Grafana core packages
|
||||
- pkg: github.com/grafana/grafana/pkg/tsdb/intervalv2
|
||||
desc: Core plugins are not allowed to depend on Grafana core packages
|
||||
files:
|
||||
- '**/pkg/tsdb/grafana-pyroscope-datasource/*'
|
||||
- '**/pkg/tsdb/grafana-pyroscope-datasource/**/*'
|
||||
- '**/pkg/tsdb/grafana-testdata-datasource/*'
|
||||
- '**/pkg/tsdb/grafana-testdata-datasource/**/*'
|
||||
- '**/pkg/tsdb/azuremonitor/*'
|
||||
- '**/pkg/tsdb/azuremonitor/**/*'
|
||||
- '**/pkg/tsdb/cloud-monitoring/*'
|
||||
- '**/pkg/tsdb/cloud-monitoring/**/*'
|
||||
- '**/pkg/tsdb/mysql/*'
|
||||
- '**/pkg/tsdb/mysql/**/*'
|
||||
- '**/pkg/tsdb/parca/*'
|
||||
- '**/pkg/tsdb/parca/**/*'
|
||||
- '**/pkg/tsdb/tempo/*'
|
||||
- '**/pkg/tsdb/tempo/**/*'
|
||||
- '**/pkg/tsdb/cloudwatch/*'
|
||||
- '**/pkg/tsdb/cloudwatch/**/*'
|
||||
apiserver:
|
||||
list-mode: lax
|
||||
allow:
|
||||
- github.com/grafana/grafana/pkg/apimachinery
|
||||
- github.com/grafana/grafana/pkg/apiserver
|
||||
deny:
|
||||
- pkg: github.com/grafana/grafana/pkg
|
||||
desc: apiserver is not allowed to import grafana core
|
||||
files:
|
||||
- '**/pkg/apiserver/*'
|
||||
- '**/pkg/apiserver/**/*'
|
||||
apimachinery:
|
||||
list-mode: lax
|
||||
allow:
|
||||
- github.com/grafana/grafana/pkg/apimachinery
|
||||
deny:
|
||||
- pkg: github.com/grafana/grafana/pkg
|
||||
desc: apimachinery is not allowed to import grafana core
|
||||
files:
|
||||
- '**/pkg/apimachinery/*'
|
||||
- '**/pkg/apimachinery/**/*'
|
||||
aggregator:
|
||||
list-mode: lax
|
||||
allow:
|
||||
- github.com/grafana/grafana/pkg/aggregator
|
||||
- github.com/grafana/grafana/pkg/semconv
|
||||
- github.com/grafana/grafana/pkg/apimachinery
|
||||
deny:
|
||||
- pkg: github.com/grafana/grafana/pkg
|
||||
desc: apimachinery is not allowed to import grafana core
|
||||
files:
|
||||
- ./pkg/aggregator/*
|
||||
- ./pkg/aggregator/**/*
|
||||
promlib:
|
||||
list-mode: lax
|
||||
deny:
|
||||
- pkg: github.com/grafana/grafana/pkg
|
||||
desc: promlib is not allowed to import grafana core
|
||||
allow:
|
||||
- github.com/grafana/grafana/pkg/promlib
|
||||
files:
|
||||
- '**/pkg/promlib/**/*'
|
||||
storage-unified-resource:
|
||||
list-mode: lax
|
||||
allow:
|
||||
- github.com/grafana/grafana/pkg/apimachinery
|
||||
deny:
|
||||
- pkg: github.com/grafana/grafana/pkg
|
||||
desc: pkg/storage/unified/resource is not allowed to import grafana core
|
||||
files:
|
||||
- ./pkg/storage/unified/resource/*
|
||||
- ./pkg/storage/unified/resource/**/*
|
||||
storage-unified-apistore:
|
||||
list-mode: lax
|
||||
allow:
|
||||
- github.com/grafana/grafana/pkg/apimachinery
|
||||
- github.com/grafana/grafana/pkg/apiserver
|
||||
- github.com/grafana/grafana/pkg/unified/resource
|
||||
deny:
|
||||
- pkg: github.com/grafana/grafana/pkg
|
||||
desc: pkg/storage/unified/apistore is not allowed to import grafana core
|
||||
files:
|
||||
- ./pkg/storage/unified/apistore/*
|
||||
- ./pkg/storage/unified/apistore/**/*
|
||||
apps-playlist:
|
||||
list-mode: lax
|
||||
allow: []
|
||||
deny:
|
||||
- pkg: github.com/grafana/grafana/pkg
|
||||
desc: apps/playlist is not allowed to import grafana core
|
||||
files:
|
||||
- ./apps/playlist/*
|
||||
- ./apps/playlist/**/*
|
||||
gocritic:
|
||||
enabled-checks:
|
||||
- ruleguard
|
||||
settings:
|
||||
ruleguard:
|
||||
rules: pkg/ruleguard.rules.go
|
||||
misspell:
|
||||
ignore-words:
|
||||
- Unknwon
|
||||
- Creater
|
||||
nakedret:
|
||||
max-func-lines: 60
|
||||
linters:
|
||||
disable-all: true
|
||||
enable:
|
||||
- asciicheck
|
||||
- bodyclose
|
||||
- depguard
|
||||
- dogsled
|
||||
- errcheck
|
||||
- errorlint
|
||||
- exhaustive
|
||||
- gocyclo
|
||||
- goimports
|
||||
- goprintffuncname
|
||||
- gosec
|
||||
- gosimple
|
||||
- govet
|
||||
- ineffassign
|
||||
- misspell
|
||||
- nakedret
|
||||
- prealloc
|
||||
- revive
|
||||
- staticcheck
|
||||
- stylecheck
|
||||
- unconvert
|
||||
- unused
|
||||
- whitespace
|
||||
issues:
|
||||
exclude-use-default: false
|
||||
max-same-issues: 0
|
||||
exclude-dirs:
|
||||
- devenv
|
||||
- scripts
|
||||
exclude-rules:
|
||||
- linters:
|
||||
- stylecheck
|
||||
text: ST1003
|
||||
- linters:
|
||||
- stylecheck
|
||||
text: ST1001
|
||||
- linters:
|
||||
- staticcheck
|
||||
text: 'SA1019: http.CloseNotifier'
|
||||
- linters:
|
||||
- staticcheck
|
||||
text: 'SA1019: strings.Title'
|
||||
- linters:
|
||||
- staticcheck
|
||||
text: 'SA1019: "go.opentelemetry.io/otel/exporters/jaeger"'
|
||||
- linters:
|
||||
- staticcheck
|
||||
text: use fake service and real access control evaluator instead
|
||||
- linters:
|
||||
- gosec
|
||||
text: G108
|
||||
- linters:
|
||||
- gosec
|
||||
text: G110
|
||||
- linters:
|
||||
- gosec
|
||||
text: G115
|
||||
- linters:
|
||||
- gosec
|
||||
text: G201
|
||||
- linters:
|
||||
- gosec
|
||||
text: G202
|
||||
- linters:
|
||||
- gosec
|
||||
text: G306
|
||||
- linters:
|
||||
- gosec
|
||||
text: '401'
|
||||
- linters:
|
||||
- gosec
|
||||
text: '402'
|
||||
- linters:
|
||||
- gosec
|
||||
text: '501'
|
||||
- linters:
|
||||
- gosec
|
||||
text: '404'
|
||||
- linters:
|
||||
- errorlint
|
||||
text: non-wrapping format verb for fmt.Errorf
|
||||
- linters:
|
||||
- stylecheck
|
||||
text: ST1000
|
||||
- linters:
|
||||
- stylecheck
|
||||
text: ST1020
|
||||
- linters:
|
||||
- stylecheck
|
||||
text: ST1021
|
||||
- linters:
|
||||
- gosec
|
||||
path: (.+)_test\.go
|
||||
text: G601
|
||||
|
||||
@@ -28,8 +28,5 @@ public/api-merged.json
|
||||
public/api-enterprise-spec.json
|
||||
public/openapi3.json
|
||||
|
||||
# Generated mock service worker
|
||||
public/mockServiceWorker.js
|
||||
|
||||
# Crowdin files
|
||||
public/locales/**/*.json
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
# See https://aquasecurity.github.io/trivy/v0.48/docs/configuration/filtering/#trivyignore
|
||||
6
.vscode/launch.json
vendored
6
.vscode/launch.json
vendored
@@ -9,7 +9,7 @@
|
||||
"program": "${workspaceFolder}/pkg/cmd/grafana/",
|
||||
"env": {},
|
||||
"cwd": "${workspaceFolder}",
|
||||
"args": ["server", "--homepath", "${workspaceFolder}", "--packaging", "dev", "cfg:app_mode=development"]
|
||||
"args": ["server", "--homepath", "${workspaceFolder}", "--packaging", "dev"]
|
||||
},
|
||||
{
|
||||
"name": "Run API Server (testdata)",
|
||||
@@ -44,7 +44,7 @@
|
||||
"request": "launch",
|
||||
"mode": "auto",
|
||||
"program": "${workspaceFolder}/pkg/cmd/grafana/",
|
||||
"env": { "GF_GRAFANA_APISERVER_STORAGE_TYPE": "unified-grpc" },
|
||||
"env": {"GF_GRAFANA_APISERVER_STORAGE_TYPE": "unified-grpc"},
|
||||
"cwd": "${workspaceFolder}",
|
||||
"args": ["server", "--homepath", "${workspaceFolder}", "--packaging", "dev"]
|
||||
},
|
||||
@@ -54,7 +54,7 @@
|
||||
"request": "launch",
|
||||
"mode": "auto",
|
||||
"program": "${workspaceFolder}/pkg/cmd/grafana/",
|
||||
"env": { "GF_DEFAULT_TARGET": "storage-server", "GF_SERVER_HTTP_PORT": "3001" },
|
||||
"env": {"GF_DEFAULT_TARGET": "storage-server","GF_SERVER_HTTP_PORT": "3001"},
|
||||
"cwd": "${workspaceFolder}",
|
||||
"args": ["server", "target", "--homepath", "${workspaceFolder}", "--packaging", "dev"]
|
||||
},
|
||||
|
||||
894
.yarn/releases/yarn-4.2.2.cjs
vendored
Executable file
894
.yarn/releases/yarn-4.2.2.cjs
vendored
Executable file
File diff suppressed because one or more lines are too long
925
.yarn/releases/yarn-4.5.0.cjs
vendored
925
.yarn/releases/yarn-4.5.0.cjs
vendored
File diff suppressed because one or more lines are too long
@@ -26,7 +26,7 @@ plugins:
|
||||
- path: .yarn/plugins/@yarnpkg/plugin-outdated.cjs
|
||||
spec: 'https://mskelton.dev/yarn-outdated/v2'
|
||||
|
||||
yarnPath: .yarn/releases/yarn-4.5.0.cjs
|
||||
yarnPath: .yarn/releases/yarn-4.2.2.cjs
|
||||
# Uncomment the following lines if you want to use Verdaccio local npm registry. Read more at packages/README.md
|
||||
#npmScopes:
|
||||
# grafana:
|
||||
|
||||
700
CHANGELOG.md
700
CHANGELOG.md
@@ -1,535 +1,3 @@
|
||||
<!-- 11.4.3 START -->
|
||||
|
||||
# 11.4.3 (2025-03-25)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **Chore:** Bump Go to 1.23.7 [#101582](https://github.com/grafana/grafana/pull/101582), [@macabu](https://github.com/macabu)
|
||||
- **Chore:** Bump Go to 1.23.7 (Enterprise)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Alerting:** Fix token-based Slack image upload to work with channel names [#101072](https://github.com/grafana/grafana/pull/101072), [@JacobsonMT](https://github.com/JacobsonMT)
|
||||
- **InfluxDB:** Improve handling of template variables contained in regular expressions (InfluxQL) [#100987](https://github.com/grafana/grafana/pull/100987), [@aangelisc](https://github.com/aangelisc)
|
||||
- **Service Accounts:** Do not show error pop-ups for Service Account and Renderer UI flows [#101790](https://github.com/grafana/grafana/pull/101790), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
|
||||
|
||||
<!-- 11.4.3 END -->
|
||||
<!-- 11.4.2 START -->
|
||||
|
||||
# 11.4.2 (2025-02-18)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **Docker:** Use our own glibc 2.40 binaries [#99924](https://github.com/grafana/grafana/pull/99924), [@DanCech](https://github.com/DanCech)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Auth:** Fix redirect with JWT auth URL login [#100494](https://github.com/grafana/grafana/pull/100494), [@mgyongyosi](https://github.com/mgyongyosi)
|
||||
- **AuthN:** Refetch user on "ErrUserAlreadyExists" [#100585](https://github.com/grafana/grafana/pull/100585), [@kalleep](https://github.com/kalleep)
|
||||
- **Azure:** Correctly set application insights resource values [#99598](https://github.com/grafana/grafana/pull/99598), [@aangelisc](https://github.com/aangelisc)
|
||||
- **Dashboards:** Bring back scripted dashboards [#100629](https://github.com/grafana/grafana/pull/100629), [@dprokop](https://github.com/dprokop)
|
||||
- **Plugin Metrics:** Eliminate data race in plugin metrics middleware [#100077](https://github.com/grafana/grafana/pull/100077), [@clord](https://github.com/clord)
|
||||
- **RBAC:** Don't check folder access if `annotationPermissionUpdate` FT is enabled [#100116](https://github.com/grafana/grafana/pull/100116), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
|
||||
|
||||
<!-- 11.4.2 END -->
|
||||
<!-- 11.4.1 START -->
|
||||
|
||||
# 11.4.1 (2025-01-28)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **Security:** Update to Go 1.23.5 - Backport to v11.4.x [#99123](https://github.com/grafana/grafana/pull/99123), [@Proximyst](https://github.com/Proximyst)
|
||||
- **Security:** Update to Go 1.23.5 - Backport to v11.4.x (Enterprise)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Alerting:** AlertingQueryRunner should skip descendant nodes of invalid queries [#97830](https://github.com/grafana/grafana/pull/97830), [@gillesdemey](https://github.com/gillesdemey)
|
||||
- **Alerting:** Fix alert rules unpausing after moving rule to different folder [#97583](https://github.com/grafana/grafana/pull/97583), [@santihernandezc](https://github.com/santihernandezc)
|
||||
- **Alerting:** Fix label escaping in rule export [#98649](https://github.com/grafana/grafana/pull/98649), [@moustafab](https://github.com/moustafab)
|
||||
- **Alerting:** Fix slack image uploading to use new api [#98066](https://github.com/grafana/grafana/pull/98066), [@moustafab](https://github.com/moustafab)
|
||||
- **Azure/GCM:** Improve error display [#97594](https://github.com/grafana/grafana/pull/97594), [@aangelisc](https://github.com/aangelisc)
|
||||
- **Dashboards:** Fix issue where filtered panels would not react to variable changes [#98734](https://github.com/grafana/grafana/pull/98734), [@oscarkilhed](https://github.com/oscarkilhed)
|
||||
- **Dashboards:** Fixes issue with panel header showing even when hide time override was enabled [#98747](https://github.com/grafana/grafana/pull/98747), [@torkelo](https://github.com/torkelo)
|
||||
- **Dashboards:** Fixes week relative time ranges when weekStart was changed [#98269](https://github.com/grafana/grafana/pull/98269), [@torkelo](https://github.com/torkelo)
|
||||
- **Dashboards:** Panel react for `timeFrom` and `timeShift` changes using variables [#98659](https://github.com/grafana/grafana/pull/98659), [@Sergej-Vlasov](https://github.com/Sergej-Vlasov)
|
||||
- **DateTimePicker:** Fixes issue with date picker showing invalid date [#97971](https://github.com/grafana/grafana/pull/97971), [@torkelo](https://github.com/torkelo)
|
||||
- **Fix:** Add support for datasource variable queries [#98119](https://github.com/grafana/grafana/pull/98119), [@sunker](https://github.com/sunker)
|
||||
- **InfluxDB:** Adhoc filters can use template vars as values [#98786](https://github.com/grafana/grafana/pull/98786), [@bossinc](https://github.com/bossinc)
|
||||
- **LibraryPanel:** Fallback to panel title if library panel title is not set [#99410](https://github.com/grafana/grafana/pull/99410), [@ivanortegaalba](https://github.com/ivanortegaalba)
|
||||
|
||||
### Plugin development fixes & changes
|
||||
|
||||
- **Grafana UI:** Re-add react-router-dom as a dependency [#98422](https://github.com/grafana/grafana/pull/98422), [@leventebalogh](https://github.com/leventebalogh)
|
||||
|
||||
<!-- 11.4.1 END -->
|
||||
<!-- 11.4.0 START -->
|
||||
|
||||
# 11.4.0 (2024-12-05)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **Cloudwatch:** OpenSearch PPL and SQL support in Logs Insights
|
||||
|
||||
<!-- 11.4.0 END -->
|
||||
<!-- 11.3.1 START -->
|
||||
|
||||
# 11.3.1 (2024-11-19)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **Alerting:** Make context deadline on AlertNG service startup configurable [#96135](https://github.com/grafana/grafana/pull/96135), [@fayzal-g](https://github.com/fayzal-g)
|
||||
- **MigrationAssistant:** Restrict dashboards, folders and datasources by the org id of the signed in user [#96345](https://github.com/grafana/grafana/pull/96345), [@leandro-deveikis](https://github.com/leandro-deveikis)
|
||||
- **User:** Check SignedInUser OrgID in RevokeInvite [#95490](https://github.com/grafana/grafana/pull/95490), [@mgyongyosi](https://github.com/mgyongyosi)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Alerting:** Fix escaping of silence matchers in utf8 mode [#95347](https://github.com/grafana/grafana/pull/95347), [@tomratcliffe](https://github.com/tomratcliffe)
|
||||
- **Alerting:** Fix overflow for long receiver names [#95133](https://github.com/grafana/grafana/pull/95133), [@gillesdemey](https://github.com/gillesdemey)
|
||||
- **Alerting:** Fix saving advanced mode toggle state in the alert rule editor [#95981](https://github.com/grafana/grafana/pull/95981), [@alexander-akhmetov](https://github.com/alexander-akhmetov)
|
||||
- **Alerting:** Fix setting datasource uid, when datasource is string in old version [#96273](https://github.com/grafana/grafana/pull/96273), [@soniaAguilarPeiron](https://github.com/soniaAguilarPeiron)
|
||||
- **Alerting:** Force refetch prom rules when refreshing panel [#96125](https://github.com/grafana/grafana/pull/96125), [@soniaAguilarPeiron](https://github.com/soniaAguilarPeiron)
|
||||
- **Anonymous User:** Adds validator service for anonymous users [#94994](https://github.com/grafana/grafana/pull/94994), [@leandro-deveikis](https://github.com/leandro-deveikis)
|
||||
- **Anonymous User:** Adds validator service for anonymous users (Enterprise)
|
||||
- **Azure Monitor:** Support metric namespaces fallback [#95155](https://github.com/grafana/grafana/pull/95155), [@aangelisc](https://github.com/aangelisc)
|
||||
- **Azure:** Fix duplicated traces in multi-resource trace query [#95247](https://github.com/grafana/grafana/pull/95247), [@aangelisc](https://github.com/aangelisc)
|
||||
- **Azure:** Handle namespace request rejection [#95909](https://github.com/grafana/grafana/pull/95909), [@aangelisc](https://github.com/aangelisc)
|
||||
- **CloudWatch:** Interpolate region in log context query [#94990](https://github.com/grafana/grafana/pull/94990), [@iwysiu](https://github.com/iwysiu)
|
||||
- **Dashboard datasource:** Return annotations as series when query topic is "annotations" [#95971](https://github.com/grafana/grafana/pull/95971), [@kaydelaney](https://github.com/kaydelaney)
|
||||
- **Dashboard:** Append orgId to URL [#95963](https://github.com/grafana/grafana/pull/95963), [@bfmatei](https://github.com/bfmatei)
|
||||
- **Dashboards:** Fixes performance issue expanding a row [#95321](https://github.com/grafana/grafana/pull/95321), [@torkelo](https://github.com/torkelo)
|
||||
- **Flame Graph:** Fix crash when it receives empty data [#96211](https://github.com/grafana/grafana/pull/96211), [@yincongcyincong](https://github.com/yincongcyincong)
|
||||
- **Folders:** Add admin permissions upon creation of a folder w. SA [#95365](https://github.com/grafana/grafana/pull/95365), [@eleijonmarck](https://github.com/eleijonmarck)
|
||||
- **Folders:** Don't show error pop-up if the user can't fetch the root folder [#95600](https://github.com/grafana/grafana/pull/95600), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
|
||||
- **Migration:** Remove table aliasing in delete statement to make it work for mariadb [#95232](https://github.com/grafana/grafana/pull/95232), [@kalleep](https://github.com/kalleep)
|
||||
- **ServerLock:** Fix pg concurrency/locking issue [#95935](https://github.com/grafana/grafana/pull/95935), [@mgyongyosi](https://github.com/mgyongyosi)
|
||||
- **Service Accounts:** Run service account creation in transaction [#94803](https://github.com/grafana/grafana/pull/94803), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
|
||||
- **Table:** Fix text wrapping applying to wrong field [#95425](https://github.com/grafana/grafana/pull/95425), [@codeincarnate](https://github.com/codeincarnate)
|
||||
- **Unified Storage:** Use ssl_mode instead of sslmode [#95662](https://github.com/grafana/grafana/pull/95662), [@chaudyg](https://github.com/chaudyg)
|
||||
|
||||
<!-- 11.3.1 END -->
|
||||
<!-- 11.3.0+security-01 START -->
|
||||
|
||||
# 11.3.0+security-01 (2024-11-12)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **MigrationAssistant:** Fix Migration Assistant issue [CVE-2024-9476]
|
||||
|
||||
<!-- 11.3.0+security-01 END -->
|
||||
<!-- 11.3.0 START -->
|
||||
|
||||
# 11.3.0 (2024-10-22)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **Alerting:** Add manage permissions UI logic for Contact Points [#92885](https://github.com/grafana/grafana/pull/92885), [@tomratcliffe](https://github.com/tomratcliffe)
|
||||
- **Alerting:** Allow linking to silence form with `__alert_rule_uid__` value preset [#93526](https://github.com/grafana/grafana/pull/93526), [@tomratcliffe](https://github.com/tomratcliffe)
|
||||
- **Alerting:** Hide query name when using simplified mode in the alert rule [#93779](https://github.com/grafana/grafana/pull/93779), [@soniaAguilarPeiron](https://github.com/soniaAguilarPeiron)
|
||||
- **Alerting:** Limit and clean up old alert rules versions [#89754](https://github.com/grafana/grafana/pull/89754), [@igloo12](https://github.com/igloo12)
|
||||
- **Alerting:** Style nits for the simple query mode [#93930](https://github.com/grafana/grafana/pull/93930), [@soniaAguilarPeiron](https://github.com/soniaAguilarPeiron)
|
||||
- **Alerting:** Update texts in annotations step [#93977](https://github.com/grafana/grafana/pull/93977), [@soniaAguilarPeiron](https://github.com/soniaAguilarPeiron)
|
||||
- **Alerting:** Use useProduceNewAlertmanagerConfiguration for contact points [#88456](https://github.com/grafana/grafana/pull/88456), [@gillesdemey](https://github.com/gillesdemey)
|
||||
- **Auth:** Attach external session info to Grafana session [#93849](https://github.com/grafana/grafana/pull/93849), [@mgyongyosi](https://github.com/mgyongyosi)
|
||||
- **Auth:** Replace jmespath/go-jmespath with jmespath-community/go-jmespath [#94203](https://github.com/grafana/grafana/pull/94203), [@mgyongyosi](https://github.com/mgyongyosi)
|
||||
- **CloudMigrations:** Add support for migration of Library Elements (Panels) resources [#93898](https://github.com/grafana/grafana/pull/93898), [@macabu](https://github.com/macabu)
|
||||
- **Cloudwatch:** Update grafana-aws-sdk [#94155](https://github.com/grafana/grafana/pull/94155), [@iwysiu](https://github.com/iwysiu)
|
||||
- **Explore Logs:** Preinstall for onprem Grafana instances [#94221](https://github.com/grafana/grafana/pull/94221), [@svennergr](https://github.com/svennergr)
|
||||
- **ExploreMetrics:** Ensure compatibility with Incremental Querying [#94355](https://github.com/grafana/grafana/pull/94355), [@NWRichmond](https://github.com/NWRichmond)
|
||||
- **FieldConfig:** Add support for Actions [#92874](https://github.com/grafana/grafana/pull/92874), [@adela-almasan](https://github.com/adela-almasan)
|
||||
- **Plugin Extensions:** Require meta-data to be defined in `plugin.json` during development mode [#93429](https://github.com/grafana/grafana/pull/93429), [@leventebalogh](https://github.com/leventebalogh)
|
||||
- **Reporting:** Display template variables in the PDF (Enterprise)
|
||||
- **Tempo:** Add deprecation notice for Aggregate By [#94050](https://github.com/grafana/grafana/pull/94050), [@joey-grafana](https://github.com/joey-grafana)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Alerting/Chore:** Fix TimeRangeInput not working across multiple months [#93622](https://github.com/grafana/grafana/pull/93622), [@tomratcliffe](https://github.com/tomratcliffe)
|
||||
- **Alerting:** Fix default value for input in simple condition [#94248](https://github.com/grafana/grafana/pull/94248), [@soniaAguilarPeiron](https://github.com/soniaAguilarPeiron)
|
||||
- **Alerting:** Fix eval interval not being saved when creating a new group [#93821](https://github.com/grafana/grafana/pull/93821), [@tomratcliffe](https://github.com/tomratcliffe)
|
||||
- **Alerting:** Fix incorrect permission on POST external rule groups endpoint [CVE-2024-8118] [#93940](https://github.com/grafana/grafana/pull/93940), [@alexweav](https://github.com/alexweav)
|
||||
- **Alerting:** Fix panics when attempting to create an Alertmanager after failing [#94023](https://github.com/grafana/grafana/pull/94023), [@santihernandezc](https://github.com/santihernandezc)
|
||||
- **DashboardScene:** Fixes url issue with subpath when exiting edit mode [#93962](https://github.com/grafana/grafana/pull/93962), [@torkelo](https://github.com/torkelo)
|
||||
- **Dashboards:** Enable scenes by default [#93818](https://github.com/grafana/grafana/pull/93818), [@ivanortegaalba](https://github.com/ivanortegaalba)
|
||||
- **Dashboards:** Fixes view & edit keyboard shortcuts when grafana is behind a subpath [#93955](https://github.com/grafana/grafana/pull/93955), [@torkelo](https://github.com/torkelo)
|
||||
- **ElasticSearch:** Fix errorsource in newInstanceSettings [#93859](https://github.com/grafana/grafana/pull/93859), [@iwysiu](https://github.com/iwysiu)
|
||||
- **Reporting:** Fix reports on multi-org instance (Enterprise)
|
||||
- **SubMenu:** Fix expanding sub menu items on touch devices [#93208](https://github.com/grafana/grafana/pull/93208), [@yincongcyincong](https://github.com/yincongcyincong)
|
||||
|
||||
<!-- 11.3.0 END -->
|
||||
<!-- 11.2.2 START -->
|
||||
|
||||
# 11.2.2 (2024-10-01)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **Chore:** Bump Go to 1.22.7 [#93353](https://github.com/grafana/grafana/pull/93353), [@hairyhenderson](https://github.com/hairyhenderson)
|
||||
- **Chore:** Bump Go to 1.22.7 (Enterprise)
|
||||
- **Data sources:** Hide the datasource redirection banner for users who can't interact with data sources [#93103](https://github.com/grafana/grafana/pull/93103), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Alerting:** Fix preview of silences when label name contains spaces [#93051](https://github.com/grafana/grafana/pull/93051), [@tomratcliffe](https://github.com/tomratcliffe)
|
||||
- **Alerting:** Make query wrapper match up datasource UIDs if necessary [#93114](https://github.com/grafana/grafana/pull/93114), [@tomratcliffe](https://github.com/tomratcliffe)
|
||||
- **AzureMonitor:** Deduplicate resource picker rows [#93705](https://github.com/grafana/grafana/pull/93705), [@aangelisc](https://github.com/aangelisc)
|
||||
- **AzureMonitor:** Improve resource picker efficiency [#93440](https://github.com/grafana/grafana/pull/93440), [@aangelisc](https://github.com/aangelisc)
|
||||
- **AzureMonitor:** Remove Basic Logs retention warning [#93123](https://github.com/grafana/grafana/pull/93123), [@aangelisc](https://github.com/aangelisc)
|
||||
- **CloudWatch:** Fix segfault when migrating legacy queries [#93544](https://github.com/grafana/grafana/pull/93544), [@iwysiu](https://github.com/iwysiu)
|
||||
- **Correlations:** Limit access to correlations page to users who can access Explore [#93676](https://github.com/grafana/grafana/pull/93676), [@ifrost](https://github.com/ifrost)
|
||||
- **DashboardScene:** Fix broken error handling and error rendering [#93690](https://github.com/grafana/grafana/pull/93690), [@torkelo](https://github.com/torkelo)
|
||||
- **Plugins:** Avoid returning 404 for `AutoEnabled` apps [#93488](https://github.com/grafana/grafana/pull/93488), [@wbrowne](https://github.com/wbrowne)
|
||||
|
||||
<!-- 11.2.2 END -->
|
||||
<!-- 11.1.7 START -->
|
||||
|
||||
# 11.1.7 (2024-10-01)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **Chore:** Bump Go to 1.22.7 [#93355](https://github.com/grafana/grafana/pull/93355), [@hairyhenderson](https://github.com/hairyhenderson)
|
||||
- **Chore:** Bump Go to 1.22.7 (Enterprise)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Alerting:** Fix preview of silences when label name contains spaces [#93050](https://github.com/grafana/grafana/pull/93050), [@tomratcliffe](https://github.com/tomratcliffe)
|
||||
- **Alerting:** Make query wrapper match up datasource UIDs if necessary [#93115](https://github.com/grafana/grafana/pull/93115), [@tomratcliffe](https://github.com/tomratcliffe)
|
||||
- **AzureMonitor:** Deduplicate resource picker rows [#93704](https://github.com/grafana/grafana/pull/93704), [@aangelisc](https://github.com/aangelisc)
|
||||
- **AzureMonitor:** Improve resource picker efficiency [#93439](https://github.com/grafana/grafana/pull/93439), [@aangelisc](https://github.com/aangelisc)
|
||||
- **AzureMonitor:** Remove Basic Logs retention warning [#93122](https://github.com/grafana/grafana/pull/93122), [@aangelisc](https://github.com/aangelisc)
|
||||
- **Correlations:** Limit access to correlations page to users who can access Explore [#93675](https://github.com/grafana/grafana/pull/93675), [@ifrost](https://github.com/ifrost)
|
||||
- **Plugins:** Avoid returning 404 for `AutoEnabled` apps [#93487](https://github.com/grafana/grafana/pull/93487), [@wbrowne](https://github.com/wbrowne)
|
||||
|
||||
<!-- 11.1.7 END -->
|
||||
<!-- 11.0.6 START -->
|
||||
|
||||
# 11.0.6 (2024-10-01)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **Chore:** Bump Go to 1.22.7 [#93358](https://github.com/grafana/grafana/pull/93358), [@hairyhenderson](https://github.com/hairyhenderson)
|
||||
- **Chore:** Bump Go to 1.22.7 (Enterprise)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **AzureMonitor:** Deduplicate resource picker rows [#93703](https://github.com/grafana/grafana/pull/93703), [@aangelisc](https://github.com/aangelisc)
|
||||
- **AzureMonitor:** Improve resource picker efficiency [#93438](https://github.com/grafana/grafana/pull/93438), [@aangelisc](https://github.com/aangelisc)
|
||||
- **Correlations:** Limit access to correlations page to users who can access Explore [#93674](https://github.com/grafana/grafana/pull/93674), [@ifrost](https://github.com/ifrost)
|
||||
- **Plugins:** Avoid returning 404 for `AutoEnabled` apps [#93486](https://github.com/grafana/grafana/pull/93486), [@wbrowne](https://github.com/wbrowne)
|
||||
|
||||
<!-- 11.0.6 END -->
|
||||
<!-- 10.4.10 START -->
|
||||
|
||||
# 10.4.10 (2024-10-01)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **Chore:** Bump Go to 1.22.7 [#93359](https://github.com/grafana/grafana/pull/93359), [@hairyhenderson](https://github.com/hairyhenderson)
|
||||
- **Chore:** Bump Go to 1.22.7 (Enterprise)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **AzureMonitor:** Deduplicate resource picker rows [#93702](https://github.com/grafana/grafana/pull/93702), [@aangelisc](https://github.com/aangelisc)
|
||||
- **Correlations:** Limit access to correlations page to users who can access Explore [#93673](https://github.com/grafana/grafana/pull/93673), [@ifrost](https://github.com/ifrost)
|
||||
|
||||
<!-- 10.4.10 END -->
|
||||
<!-- 10.3.11 START -->
|
||||
|
||||
# 10.3.11 (2024-10-01)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **Chore:** Bump Go to 1.22.7 [#93360](https://github.com/grafana/grafana/pull/93360), [@hairyhenderson](https://github.com/hairyhenderson)
|
||||
- **Chore:** Bump Go to 1.22.7 (Enterprise)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Correlations:** Limit access to correlations page to users who can access Explore [#93672](https://github.com/grafana/grafana/pull/93672), [@ifrost](https://github.com/ifrost)
|
||||
|
||||
<!-- 10.3.11 END -->
|
||||
<!-- 11.2.1 START -->
|
||||
|
||||
# 11.2.1 (2024-09-26)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **Alerting:** Support for optimistic concurrency in priovisioning Tempate API [#92251](https://github.com/grafana/grafana/pull/92251), [@yuri-tceretian](https://github.com/yuri-tceretian)
|
||||
- **Logs panel:** Enable displayedFields in dashboards and apps [#92675](https://github.com/grafana/grafana/pull/92675), [@matyax](https://github.com/matyax)
|
||||
- **State timeline:** Add pagination support [#92257](https://github.com/grafana/grafana/pull/92257), [@kevinputera](https://github.com/kevinputera)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Authn:** No longer hash service account token twice during authentication [#92639](https://github.com/grafana/grafana/pull/92639), [@kalleep](https://github.com/kalleep)
|
||||
- **CloudMigrations:** Fix snapshot creation on Windows systems [#92981](https://github.com/grafana/grafana/pull/92981), [@macabu](https://github.com/macabu)
|
||||
- **DashGPT:** Fixes issue with generation on Safari [#92952](https://github.com/grafana/grafana/pull/92952), [@kaydelaney](https://github.com/kaydelaney)
|
||||
- **Dashboard:** Fix Annotation runtime error when a data source does not support annotations [#92830](https://github.com/grafana/grafana/pull/92830), [@axelavargas](https://github.com/axelavargas)
|
||||
- **Grafana SQL:** Fix broken import in NumberInput component [#92808](https://github.com/grafana/grafana/pull/92808), [@chessman](https://github.com/chessman)
|
||||
- **Logs:** Show older logs button when infinite scroll is enabled and sort order is descending [#92867](https://github.com/grafana/grafana/pull/92867), [@matyax](https://github.com/matyax)
|
||||
- **RBAC:** Fix an issue with server admins not being able to manage users in orgs that they don't belong to [#92274](https://github.com/grafana/grafana/pull/92274), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
|
||||
- **RBAC:** Fix an issue with server admins not being able to manage users in orgs that they don't belong to (Enterprise)
|
||||
- **Reporting:** Disable dashboardSceneSolo when rendering PDFs the old way (Enterprise)
|
||||
- **Templating:** Fix searching non-latin template variables [#92893](https://github.com/grafana/grafana/pull/92893), [@leeoniya](https://github.com/leeoniya)
|
||||
- **TutorialCard:** Fix link to tutorial not opening [#92647](https://github.com/grafana/grafana/pull/92647), [@eledobleefe](https://github.com/eledobleefe)
|
||||
- **Alerting:** Fixed CVE-2024-8118.
|
||||
|
||||
### Plugin development fixes & changes
|
||||
|
||||
- **AutoSizeInput:** Allow to be controlled by value [#92999](https://github.com/grafana/grafana/pull/92999), [@ivanortegaalba](https://github.com/ivanortegaalba)
|
||||
|
||||
<!-- 11.2.1 END -->
|
||||
<!-- 11.1.6 START -->
|
||||
|
||||
# 11.1.6 (2024-09-26)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **Chore:** Update swagger ui (4.3.0 to 5.17.14) [#92341](https://github.com/grafana/grafana/pull/92341), [@ryantxu](https://github.com/ryantxu)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Templating:** Fix searching non-latin template variables [#92892](https://github.com/grafana/grafana/pull/92892), [@leeoniya](https://github.com/leeoniya)
|
||||
- **TutorialCard:** Fix link to tutorial not opening [#92646](https://github.com/grafana/grafana/pull/92646), [@eledobleefe](https://github.com/eledobleefe)
|
||||
|
||||
### Plugin development fixes & changes
|
||||
|
||||
- **Bugfix:** QueryField typeahead missing background color [#92316](https://github.com/grafana/grafana/pull/92316), [@mckn](https://github.com/mckn)
|
||||
- **Alerting:** Fixed CVE-2024-8118.
|
||||
|
||||
<!-- 11.1.6 END -->
|
||||
<!-- 11.0.5 START -->
|
||||
|
||||
# 11.0.5 (2024-09-26)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **Chore:** Update swagger ui (4.3.0 to 5.17.14) [#92345](https://github.com/grafana/grafana/pull/92345), [@ryantxu](https://github.com/ryantxu)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Provisioning:** Prevent provisioning folder errors from failing startup [#92588](https://github.com/grafana/grafana/pull/92588), [@suntala](https://github.com/suntala)
|
||||
- **TutorialCard:** Fix link to tutorial not opening [#92645](https://github.com/grafana/grafana/pull/92645), [@eledobleefe](https://github.com/eledobleefe)
|
||||
- **Alerting:** Fixed CVE-2024-8118.
|
||||
|
||||
<!-- 11.0.5 END -->
|
||||
<!-- 10.4.9 START -->
|
||||
|
||||
# 10.4.9 (2024-09-26)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **Chore:** Update swagger ui (4.3.0 to 5.17.14) [#92344](https://github.com/grafana/grafana/pull/92344), [@ryantxu](https://github.com/ryantxu)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Provisioning:** Prevent provisioning folder errors from failing startup [#92591](https://github.com/grafana/grafana/pull/92591), [@suntala](https://github.com/suntala)
|
||||
- **Alerting:** Fixed CVE-2024-8118.
|
||||
|
||||
<!-- 10.4.9 END -->
|
||||
<!-- 10.3.10 START -->
|
||||
|
||||
# 10.3.10 (2024-09-26)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Alerting:** Fixed CVE-2024-8118.
|
||||
|
||||
<!-- 10.3.10 END -->
|
||||
<!-- 11.2.0 START -->
|
||||
|
||||
# 11.2.0 (2024-08-27)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **@grafana/data:** Introduce new getTagKeys/getTagValues response interface [#88369](https://github.com/grafana/grafana/pull/88369), [@kaydelaney](https://github.com/kaydelaney)
|
||||
- **AWS:** Update deprecated aws-sdk functions from env variable versions [#89643](https://github.com/grafana/grafana/pull/89643), [@iwysiu](https://github.com/iwysiu)
|
||||
- **Alerting:** Add ha_reconnect_timeout configuration option [#88823](https://github.com/grafana/grafana/pull/88823), [@JacobValdemar](https://github.com/JacobValdemar)
|
||||
- **Alerting:** Add setting for maximum allowed rule evaluation results [#89468](https://github.com/grafana/grafana/pull/89468), [@alexander-akhmetov](https://github.com/alexander-akhmetov)
|
||||
- **Alerting:** Add warning in telegram contact point [#89397](https://github.com/grafana/grafana/pull/89397), [@soniaAguilarPeiron](https://github.com/soniaAguilarPeiron)
|
||||
- **Alerting:** Central alert history part4 [#90088](https://github.com/grafana/grafana/pull/90088), [@soniaAguilarPeiron](https://github.com/soniaAguilarPeiron)
|
||||
- **Alerting:** Don't crash the page when trying to filter rules by regex [#89466](https://github.com/grafana/grafana/pull/89466), [@tomratcliffe](https://github.com/tomratcliffe)
|
||||
- **Alerting:** Enable remote primary mode using feature toggles [#88976](https://github.com/grafana/grafana/pull/88976), [@santihernandezc](https://github.com/santihernandezc)
|
||||
- **Alerting:** Hide edit/view rule buttons according to deleting/creating state [#90375](https://github.com/grafana/grafana/pull/90375), [@tomratcliffe](https://github.com/tomratcliffe)
|
||||
- **Alerting:** Implement UI for grafana-managed recording rules [#90360](https://github.com/grafana/grafana/pull/90360), [@soniaAguilarPeiron](https://github.com/soniaAguilarPeiron)
|
||||
- **Alerting:** Improve performance of /api/prometheus for large numbers of alerts. [#89268](https://github.com/grafana/grafana/pull/89268), [@stevesg](https://github.com/stevesg)
|
||||
- **Alerting:** Include a list of ref_Id and aggregated datasource UIDs to alerts when state reason is NoData [#88819](https://github.com/grafana/grafana/pull/88819), [@wasim-nihal](https://github.com/wasim-nihal)
|
||||
- **Alerting:** Instrument outbound requests for Loki Historian and Remote Alertmanager with tracing [#89185](https://github.com/grafana/grafana/pull/89185), [@alexweav](https://github.com/alexweav)
|
||||
- **Alerting:** Limit instances on alert detail view unless in instances tab [#89368](https://github.com/grafana/grafana/pull/89368), [@gillesdemey](https://github.com/gillesdemey)
|
||||
- **Alerting:** Make alert group editing safer [#88627](https://github.com/grafana/grafana/pull/88627), [@gillesdemey](https://github.com/gillesdemey)
|
||||
- **Alerting:** Make whitespace more visible on labels [#90223](https://github.com/grafana/grafana/pull/90223), [@tomratcliffe](https://github.com/tomratcliffe)
|
||||
- **Alerting:** Remove option to return settings from api/v1/receivers and restrict provisioning action access [#90861](https://github.com/grafana/grafana/pull/90861), [@JacobsonMT](https://github.com/JacobsonMT)
|
||||
- **Alerting:** Resend resolved notifications for ResolvedRetention duration [#88938](https://github.com/grafana/grafana/pull/88938), [@JacobsonMT](https://github.com/JacobsonMT)
|
||||
- **Alerting:** Show Insights page only on cloud (when required ds's are available) [#89679](https://github.com/grafana/grafana/pull/89679), [@soniaAguilarPeiron](https://github.com/soniaAguilarPeiron)
|
||||
- **Alerting:** Show repeat interval in timing options meta [#89414](https://github.com/grafana/grafana/pull/89414), [@gillesdemey](https://github.com/gillesdemey)
|
||||
- **Alerting:** Support median in reduce expressions [#91119](https://github.com/grafana/grafana/pull/91119), [@alexander-akhmetov](https://github.com/alexander-akhmetov)
|
||||
- **Alerting:** Track central ash interactions [#90330](https://github.com/grafana/grafana/pull/90330), [@soniaAguilarPeiron](https://github.com/soniaAguilarPeiron)
|
||||
- **Alerting:** Update alerting state history API to authorize access using RBAC [#89579](https://github.com/grafana/grafana/pull/89579), [@yuri-tceretian](https://github.com/yuri-tceretian)
|
||||
- **Alerting:** Update warning message for Telegram parse_mode and default to empty value [#89630](https://github.com/grafana/grafana/pull/89630), [@tomratcliffe](https://github.com/tomratcliffe)
|
||||
- **Alerting:** Use Runbook URL label everywhere and add validation in the alert rule… [#90523](https://github.com/grafana/grafana/pull/90523), [@soniaAguilarPeiron](https://github.com/soniaAguilarPeiron)
|
||||
- **Alerting:** Use cloud notifier types for metadata on Cloud AMs [#91054](https://github.com/grafana/grafana/pull/91054), [@tomratcliffe](https://github.com/tomratcliffe)
|
||||
- **Alerting:** Use stable identifier of a group when export to HCL [#90196](https://github.com/grafana/grafana/pull/90196), [@KyriosGN0](https://github.com/KyriosGN0)
|
||||
- **Alerting:** Use stable identifier of a group,contact point,mute timing when export to HCL [#90917](https://github.com/grafana/grafana/pull/90917), [@KyriosGN0](https://github.com/KyriosGN0)
|
||||
- **Alertmanager:** Support limits for silences [#90826](https://github.com/grafana/grafana/pull/90826), [@santihernandezc](https://github.com/santihernandezc)
|
||||
- **Angular deprecation:** Disable dynamic angular inspector if CheckForPluginUpdates is false [#91194](https://github.com/grafana/grafana/pull/91194), [@xnyo](https://github.com/xnyo)
|
||||
- **App events:** Add "info" variant [#89903](https://github.com/grafana/grafana/pull/89903), [@Clarity-89](https://github.com/Clarity-89)
|
||||
- **Auth:** Add org to role mappings support to AzureAD/Entra integration [#88861](https://github.com/grafana/grafana/pull/88861), [@mgyongyosi](https://github.com/mgyongyosi)
|
||||
- **Auth:** Add organization mapping configuration to the UI [#90003](https://github.com/grafana/grafana/pull/90003), [@mgyongyosi](https://github.com/mgyongyosi)
|
||||
- **Auth:** Add support for escaping colon characters in org_mapping [#89951](https://github.com/grafana/grafana/pull/89951), [@mgyongyosi](https://github.com/mgyongyosi)
|
||||
- **Azure:** Add new Azure infrastructure dashboards [#88869](https://github.com/grafana/grafana/pull/88869), [@yves-chan](https://github.com/yves-chan)
|
||||
- **BrowseDashboards:** Update results when starred param changes [#89944](https://github.com/grafana/grafana/pull/89944), [@Clarity-89](https://github.com/Clarity-89)
|
||||
- **Caching:** Handle memcached reconnects [#91498](https://github.com/grafana/grafana/pull/91498), [@mmandrus](https://github.com/mmandrus)
|
||||
- **Calendar:** Add labels for next/previous month [#89019](https://github.com/grafana/grafana/pull/89019), [@ashharrison90](https://github.com/ashharrison90)
|
||||
- **Canvas:** Element level data links [#89079](https://github.com/grafana/grafana/pull/89079), [@adela-almasan](https://github.com/adela-almasan)
|
||||
- **Canvas:** Improved tooltip [#90162](https://github.com/grafana/grafana/pull/90162), [@adela-almasan](https://github.com/adela-almasan)
|
||||
- **Canvas:** Support template variables in base URL of actions [#91227](https://github.com/grafana/grafana/pull/91227), [@nmarrs](https://github.com/nmarrs)
|
||||
- **Chore:** Add missing build elements to Dockerfile [#89714](https://github.com/grafana/grafana/pull/89714), [@azilly-de](https://github.com/azilly-de)
|
||||
- **Chore:** Add unit test for cloudmigration package [#88868](https://github.com/grafana/grafana/pull/88868), [@leandro-deveikis](https://github.com/leandro-deveikis)
|
||||
- **Chore:** Commit results of bingo get [#90256](https://github.com/grafana/grafana/pull/90256), [@mmandrus](https://github.com/mmandrus)
|
||||
- **CloudMigrations:** Change onPremToCloudMigrations feature toggle to public preview [#90757](https://github.com/grafana/grafana/pull/90757), [@mmandrus](https://github.com/mmandrus)
|
||||
- **CloudWatch:** Add errorsource for QueryData [#91085](https://github.com/grafana/grafana/pull/91085), [@iwysiu](https://github.com/iwysiu)
|
||||
- **CloudWatch:** Update grafana-aws-sdk for updated metrics [#91364](https://github.com/grafana/grafana/pull/91364), [@iwysiu](https://github.com/iwysiu)
|
||||
- **Cloudwatch:** Clear cached PDC transport when PDC is disabled [#91357](https://github.com/grafana/grafana/pull/91357), [@njvrzm](https://github.com/njvrzm)
|
||||
- **Cloudwatch:** Metrics Query Builder should clear old query [#88950](https://github.com/grafana/grafana/pull/88950), [@iwysiu](https://github.com/iwysiu)
|
||||
- **Cloudwatch:** Remove awsDatasourcesNewFormStyling feature toggle [#90128](https://github.com/grafana/grafana/pull/90128), [@idastambuk](https://github.com/idastambuk)
|
||||
- **Cloudwatch:** Rename Metric Query to Metric Insights [#89955](https://github.com/grafana/grafana/pull/89955), [@idastambuk](https://github.com/idastambuk)
|
||||
- **Cloudwatch:** Round up endTime in GetMetricData to next minute [#89341](https://github.com/grafana/grafana/pull/89341), [@idastambuk](https://github.com/idastambuk)
|
||||
- **Dashboard:** Use preferred timezone on create [#89833](https://github.com/grafana/grafana/pull/89833), [@Clarity-89](https://github.com/Clarity-89)
|
||||
- **Datalinks:** UX improvements [#91352](https://github.com/grafana/grafana/pull/91352), [@adela-almasan](https://github.com/adela-almasan)
|
||||
- **DateTimePicker:** Add "timeZone" prop [#90031](https://github.com/grafana/grafana/pull/90031), [@Clarity-89](https://github.com/Clarity-89)
|
||||
- **Dynatrace:** Add to list of DS with custom label logic [#90258](https://github.com/grafana/grafana/pull/90258), [@fabrizio-grafana](https://github.com/fabrizio-grafana)
|
||||
- **Elasticsearch:** Decouple backend from infra/http [#90408](https://github.com/grafana/grafana/pull/90408), [@njvrzm](https://github.com/njvrzm)
|
||||
- **Elasticsearch:** Decouple backend from infra/log [#90527](https://github.com/grafana/grafana/pull/90527), [@njvrzm](https://github.com/njvrzm)
|
||||
- **Elasticsearch:** Decouple backend from infra/tracing [#90528](https://github.com/grafana/grafana/pull/90528), [@njvrzm](https://github.com/njvrzm)
|
||||
- **Explore:** Add setting for default time offset [#90401](https://github.com/grafana/grafana/pull/90401), [@gelicia](https://github.com/gelicia)
|
||||
- **Feat:** Extending report interaction with static context that can be appended to all interaction events [#88927](https://github.com/grafana/grafana/pull/88927), [@tolzhabayev](https://github.com/tolzhabayev)
|
||||
- **Feature management:** Add openSearchBackendFlowEnabled feature toggle [#89208](https://github.com/grafana/grafana/pull/89208), [@idastambuk](https://github.com/idastambuk)
|
||||
- **Features:** Add cloudwatchMetricInsightsCrossAccount feature toggle [#89848](https://github.com/grafana/grafana/pull/89848), [@idastambuk](https://github.com/idastambuk)
|
||||
- **Features:** Release Cloudwatch Metric Insights cross-account querying to public preview [#91066](https://github.com/grafana/grafana/pull/91066), [@idastambuk](https://github.com/idastambuk)
|
||||
- **FlameGraph:** Remove flameGraphItemCollapsing feature toggle [#90190](https://github.com/grafana/grafana/pull/90190), [@joey-grafana](https://github.com/joey-grafana)
|
||||
- **GCP:** Update GKE monitoring dashboard [#90091](https://github.com/grafana/grafana/pull/90091), [@aangelisc](https://github.com/aangelisc)
|
||||
- **GOps:** Add Grafana SLO steps to IRM configuration tracker [#88098](https://github.com/grafana/grafana/pull/88098), [@obetomuniz](https://github.com/obetomuniz)
|
||||
- **Grafana:** Enables use of encrypted certificates with password for https [#91418](https://github.com/grafana/grafana/pull/91418), [@leandro-deveikis](https://github.com/leandro-deveikis)
|
||||
- **IDToken:** Add current user's DisplayName to the ID token [#90992](https://github.com/grafana/grafana/pull/90992), [@colin-stuart](https://github.com/colin-stuart)
|
||||
- **IDToken:** Add current user's Username and UID to the ID token [#90240](https://github.com/grafana/grafana/pull/90240), [@mgyongyosi](https://github.com/mgyongyosi)
|
||||
- **Keybinds:** Allow move time range shortcuts (t left / t right) to be chained [#88904](https://github.com/grafana/grafana/pull/88904), [@joshhunt](https://github.com/joshhunt)
|
||||
- **LibraryPanels:** Use new folder picker when creating a library panel [#89228](https://github.com/grafana/grafana/pull/89228), [@joshhunt](https://github.com/joshhunt)
|
||||
- **Log:** Added panel support for filtering callbacks [#88980](https://github.com/grafana/grafana/pull/88980), [@matyax](https://github.com/matyax)
|
||||
- **Logs:** Add log line to content outline when clicking on datalinks [#90207](https://github.com/grafana/grafana/pull/90207), [@gtk-grafana](https://github.com/gtk-grafana)
|
||||
- **Loki:** Add option to issue forward queries [#91181](https://github.com/grafana/grafana/pull/91181), [@svennergr](https://github.com/svennergr)
|
||||
- **Loki:** Added support for negative numbers in LogQL [#88719](https://github.com/grafana/grafana/pull/88719), [@matyax](https://github.com/matyax)
|
||||
- **Loki:** Also replace `step` with vars [#91031](https://github.com/grafana/grafana/pull/91031), [@svennergr](https://github.com/svennergr)
|
||||
- **Loki:** Remove `instant` query type from Log queries [#90137](https://github.com/grafana/grafana/pull/90137), [@svennergr](https://github.com/svennergr)
|
||||
- **Loki:** Respect pre-selected filters in adhoc filter queries [#89022](https://github.com/grafana/grafana/pull/89022), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
- **MSSQL:** Password auth for Azure AD [#89746](https://github.com/grafana/grafana/pull/89746), [@bossinc](https://github.com/bossinc)
|
||||
- **Metrics:** Add ability to disable classic histogram for HTTP metric [#88315](https://github.com/grafana/grafana/pull/88315), [@hairyhenderson](https://github.com/hairyhenderson)
|
||||
- **Nav:** Add items to saved [#89908](https://github.com/grafana/grafana/pull/89908), [@Clarity-89](https://github.com/Clarity-89)
|
||||
- **OpenAPI:** Document the `/api/health` endpoint [#88203](https://github.com/grafana/grafana/pull/88203), [@julienduchesne](https://github.com/julienduchesne)
|
||||
- **PanelChrome:** Use labelledby for accessible title [#88781](https://github.com/grafana/grafana/pull/88781), [@tskarhed](https://github.com/tskarhed)
|
||||
- **Plugins:** Add filters by update available [#91526](https://github.com/grafana/grafana/pull/91526), [@oshirohugo](https://github.com/oshirohugo)
|
||||
- **Plugins:** Add logs to for plugin management actions [#90587](https://github.com/grafana/grafana/pull/90587), [@oshirohugo](https://github.com/oshirohugo)
|
||||
- **Plugins:** Disable install controls for provisioned plugin in cloud [#90479](https://github.com/grafana/grafana/pull/90479), [@oshirohugo](https://github.com/oshirohugo)
|
||||
- **Plugins:** Expose functions to plugins for checking RBAC permissions [#89047](https://github.com/grafana/grafana/pull/89047), [@jackw](https://github.com/jackw)
|
||||
- **Plugins:** Improve levitate / breaking changes report in grafana/grafana [#89822](https://github.com/grafana/grafana/pull/89822), [@oshirohugo](https://github.com/oshirohugo)
|
||||
- **Plugins:** Support > 1 levels of plugin dependencies [#90174](https://github.com/grafana/grafana/pull/90174), [@wbrowne](https://github.com/wbrowne)
|
||||
- **Plugins:** Update CLI check if plugin is already installed [#91213](https://github.com/grafana/grafana/pull/91213), [@wbrowne](https://github.com/wbrowne)
|
||||
- **Prometheus:** Deprecation message for SigV4 in core Prom [#90250](https://github.com/grafana/grafana/pull/90250), [@bohandley](https://github.com/bohandley)
|
||||
- **Prometheus:** Reintroduce Azure audience override feature flag [#90339](https://github.com/grafana/grafana/pull/90339), [@aangelisc](https://github.com/aangelisc)
|
||||
- **RBAC:** Allow plugins to use scoped actions [#90946](https://github.com/grafana/grafana/pull/90946), [@gamab](https://github.com/gamab)
|
||||
- **RBAC:** Default to plugins.app:access for plugin includes [#90969](https://github.com/grafana/grafana/pull/90969), [@gamab](https://github.com/gamab)
|
||||
- **Restore dashboards:** Add RBAC [#90270](https://github.com/grafana/grafana/pull/90270), [@Clarity-89](https://github.com/Clarity-89)
|
||||
- **Revert:** Calcs: Update diff percent to be a percent [#91563](https://github.com/grafana/grafana/pull/91563), [@Develer](https://github.com/Develer)
|
||||
- **SAML:** Add button to generate a certificate and private key (Enterprise)
|
||||
- **SSO:** Make SAML certificate/private key optional (Enterprise)
|
||||
- **SearchV2:** Support soft deletion [#90217](https://github.com/grafana/grafana/pull/90217), [@ryantxu](https://github.com/ryantxu)
|
||||
- **Select:** Add orange indicator to selected item [#88695](https://github.com/grafana/grafana/pull/88695), [@tskarhed](https://github.com/tskarhed)
|
||||
- **Snapshots:** Remove deprecated option snapshot_remove_expired [#91231](https://github.com/grafana/grafana/pull/91231), [@ryantxu](https://github.com/ryantxu)
|
||||
- **Table panel:** Add alt and title text options to image cell type [#89930](https://github.com/grafana/grafana/pull/89930), [@codeincarnate](https://github.com/codeincarnate)
|
||||
- **Tempo:** Add toggle for streaming [#88685](https://github.com/grafana/grafana/pull/88685), [@fabrizio-grafana](https://github.com/fabrizio-grafana)
|
||||
- **Tempo:** Remove kind=server from metrics summary [#89419](https://github.com/grafana/grafana/pull/89419), [@joey-grafana](https://github.com/joey-grafana)
|
||||
- **Tempo:** Run `go get` [#89335](https://github.com/grafana/grafana/pull/89335), [@fabrizio-grafana](https://github.com/fabrizio-grafana)
|
||||
- **Tempo:** TraceQL metrics step option [#89434](https://github.com/grafana/grafana/pull/89434), [@adrapereira](https://github.com/adrapereira)
|
||||
- **Tempo:** Virtualize tags select to improve performance [#90269](https://github.com/grafana/grafana/pull/90269), [@adrapereira](https://github.com/adrapereira)
|
||||
- **Tempo:** Virtualized search dropdowns for attribute values [#88569](https://github.com/grafana/grafana/pull/88569), [@RonanQuigley](https://github.com/RonanQuigley)
|
||||
- **TimePicker:** Improve screen reader support [#89409](https://github.com/grafana/grafana/pull/89409), [@tskarhed](https://github.com/tskarhed)
|
||||
- **TimeRangePicker:** Add weekStart prop [#89650](https://github.com/grafana/grafana/pull/89650), [@Clarity-89](https://github.com/Clarity-89)
|
||||
- **TimeRangePicker:** Use week start [#89765](https://github.com/grafana/grafana/pull/89765), [@Clarity-89](https://github.com/Clarity-89)
|
||||
- **Tooltip:** Add tooltip support to Histogram [#89196](https://github.com/grafana/grafana/pull/89196), [@adela-almasan](https://github.com/adela-almasan)
|
||||
- **Trace View:** Add Session for this span button [#89656](https://github.com/grafana/grafana/pull/89656), [@javiruiz01](https://github.com/javiruiz01)
|
||||
- **Tracing:** Add regex support for span filters [#89885](https://github.com/grafana/grafana/pull/89885), [@ektasorathia](https://github.com/ektasorathia)
|
||||
- **Transformations:** Add variable support to select groupingToMatrix [#88551](https://github.com/grafana/grafana/pull/88551), [@kazeborja](https://github.com/kazeborja)
|
||||
- **Transformations:** Move transformation variables to general availability [#89111](https://github.com/grafana/grafana/pull/89111), [@samjewell](https://github.com/samjewell)
|
||||
- **Transformations:** Promote add field from calc stat function cumulative and window calcs as generally available [#91160](https://github.com/grafana/grafana/pull/91160), [@nmarrs](https://github.com/nmarrs)
|
||||
- **Transformations:** Promote format string as generally available [#91161](https://github.com/grafana/grafana/pull/91161), [@nmarrs](https://github.com/nmarrs)
|
||||
- **Transformations:** Promote group to nested table as generally available [#90253](https://github.com/grafana/grafana/pull/90253), [@nmarrs](https://github.com/nmarrs)
|
||||
- **Users:** Add config option to control how often last_seen is updated [#88721](https://github.com/grafana/grafana/pull/88721), [@parambath92](https://github.com/parambath92)
|
||||
- **XYChart:** Promote to generally available [#91417](https://github.com/grafana/grafana/pull/91417), [@nmarrs](https://github.com/nmarrs)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Admin:** Fixes logic for enabled a user [#88117](https://github.com/grafana/grafana/pull/88117), [@gonvee](https://github.com/gonvee)
|
||||
- **Alerting:** Add validation for path separators in the rule group edit modal [#90887](https://github.com/grafana/grafana/pull/90887), [@gillesdemey](https://github.com/gillesdemey)
|
||||
- **Alerting:** Allow future relative time [#89405](https://github.com/grafana/grafana/pull/89405), [@gillesdemey](https://github.com/gillesdemey)
|
||||
- **Alerting:** Disable simplified routing when internal alert manager is disabled [#90648](https://github.com/grafana/grafana/pull/90648), [@soniaAguilarPeiron](https://github.com/soniaAguilarPeiron)
|
||||
- **Alerting:** Do not check evaluation interval for external rulers [#89354](https://github.com/grafana/grafana/pull/89354), [@gillesdemey](https://github.com/gillesdemey)
|
||||
- **Alerting:** Do not count rule health for totals [#89349](https://github.com/grafana/grafana/pull/89349), [@gillesdemey](https://github.com/gillesdemey)
|
||||
- **Alerting:** Fix Recording Rules creation issues [#90362](https://github.com/grafana/grafana/pull/90362), [@tomratcliffe](https://github.com/tomratcliffe)
|
||||
- **Alerting:** Fix contact point export 500 error and notifications/receivers missing settings [#90342](https://github.com/grafana/grafana/pull/90342), [@JacobsonMT](https://github.com/JacobsonMT)
|
||||
- **Alerting:** Fix permissions for prometheus rule endpoints [#91409](https://github.com/grafana/grafana/pull/91409), [@yuri-tceretian](https://github.com/yuri-tceretian)
|
||||
- **Alerting:** Fix persisting result fingerprint that is used by recovery threshold [#91224](https://github.com/grafana/grafana/pull/91224), [@yuri-tceretian](https://github.com/yuri-tceretian)
|
||||
- **Alerting:** Fix rule storage to filter by group names using case-sensitive comparison [#88992](https://github.com/grafana/grafana/pull/88992), [@yuri-tceretian](https://github.com/yuri-tceretian)
|
||||
- **Alerting:** Fix saving telegram contact point to Cloud AM config [#89182](https://github.com/grafana/grafana/pull/89182), [@tomratcliffe](https://github.com/tomratcliffe)
|
||||
- **Alerting:** Fix setting of existing Telegram Chat ID value [#89287](https://github.com/grafana/grafana/pull/89287), [@tomratcliffe](https://github.com/tomratcliffe)
|
||||
- **Alerting:** Fix silencing from policy instances [#90417](https://github.com/grafana/grafana/pull/90417), [@soniaAguilarPeiron](https://github.com/soniaAguilarPeiron)
|
||||
- **Alerting:** Fix some status codes returned from provisioning API. [#90117](https://github.com/grafana/grafana/pull/90117), [@stevesg](https://github.com/stevesg)
|
||||
- **Alerting:** Fix stale values associated with states that have gone to NoData, unify values calculation [#89807](https://github.com/grafana/grafana/pull/89807), [@alexweav](https://github.com/alexweav)
|
||||
- **Alerting:** Refactor PromQL-style matcher parsing [#90129](https://github.com/grafana/grafana/pull/90129), [@gillesdemey](https://github.com/gillesdemey)
|
||||
- **Alerting:** Skip fetching alerts for unsaved dashboards [#90061](https://github.com/grafana/grafana/pull/90061), [@gillesdemey](https://github.com/gillesdemey)
|
||||
- **Alerting:** Skip loading alert rules for dashboards when disabled [#89361](https://github.com/grafana/grafana/pull/89361), [@gillesdemey](https://github.com/gillesdemey)
|
||||
- **Alerting:** Support `utf8_strict_mode: false` in Mimir [#90092](https://github.com/grafana/grafana/pull/90092), [@gillesdemey](https://github.com/gillesdemey)
|
||||
- **Alerting:** Time interval Delete API to check for usages in alert rules [#90500](https://github.com/grafana/grafana/pull/90500), [@yuri-tceretian](https://github.com/yuri-tceretian)
|
||||
- **Analytics:** Fix ApplicationInsights integration [#89299](https://github.com/grafana/grafana/pull/89299), [@ashharrison90](https://github.com/ashharrison90)
|
||||
- **Azure Monitor:** Add validation for namespace field in AdvancedResourcePicker when entering a forward slash [#89288](https://github.com/grafana/grafana/pull/89288), [@adamyeats](https://github.com/adamyeats)
|
||||
- **AzureMonitor:** Fix out of bounds error when accessing `metricNamespaceArray` and `resourceNameArray` in `buildResourceURI` [#89222](https://github.com/grafana/grafana/pull/89222), [@adamyeats](https://github.com/adamyeats)
|
||||
- **BrowseDashboards:** Prepend subpath to New Browse Dashboard actions [#89109](https://github.com/grafana/grafana/pull/89109), [@joshhunt](https://github.com/joshhunt)
|
||||
- **CloudWatch:** Fix labels for raw metric search queries [#88943](https://github.com/grafana/grafana/pull/88943), [@iwysiu](https://github.com/iwysiu)
|
||||
- **CloudWatch:** Fix raw queries with dimensions set [#90348](https://github.com/grafana/grafana/pull/90348), [@iwysiu](https://github.com/iwysiu)
|
||||
- **Correlations:** Fix wrong target data source name in the form [#90340](https://github.com/grafana/grafana/pull/90340), [@aocenas](https://github.com/aocenas)
|
||||
- **DashboardScene:** Fixes issue removing override rule [#89124](https://github.com/grafana/grafana/pull/89124), [@torkelo](https://github.com/torkelo)
|
||||
- **DashboardScene:** Fixes lack of re-render when updating field override properties [#88796](https://github.com/grafana/grafana/pull/88796), [@torkelo](https://github.com/torkelo)
|
||||
- **DataSourcePicker:** Create new data source does not work for subpath [#90536](https://github.com/grafana/grafana/pull/90536), [@ivanortegaalba](https://github.com/ivanortegaalba)
|
||||
- **Docs:** Add fixed role UUIDs to docs for terraform provisioning [#89457](https://github.com/grafana/grafana/pull/89457), [@Jguer](https://github.com/Jguer)
|
||||
- **Echo:** Suppress errors from frontend-metrics API call failing [#89379](https://github.com/grafana/grafana/pull/89379), [@joshhunt](https://github.com/joshhunt)
|
||||
- **Explore Metrics:** Implement grouping with metric prefixes [#89481](https://github.com/grafana/grafana/pull/89481), [@itsmylife](https://github.com/itsmylife)
|
||||
- **Fix:** Portuguese Brazilian wasn't loading translations [#89302](https://github.com/grafana/grafana/pull/89302), [@JoaoSilvaGrafana](https://github.com/JoaoSilvaGrafana)
|
||||
- **Folders:** Fix folder pagination for cloud instances with many folders [#90008](https://github.com/grafana/grafana/pull/90008), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
|
||||
- **Folders:** Improve folder move permission checks [#90588](https://github.com/grafana/grafana/pull/90588), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
|
||||
- **InfluxDB:** Fix query builder produces invalid SQL query when using wildcard column name [#89032](https://github.com/grafana/grafana/pull/89032), [@wasim-nihal](https://github.com/wasim-nihal)
|
||||
- **Inspect:** Include only BOM char for excel files [#88994](https://github.com/grafana/grafana/pull/88994), [@ivanortegaalba](https://github.com/ivanortegaalba)
|
||||
- **Jaeger:** Fix calling of search query with the correct time range [#90320](https://github.com/grafana/grafana/pull/90320), [@EgorKluch](https://github.com/EgorKluch)
|
||||
- **Metrics:** Fix internal metrics endpoint not accessible from browser if basic auth is enabled [#86904](https://github.com/grafana/grafana/pull/86904), [@wasim-nihal](https://github.com/wasim-nihal)
|
||||
- **Notifications:** Redact URL from errors [#85687](https://github.com/grafana/grafana/pull/85687), [@alexweav](https://github.com/alexweav)
|
||||
- **PDF:** Fix layout for page-size panel after row (Enterprise)
|
||||
- **Panel:** Fix text aliasing bug when panel is loading [#89538](https://github.com/grafana/grafana/pull/89538), [@ashharrison90](https://github.com/ashharrison90)
|
||||
- **Plugin extensions:** Return react components from `usePluginComponents()` [#89237](https://github.com/grafana/grafana/pull/89237), [@leventebalogh](https://github.com/leventebalogh)
|
||||
- **Plugins:** Ensure grafana cli can install multiple plugin dependencies [#91230](https://github.com/grafana/grafana/pull/91230), [@yincongcyincong](https://github.com/yincongcyincong)
|
||||
- **Prometheus:** Fix interpolating adhoc filters with template variables [#88626](https://github.com/grafana/grafana/pull/88626), [@cazeaux](https://github.com/cazeaux)
|
||||
- **Prometheus:** Fix query builder visualization when a query has by() clause for quantile [#88480](https://github.com/grafana/grafana/pull/88480), [@yuri-rs](https://github.com/yuri-rs)
|
||||
- **QueryEditor:** Break with Scenes because the default query is not empty string [#90583](https://github.com/grafana/grafana/pull/90583), [@ivanortegaalba](https://github.com/ivanortegaalba)
|
||||
- **RBAC:** Fix seeder failures when inserting duplicated permissions (Enterprise)
|
||||
- **RBAC:** List only the folders that the user has access to [#88599](https://github.com/grafana/grafana/pull/88599), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
|
||||
- **Scenes/Dashboards:** Fix issue where changes in panel height weren't saved [#91125](https://github.com/grafana/grafana/pull/91125), [@kaydelaney](https://github.com/kaydelaney)
|
||||
- **Scenes:** Fixes issue with panel repeat height calculation [#90221](https://github.com/grafana/grafana/pull/90221), [@kaydelaney](https://github.com/kaydelaney)
|
||||
- **Scenes:** Implement 't a' shortcut [#89619](https://github.com/grafana/grafana/pull/89619), [@kaydelaney](https://github.com/kaydelaney)
|
||||
- **Table Panel:** Fix Image hover without datalinks [#89751](https://github.com/grafana/grafana/pull/89751), [@codeincarnate](https://github.com/codeincarnate)
|
||||
- **Table component:** Fix sub-table rows not displaying correctly [#89082](https://github.com/grafana/grafana/pull/89082), [@codeincarnate](https://github.com/codeincarnate)
|
||||
- **Tempo:** Fix grpc streaming support over pdc-agent [#89883](https://github.com/grafana/grafana/pull/89883), [@taylor-s-dean](https://github.com/taylor-s-dean)
|
||||
- **Tempo:** Fix query history [#89991](https://github.com/grafana/grafana/pull/89991), [@joey-grafana](https://github.com/joey-grafana)
|
||||
|
||||
### Breaking changes
|
||||
|
||||
- **Folders:** Allow folder editors and admins to create subfolders without any additional permissions [#91215](https://github.com/grafana/grafana/pull/91215), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
|
||||
|
||||
### Plugin development fixes & changes
|
||||
|
||||
- **Runtime:** Add provider and access hook for location service [#90759](https://github.com/grafana/grafana/pull/90759), [@aocenas](https://github.com/aocenas)
|
||||
|
||||
<!-- 11.2.0 END -->
|
||||
<!-- 11.1.5 START -->
|
||||
|
||||
# 11.1.5 (2024-08-27)
|
||||
@@ -550,35 +18,6 @@
|
||||
- **Bugfix:** QueryField typeahead missing background color [#92316](https://github.com/grafana/grafana/pull/92316), [@mckn](https://github.com/mckn)
|
||||
|
||||
<!-- 11.1.5 END -->
|
||||
<!-- 11.0.4 START -->
|
||||
|
||||
# 11.0.4 (2024-08-27)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Alerting:** Fix persisting result fingerprint that is used by recovery threshold [#91328](https://github.com/grafana/grafana/pull/91328), [@yuri-tceretian](https://github.com/yuri-tceretian)
|
||||
- **Auditing:** Fix a possible crash when audit logger parses responses for failed requests (Enterprise)
|
||||
- **RBAC:** Fix seeder failures when inserting duplicated permissions (Enterprise)
|
||||
- **Snapshots:** Fix panic when snapshot_remove_expired is true [#91330](https://github.com/grafana/grafana/pull/91330), [@ryantxu](https://github.com/ryantxu)
|
||||
|
||||
<!-- 11.0.4 END -->
|
||||
<!-- 10.4.8 START -->
|
||||
|
||||
# 10.4.8 (2024-08-27)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Alerting:** Fix persisting result fingerprint that is used by recovery threshold [#91331](https://github.com/grafana/grafana/pull/91331), [@yuri-tceretian](https://github.com/yuri-tceretian)
|
||||
- **Auditing:** Fix a possible crash when audit logger parses responses for failed requests (Enterprise)
|
||||
- **RBAC:** Fix seeder failures when inserting duplicated permissions (Enterprise)
|
||||
- **Snapshots:** Fix panic when snapshot_remove_expired is true [#91329](https://github.com/grafana/grafana/pull/91329), [@ryantxu](https://github.com/ryantxu)
|
||||
|
||||
<!-- 10.4.8 END -->
|
||||
<!-- 10.3.9 START -->
|
||||
|
||||
# 10.3.9 (2024-08-27)
|
||||
|
||||
<!-- 10.3.9 END -->
|
||||
<!-- 11.1.4 START -->
|
||||
|
||||
# 11.1.4 (2024-08-14)
|
||||
@@ -588,24 +27,6 @@
|
||||
- **Swagger:** Fixed CVE-2024-6837.
|
||||
|
||||
<!-- 11.1.4 END -->
|
||||
<!-- 11.0.3 START -->
|
||||
|
||||
# 11.0.3 (2024-08-14)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Swagger:** Fixed CVE-2024-6837.
|
||||
|
||||
<!-- 11.0.3 END -->
|
||||
<!-- 10.4.7 START -->
|
||||
|
||||
# 10.4.7 (2024-08-14)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Swagger:** Fixed CVE-2024-6837.
|
||||
|
||||
<!-- 10.4.7 END -->
|
||||
<!-- 11.1.3 START -->
|
||||
|
||||
# 11.1.3 (2024-07-26)
|
||||
@@ -615,39 +36,11 @@
|
||||
- **RBAC**: Allow plugins to use scoped actions [#90946](https://github.com/grafana/grafana/pull/90946), [@gamab](https://github.com/gamab)
|
||||
|
||||
<!-- 11.1.3 END -->
|
||||
<!-- 11.0.2 START -->
|
||||
<!-- 11.1.2 START -->
|
||||
|
||||
# 11.0.2 (2024-07-25)
|
||||
# 11.1.2 (2024-07-26)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **Alerting:** Update grafana/alerting to c340765c985a12603bbdfcd10576ddfdbf9dc284 [#90388](https://github.com/grafana/grafana/pull/90388), [@yuri-tceretian](https://github.com/yuri-tceretian)
|
||||
- **Prometheus:** Reintroduce Azure audience override feature flag [#90558](https://github.com/grafana/grafana/pull/90558), [@aangelisc](https://github.com/aangelisc)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Alerting:** Skip loading alert rules for dashboards when disabled [#89904](https://github.com/grafana/grafana/pull/89904), [@gillesdemey](https://github.com/gillesdemey)
|
||||
- **Folders:** Improve folder move permission checks [#90849](https://github.com/grafana/grafana/pull/90849), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
|
||||
- **Folders:** Improve folder move permission checks [#90849](https://github.com/grafana/grafana/pull/90849), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
|
||||
- **Folders:** Improve folder move permission checks [#90849](https://github.com/grafana/grafana/pull/90849), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
|
||||
|
||||
<!-- 11.0.2 END -->
|
||||
<!-- 10.4.6 START -->
|
||||
|
||||
# 10.4.6 (2024-07-25)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **Alerting:** Update grafana/alerting to ce0d024b67ea714b06d0f5309025466f50e381ef [#90389](https://github.com/grafana/grafana/pull/90389), [@yuri-tceretian](https://github.com/yuri-tceretian)
|
||||
- **Prometheus:** Reintroduce Azure audience override feature flag [#90557](https://github.com/grafana/grafana/pull/90557), [@aangelisc](https://github.com/aangelisc)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Alerting:** Fix panic in provisioning filter contacts by unknown name [#90440](https://github.com/grafana/grafana/pull/90440), [@JacobsonMT](https://github.com/JacobsonMT)
|
||||
- **Alerting:** Skip loading alert rules for dashboards when disabled [v10.4.x] [#90331](https://github.com/grafana/grafana/pull/90331), [@gillesdemey](https://github.com/gillesdemey)
|
||||
- **Echo:** Suppress errors from frontend-metrics API call failing [#89498](https://github.com/grafana/grafana/pull/89498), [@joshhunt](https://github.com/joshhunt)
|
||||
|
||||
<!-- 10.4.6 END -->
|
||||
<!-- 11.1.2 END -->
|
||||
<!-- 11.1.1 START -->
|
||||
|
||||
# 11.1.1 (2024-07-25)
|
||||
@@ -912,43 +305,6 @@ The `grafana.explore.richHistory.activeDatasourceOnly` local storage key is depr
|
||||
- **GrafanaUI:** Add `tabular` prop to Text component for tabular numbers. [#87440](https://github.com/grafana/grafana/issues/87440), [@JoaoSilvaGrafana](https://github.com/JoaoSilvaGrafana)
|
||||
|
||||
<!-- 11.1.0 END -->
|
||||
<!-- 11.0.1 START -->
|
||||
|
||||
# 11.0.1 (2024-06-21)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Echo:** Suppress errors from frontend-metrics API call failing. [#89493](https://github.com/grafana/grafana/issues/89493), [@joshhunt](https://github.com/joshhunt)
|
||||
- **Fix:** Portuguese Brazilian wasn't loading translations. [#89374](https://github.com/grafana/grafana/issues/89374), [@JoaoSilvaGrafana](https://github.com/JoaoSilvaGrafana)
|
||||
- **Analytics:** Fix ApplicationInsights integration. [#89300](https://github.com/grafana/grafana/issues/89300), [@ashharrison90](https://github.com/ashharrison90)
|
||||
- **DashboardScene:** Fixes issue removing override rule. [#89134](https://github.com/grafana/grafana/issues/89134), [@torkelo](https://github.com/torkelo)
|
||||
- **BrowseDashboards:** Prepend subpath to New Browse Dashboard actions. [#89130](https://github.com/grafana/grafana/issues/89130), [@joshhunt](https://github.com/joshhunt)
|
||||
- **Alerting:** Fix rule storage to filter by group names using case-sensitive comparison. [#89063](https://github.com/grafana/grafana/issues/89063), [@yuri-tceretian](https://github.com/yuri-tceretian)
|
||||
- **RBAC:** List only the folders that the user has access to. [#89015](https://github.com/grafana/grafana/issues/89015), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
|
||||
- **DashboardScene:** Fixes lack of re-render when updating field override properties. [#88985](https://github.com/grafana/grafana/issues/88985), [@torkelo](https://github.com/torkelo)
|
||||
- **DashboardScene:** Fixes inspect with transforms issue. [#88862](https://github.com/grafana/grafana/issues/88862), [@torkelo](https://github.com/torkelo)
|
||||
- **AzureMonitor:** Fix bug detecting app insights queries. [#88787](https://github.com/grafana/grafana/issues/88787), [@aangelisc](https://github.com/aangelisc)
|
||||
- **Access Control:** Clean up permissions for deprovisioned data sources. [#88700](https://github.com/grafana/grafana/issues/88700), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
|
||||
- **Loki:** Fix editor history in wrong order. [#88669](https://github.com/grafana/grafana/issues/88669), [@svennergr](https://github.com/svennergr)
|
||||
- **SSE:** Fix threshold unmarshal to avoid panic. [#88651](https://github.com/grafana/grafana/issues/88651), [@yuri-tceretian](https://github.com/yuri-tceretian)
|
||||
- **LibraryPanels/RBAC:** Ignore old folder permission check when deleting/patching lib panel. [#88493](https://github.com/grafana/grafana/issues/88493), [@kaydelaney](https://github.com/kaydelaney)
|
||||
- **Dashboards:** Correctly display Admin access to dashboards in the UI. [#88473](https://github.com/grafana/grafana/issues/88473), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
|
||||
- **LogsTable:** Fix default sort by time. [#88434](https://github.com/grafana/grafana/issues/88434), [@svennergr](https://github.com/svennergr)
|
||||
- **Alerting:** Fix rules deleting when reordering whilst filtered. [#88285](https://github.com/grafana/grafana/issues/88285), [@gillesdemey](https://github.com/gillesdemey)
|
||||
- **Alerting:** Fix typo in JSON response for rule export. [#88090](https://github.com/grafana/grafana/issues/88090), [@yuri-tceretian](https://github.com/yuri-tceretian)
|
||||
- **CloudMonitoring:** Fix query type selection issue. [#88024](https://github.com/grafana/grafana/issues/88024), [@aangelisc](https://github.com/aangelisc)
|
||||
- **Alerting:** Fix scheduler to sort rules before evaluation. [#88021](https://github.com/grafana/grafana/issues/88021), [@yuri-tceretian](https://github.com/yuri-tceretian)
|
||||
- **DashboardScene:** Skip panel repeats when values are the same. [#87896](https://github.com/grafana/grafana/issues/87896), [@torkelo](https://github.com/torkelo)
|
||||
- **Alerting:** Do not store series values from past evaluations in state manager for no reason. [#87845](https://github.com/grafana/grafana/issues/87845), [@alexweav](https://github.com/alexweav)
|
||||
- **DashboardScene:** Fixing major row repeat issues. [#87800](https://github.com/grafana/grafana/issues/87800), [@torkelo](https://github.com/torkelo)
|
||||
- **DashboardScene:** Fixes checkbox orienation in save forms. [#86490](https://github.com/grafana/grafana/issues/86490), [@torkelo](https://github.com/torkelo)
|
||||
- **Provisioning:** Add override option to role provisioning. (Enterprise)
|
||||
|
||||
### Breaking changes
|
||||
|
||||
If you had selected your language as "Português Brasileiro" previously, this will be reset. You have to select it again in your Preferences for the fix to be applied and the translations will then be shown. Issue [#89374](https://github.com/grafana/grafana/issues/89374)
|
||||
|
||||
<!-- 11.0.1 END -->
|
||||
<!-- 11.0.0 START -->
|
||||
|
||||
# 11.0.0 (2024-05-14)
|
||||
@@ -1301,33 +657,6 @@ The deprecated `email` field to send a report via `/api/reports/email` endpoint
|
||||
- **Grafana UI:** Add code variant to Text component. [#82318](https://github.com/grafana/grafana/issues/82318), [@tskarhed](https://github.com/tskarhed)
|
||||
|
||||
<!-- 11.0.0-preview END -->
|
||||
<!-- 10.4.5 START -->
|
||||
|
||||
# 10.4.5 (2024-06-21)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Echo:** Suppress errors from frontend-metrics API call failing. [#89498](https://github.com/grafana/grafana/issues/89498), [@joshhunt](https://github.com/joshhunt)
|
||||
- **Azure Monitor:** Add validation for namespace field in AdvancedResourcePicker when entering a forward slash. [#89313](https://github.com/grafana/grafana/issues/89313), [@adamyeats](https://github.com/adamyeats)
|
||||
|
||||
<!-- 10.4.5 END -->
|
||||
<!-- 10.4.4 START -->
|
||||
|
||||
# 10.4.4 (2024-06-13)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **BrowseDashboards:** Prepend subpath to New Browse Dashboard actions. [#89129](https://github.com/grafana/grafana/issues/89129), [@joshhunt](https://github.com/joshhunt)
|
||||
- **Alerting:** Fix rule storage to filter by group names using case-sensitive comparison. [#89061](https://github.com/grafana/grafana/issues/89061), [@yuri-tceretian](https://github.com/yuri-tceretian)
|
||||
- **Alerting:** Fix editing Grafana folder via alert rule editor. [#88907](https://github.com/grafana/grafana/issues/88907), [@gillesdemey](https://github.com/gillesdemey)
|
||||
- **AzureMonitor:** Fix bug detecting app insights queries. [#88786](https://github.com/grafana/grafana/issues/88786), [@aangelisc](https://github.com/aangelisc)
|
||||
- **AuthN:** Fix signout redirect url. [#88749](https://github.com/grafana/grafana/issues/88749), [@kalleep](https://github.com/kalleep)
|
||||
- **SSE:** Fix threshold unmarshal to avoid panic. [#88650](https://github.com/grafana/grafana/issues/88650), [@yuri-tceretian](https://github.com/yuri-tceretian)
|
||||
- **Alerting:** Fix typo in JSON response for rule export. [#88094](https://github.com/grafana/grafana/issues/88094), [@yuri-tceretian](https://github.com/yuri-tceretian)
|
||||
- **CloudMonitoring:** Fix query type selection issue. [#88023](https://github.com/grafana/grafana/issues/88023), [@aangelisc](https://github.com/aangelisc)
|
||||
- **Provisioning:** Add override option to role provisioning. (Enterprise)
|
||||
|
||||
<!-- 10.4.4 END -->
|
||||
<!-- 10.4.3 START -->
|
||||
|
||||
# 10.4.3 (2024-05-13)
|
||||
@@ -1612,15 +941,6 @@ Any consumers of the specific API should be appropriately adapted. Issue [#74600
|
||||
- **Grafana/UI:** Add new Splitter component . [#82357](https://github.com/grafana/grafana/issues/82357), [@torkelo](https://github.com/torkelo)
|
||||
|
||||
<!-- 10.4.0 END -->
|
||||
<!-- 10.3.7 START -->
|
||||
|
||||
# 10.3.7 (2024-06-21)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Echo:** Suppress errors from frontend-metrics API call failing. [#89497](https://github.com/grafana/grafana/issues/89497), [@joshhunt](https://github.com/joshhunt)
|
||||
|
||||
<!-- 10.3.7 END -->
|
||||
<!-- 10.3.6 START -->
|
||||
|
||||
# 10.3.6 (2024-05-13)
|
||||
@@ -1797,15 +1117,6 @@ Users who have InfluxDB datasource configured with SQL querying language must up
|
||||
Removes `NamespaceID` from responses of all GET routes underneath the path `/api/ruler/grafana/api/v1/rules` - 3 affected endpoints. All affected routes are not in the publicly documented or `stable` marked portion of the ngalert API. This only breaks clients who are directly using the unstable portion of the API. Such clients should use `NamespaceUID` rather than `NamespaceID` to identify namespaces. Issue [#79359](https://github.com/grafana/grafana/issues/79359)
|
||||
|
||||
<!-- 10.3.0 END -->
|
||||
<!-- 10.2.8 START -->
|
||||
|
||||
# 10.2.8 (2024-06-21)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Elasticsearch:** Fix URL creation and allowlist for `/_mapping` requests. [#87711](https://github.com/grafana/grafana/issues/87711), [@svennergr](https://github.com/svennergr)
|
||||
|
||||
<!-- 10.2.8 END -->
|
||||
<!-- 10.2.7 START -->
|
||||
|
||||
# 10.2.7 (2024-05-13)
|
||||
@@ -3629,11 +2940,6 @@ The `database` field has been deprecated in the Elasticsearch datasource provisi
|
||||
- **InteractiveTable:** Updated design and minor tweak to Correlactions page. [#66443](https://github.com/grafana/grafana/issues/66443), [@torkelo](https://github.com/torkelo)
|
||||
|
||||
<!-- 10.0.0-preview END -->
|
||||
<!-- 9.5.20 START -->
|
||||
|
||||
# 9.5.20 (2024-06-21)
|
||||
|
||||
<!-- 9.5.20 END -->
|
||||
<!-- 9.5.19 START -->
|
||||
|
||||
# 9.5.19 (2024-05-13)
|
||||
|
||||
54
Dockerfile
54
Dockerfile
@@ -1,19 +1,14 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
|
||||
# to maintain formatting of multiline commands in vscode, add the following to settings.json:
|
||||
# "docker.languageserver.formatter.ignoreMultilineInstructions": true
|
||||
|
||||
ARG BASE_IMAGE=alpine:3.21
|
||||
ARG BASE_IMAGE=alpine:3.19.1
|
||||
ARG JS_IMAGE=node:20-alpine
|
||||
ARG JS_PLATFORM=linux/amd64
|
||||
ARG GO_IMAGE=golang:1.24.2-alpine
|
||||
ARG GO_IMAGE=golang:1.22.4-alpine
|
||||
|
||||
# Default to building locally
|
||||
ARG GO_SRC=go-builder
|
||||
ARG JS_SRC=js-builder
|
||||
|
||||
# Javascript build stage
|
||||
FROM --platform=${JS_PLATFORM} ${JS_IMAGE} AS js-builder
|
||||
FROM --platform=${JS_PLATFORM} ${JS_IMAGE} as js-builder
|
||||
|
||||
ENV NODE_OPTIONS=--max_old_space_size=8000
|
||||
|
||||
@@ -25,7 +20,6 @@ COPY packages packages
|
||||
COPY plugins-bundled plugins-bundled
|
||||
COPY public public
|
||||
COPY LICENSE ./
|
||||
COPY conf/defaults.ini ./conf/defaults.ini
|
||||
|
||||
RUN apk add --no-cache make build-base python3
|
||||
|
||||
@@ -38,8 +32,7 @@ COPY emails emails
|
||||
ENV NODE_ENV production
|
||||
RUN yarn build
|
||||
|
||||
# Golang build stage
|
||||
FROM ${GO_IMAGE} AS go-builder
|
||||
FROM ${GO_IMAGE} as go-builder
|
||||
|
||||
ARG COMMIT_SHA=""
|
||||
ARG BUILD_BRANCH=""
|
||||
@@ -51,7 +44,6 @@ RUN if grep -i -q alpine /etc/issue; then \
|
||||
apk add --no-cache \
|
||||
# This is required to allow building on arm64 due to https://github.com/golang/go/issues/22040
|
||||
binutils-gold \
|
||||
bash \
|
||||
# Install build dependencies
|
||||
gcc g++ make git; \
|
||||
fi
|
||||
@@ -65,14 +57,8 @@ COPY .bingo .bingo
|
||||
COPY pkg/util/xorm/go.* pkg/util/xorm/
|
||||
COPY pkg/apiserver/go.* pkg/apiserver/
|
||||
COPY pkg/apimachinery/go.* pkg/apimachinery/
|
||||
COPY pkg/build/go.* pkg/build/
|
||||
COPY pkg/build/wire/go.* pkg/build/wire/
|
||||
COPY pkg/promlib/go.* pkg/promlib/
|
||||
COPY pkg/storage/unified/resource/go.* pkg/storage/unified/resource/
|
||||
COPY pkg/storage/unified/apistore/go.* pkg/storage/unified/apistore/
|
||||
COPY pkg/semconv/go.* pkg/semconv/
|
||||
COPY pkg/aggregator/go.* pkg/aggregator/
|
||||
COPY apps/playlist/go.* apps/playlist/
|
||||
|
||||
RUN go mod download
|
||||
RUN if [[ "$BINGO" = "true" ]]; then \
|
||||
@@ -97,8 +83,7 @@ ENV BUILD_BRANCH=${BUILD_BRANCH}
|
||||
|
||||
RUN make build-go GO_BUILD_TAGS=${GO_BUILD_TAGS} WIRE_TAGS=${WIRE_TAGS}
|
||||
|
||||
# From-tarball build stage
|
||||
FROM ${BASE_IMAGE} AS tgz-builder
|
||||
FROM ${BASE_IMAGE} as tgz-builder
|
||||
|
||||
WORKDIR /tmp/grafana
|
||||
|
||||
@@ -110,8 +95,8 @@ COPY ${GRAFANA_TGZ} /tmp/grafana.tar.gz
|
||||
RUN tar x -z -f /tmp/grafana.tar.gz --strip-components=1
|
||||
|
||||
# helpers for COPY --from
|
||||
FROM ${GO_SRC} AS go-src
|
||||
FROM ${JS_SRC} AS js-src
|
||||
FROM ${GO_SRC} as go-src
|
||||
FROM ${JS_SRC} as js-src
|
||||
|
||||
# Final stage
|
||||
FROM ${BASE_IMAGE}
|
||||
@@ -146,20 +131,19 @@ RUN if grep -i -q alpine /etc/issue; then \
|
||||
fi
|
||||
|
||||
# glibc support for alpine x86_64 only
|
||||
# docker run --rm --env STDOUT=1 sgerrand/glibc-builder 2.40 /usr/glibc-compat > glibc-bin-2.40.tar.gz
|
||||
ARG GLIBC_VERSION=2.40
|
||||
|
||||
RUN if grep -i -q alpine /etc/issue && [ `arch` = "x86_64" ]; then \
|
||||
wget -qO- "https://dl.grafana.com/glibc/glibc-bin-$GLIBC_VERSION.tar.gz" | tar zxf - -C / \
|
||||
usr/glibc-compat/lib/ld-linux-x86-64.so.2 \
|
||||
usr/glibc-compat/lib/libc.so.6 \
|
||||
usr/glibc-compat/lib/libdl.so.2 \
|
||||
usr/glibc-compat/lib/libm.so.6 \
|
||||
usr/glibc-compat/lib/libpthread.so.0 \
|
||||
usr/glibc-compat/lib/librt.so.1 \
|
||||
usr/glibc-compat/lib/libresolv.so.2 && \
|
||||
mkdir /lib64 && \
|
||||
ln -s /usr/glibc-compat/lib/ld-linux-x86-64.so.2 /lib64; \
|
||||
wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub && \
|
||||
wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.35-r0/glibc-2.35-r0.apk \
|
||||
-O /tmp/glibc-2.35-r0.apk && \
|
||||
wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.35-r0/glibc-bin-2.35-r0.apk \
|
||||
-O /tmp/glibc-bin-2.35-r0.apk && \
|
||||
apk add --force-overwrite --no-cache /tmp/glibc-2.35-r0.apk /tmp/glibc-bin-2.35-r0.apk && \
|
||||
rm -f /lib64/ld-linux-x86-64.so.2 && \
|
||||
ln -s /usr/glibc-compat/lib64/ld-linux-x86-64.so.2 /lib64/ld-linux-x86-64.so.2 && \
|
||||
rm -f /tmp/glibc-2.35-r0.apk && \
|
||||
rm -f /tmp/glibc-bin-2.35-r0.apk && \
|
||||
rm -f /lib/ld-linux-x86-64.so.2 && \
|
||||
rm -f /etc/ld.so.cache; \
|
||||
fi
|
||||
|
||||
COPY --from=go-src /tmp/grafana/conf ./conf
|
||||
|
||||
74
Makefile
74
Makefile
@@ -7,10 +7,10 @@ WIRE_TAGS = "oss"
|
||||
-include local/Makefile
|
||||
include .bingo/Variables.mk
|
||||
|
||||
|
||||
GO = go
|
||||
GO_VERSION = 1.24.2
|
||||
GO_LINT_FILES ?= $(shell ./scripts/go-workspace/golangci-lint-includes.sh)
|
||||
GO_TEST_FILES ?= $(shell ./scripts/go-workspace/test-includes.sh)
|
||||
GO_VERSION = 1.22.4
|
||||
GO_FILES ?= ./pkg/... ./pkg/apiserver/... ./pkg/apimachinery/... ./pkg/promlib/...
|
||||
SH_FILES ?= $(shell find ./scripts -name *.sh)
|
||||
GO_RACE := $(shell [ -n "$(GO_RACE)" -o -e ".go-race-enabled-locally" ] && echo 1 )
|
||||
GO_RACE_FLAG := $(if $(GO_RACE),-race)
|
||||
@@ -18,9 +18,6 @@ GO_BUILD_FLAGS += $(if $(GO_BUILD_DEV),-dev)
|
||||
GO_BUILD_FLAGS += $(if $(GO_BUILD_TAGS),-build-tags=$(GO_BUILD_TAGS))
|
||||
GO_BUILD_FLAGS += $(GO_RACE_FLAG)
|
||||
|
||||
# GNU xargs has flag -r, and BSD xargs (e.g. MacOS) has that behaviour by default
|
||||
XARGSR = $(shell xargs --version 2>&1 | grep -q GNU && echo xargs -r || echo xargs)
|
||||
|
||||
targets := $(shell echo '$(sources)' | tr "," " ")
|
||||
|
||||
GO_INTEGRATION_TESTS := $(shell find ./pkg -type f -name '*_test.go' -exec grep -l '^func TestIntegration' '{}' '+' | grep -o '\(.*\)/' | sort -u)
|
||||
@@ -64,7 +61,6 @@ swagger-oss-gen: $(SWAGGER) ## Generate API Swagger specification
|
||||
rm -f $(SPEC_TARGET)
|
||||
SWAGGER_GENERATE_EXTENSION=false $(SWAGGER) generate spec -q -m -w pkg/server -o $(SPEC_TARGET) \
|
||||
-x "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" \
|
||||
-x "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" \
|
||||
-x "github.com/prometheus/alertmanager" \
|
||||
-i pkg/api/swagger_tags.json \
|
||||
--exclude-tag=alpha \
|
||||
@@ -82,7 +78,6 @@ swagger-enterprise-gen: $(SWAGGER) ## Generate API Swagger specification
|
||||
rm -f $(ENTERPRISE_SPEC_TARGET)
|
||||
SWAGGER_GENERATE_EXTENSION=false $(SWAGGER) generate spec -q -m -w pkg/server -o $(ENTERPRISE_SPEC_TARGET) \
|
||||
-x "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" \
|
||||
-x "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" \
|
||||
-x "github.com/prometheus/alertmanager" \
|
||||
-i pkg/api/swagger_tags.json \
|
||||
--exclude-tag=alpha \
|
||||
@@ -172,13 +167,8 @@ fix-cue: $(CUE)
|
||||
gen-jsonnet:
|
||||
go generate ./devenv/jsonnet
|
||||
|
||||
.PHONY: update-workspace
|
||||
update-workspace:
|
||||
@echo "updating workspace"
|
||||
bash scripts/go-workspace/update-workspace.sh
|
||||
|
||||
.PHONY: build-go
|
||||
build-go: gen-go update-workspace ## Build all Go binaries.
|
||||
build-go: gen-go ## Build all Go binaries.
|
||||
@echo "build go files"
|
||||
$(GO) run build.go $(GO_BUILD_FLAGS) build
|
||||
|
||||
@@ -219,13 +209,13 @@ build-plugin-go: ## Build decoupled plugins
|
||||
build: build-go build-js ## Build backend and frontend.
|
||||
|
||||
.PHONY: run
|
||||
run: $(BRA) ## Build and run web server on filesystem changes. See /.bra.toml for configuration.
|
||||
run: $(BRA) ## Build and run web server on filesystem changes.
|
||||
$(BRA) run
|
||||
|
||||
.PHONY: run-go
|
||||
run-go: ## Build and run web server immediately.
|
||||
$(GO) run -race $(if $(GO_BUILD_TAGS),-build-tags=$(GO_BUILD_TAGS)) \
|
||||
./pkg/cmd/grafana -- server -profile -profile-addr=127.0.0.1 -profile-port=6000 -packaging=dev cfg:app_mode=development
|
||||
./pkg/cmd/grafana -- server -packaging=dev cfg:app_mode=development
|
||||
|
||||
.PHONY: run-frontend
|
||||
run-frontend: deps-js ## Fetch js dependencies and watch frontend for rebuild
|
||||
@@ -239,17 +229,9 @@ test-go: test-go-unit test-go-integration
|
||||
.PHONY: test-go-unit
|
||||
test-go-unit: ## Run unit tests for backend with flags.
|
||||
@echo "test backend unit tests"
|
||||
printf '$(GO_TEST_FILES)' | xargs \
|
||||
go list -f '{{.Dir}}/...' -m | xargs \
|
||||
$(GO) test $(GO_RACE_FLAG) -short -covermode=atomic -timeout=30m
|
||||
|
||||
.PHONY: test-go-unit-pretty
|
||||
test-go-unit-pretty: check-tparse
|
||||
@if [ -z "$(FILES)" ]; then \
|
||||
echo "Notice: FILES variable is not set. Try \"make test-go-unit-pretty FILES=./pkg/services/mysvc\""; \
|
||||
exit 1; \
|
||||
fi
|
||||
$(GO) test $(GO_RACE_FLAG) -timeout=10s $(FILES) -json | tparse -all
|
||||
|
||||
.PHONY: test-go-integration
|
||||
test-go-integration: ## Run integration tests for backend with flags.
|
||||
@echo "test backend integration tests"
|
||||
@@ -300,20 +282,11 @@ test: test-go test-js ## Run all tests.
|
||||
golangci-lint: $(GOLANGCI_LINT)
|
||||
@echo "lint via golangci-lint"
|
||||
$(GOLANGCI_LINT) run \
|
||||
--config .golangci.yml \
|
||||
$(GO_LINT_FILES)
|
||||
--config .golangci.toml \
|
||||
$(GO_FILES)
|
||||
|
||||
.PHONY: lint-go
|
||||
lint-go: golangci-lint ## Run all code checks for backend. You can use GO_LINT_FILES to specify exact files to check
|
||||
|
||||
.PHONY: lint-go-diff
|
||||
lint-go-diff: $(GOLANGCI_LINT)
|
||||
git diff --name-only remotes/origin/main | \
|
||||
grep '\.go$$' | \
|
||||
$(XARGSR) dirname | \
|
||||
sort -u | \
|
||||
sed 's,^,./,' | \
|
||||
$(XARGSR) $(GOLANGCI_LINT) run --config .golangci.toml
|
||||
lint-go: golangci-lint ## Run all code checks for backend. You can use GO_FILES to specify exact files to check
|
||||
|
||||
# with disabled SC1071 we are ignored some TCL,Expect `/usr/bin/env expect` scripts
|
||||
.PHONY: shellcheck
|
||||
@@ -358,32 +331,27 @@ build-docker-full-ubuntu: ## Build Docker image based on Ubuntu for development.
|
||||
|
||||
##@ Services
|
||||
|
||||
COMPOSE := $(shell if docker compose --help >/dev/null 2>&1; then echo docker compose; else echo docker-compose; fi)
|
||||
ifeq ($(COMPOSE),docker-compose)
|
||||
$(warning From July 2023 Compose V1 (docker-compose) stopped receiving updates. Migrate to Compose V2 (docker compose). https://docs.docker.com/compose/migrate/)
|
||||
endif
|
||||
|
||||
# Create a Docker Compose file with provided sources and start them.
|
||||
# For example, `make devenv sources=postgres,auth/openldap`
|
||||
# create docker-compose file with provided sources and start them
|
||||
# example: make devenv sources=postgres,auth/openldap
|
||||
.PHONY: devenv
|
||||
ifeq ($(sources),)
|
||||
devenv:
|
||||
@printf 'You have to define sources for this command \nexample: make devenv sources=postgres,auth/openldap\n'
|
||||
@printf 'You have to define sources for this command \nexample: make devenv sources=postgres,openldap\n'
|
||||
else
|
||||
devenv: devenv-down ## Start optional services like Postgresql, Prometheus, or Elasticsearch.
|
||||
devenv: devenv-down ## Start optional services, e.g. postgres, prometheus, and elasticsearch.
|
||||
@cd devenv; \
|
||||
./create_docker_compose.sh $(targets) || \
|
||||
(rm -rf {docker-compose.yaml,conf.tmp,.env}; exit 1)
|
||||
|
||||
@cd devenv; \
|
||||
$(COMPOSE) up -d --build
|
||||
docker-compose up -d --build
|
||||
endif
|
||||
|
||||
.PHONY: devenv-down
|
||||
devenv-down: ## Stop optional services.
|
||||
@cd devenv; \
|
||||
test -f docker-compose.yaml && \
|
||||
$(COMPOSE) down || exit 0;
|
||||
docker-compose down || exit 0;
|
||||
|
||||
.PHONY: devenv-postgres
|
||||
devenv-postgres:
|
||||
@@ -407,10 +375,10 @@ devenv-mysql:
|
||||
protobuf: ## Compile protobuf definitions
|
||||
bash scripts/protobuf-check.sh
|
||||
go install google.golang.org/protobuf/cmd/protoc-gen-go
|
||||
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.4.0
|
||||
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
|
||||
buf generate pkg/plugins/backendplugin/pluginextensionv2 --template pkg/plugins/backendplugin/pluginextensionv2/buf.gen.yaml
|
||||
buf generate pkg/plugins/backendplugin/secretsmanagerplugin --template pkg/plugins/backendplugin/secretsmanagerplugin/buf.gen.yaml
|
||||
buf generate pkg/storage/unified/resource --template pkg/storage/unified/resource/buf.gen.yaml
|
||||
buf generate pkg/services/store/entity --template pkg/services/store/entity/buf.gen.yaml
|
||||
|
||||
.PHONY: clean
|
||||
clean: ## Clean up intermediate build artifacts.
|
||||
@@ -456,12 +424,6 @@ go-race-is-enabled:
|
||||
enable-go-race:
|
||||
@touch .go-race-enabled-locally
|
||||
|
||||
check-tparse:
|
||||
@command -v tparse >/dev/null 2>&1 || { \
|
||||
echo >&2 "Error: tparse is not installed. Refer to https://github.com/mfridman/tparse"; \
|
||||
exit 1; \
|
||||
}
|
||||
|
||||
.PHONY: help
|
||||
help: ## Display this help.
|
||||
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z_-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
module:"notifications"
|
||||
@@ -1,32 +0,0 @@
|
||||
package core
|
||||
|
||||
receiver: {
|
||||
kind: "Receiver"
|
||||
group: "notifications"
|
||||
apiResource: {
|
||||
groupOverride: "notifications.alerting.grafana.app"
|
||||
}
|
||||
codegen: {
|
||||
frontend: false
|
||||
backend: true
|
||||
}
|
||||
pluralName: "Receivers"
|
||||
current: "v0alpha1"
|
||||
versions: {
|
||||
"v0alpha1": {
|
||||
schema: {
|
||||
#Integration: {
|
||||
uid?: string
|
||||
type: string
|
||||
disableResolveMessage?: bool
|
||||
settings: bytes
|
||||
secureFields?: [string]: bool
|
||||
}
|
||||
spec: {
|
||||
title: string
|
||||
integrations : [...#Integration]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
package core
|
||||
|
||||
templateGroup: {
|
||||
kind: "TemplateGroup"
|
||||
group: "notifications"
|
||||
apiResource: {
|
||||
groupOverride: "notifications.alerting.grafana.app"
|
||||
}
|
||||
codegen: {
|
||||
frontend: false
|
||||
backend: true
|
||||
}
|
||||
pluralName: "TemplatesGroups"
|
||||
current: "v0alpha1"
|
||||
versions: {
|
||||
"v0alpha1": {
|
||||
schema: {
|
||||
spec: {
|
||||
title: string
|
||||
content: string
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
package core
|
||||
|
||||
timeInterval: {
|
||||
kind: "TimeInterval"
|
||||
group: "notifications"
|
||||
apiResource: {
|
||||
groupOverride: "notifications.alerting.grafana.app"
|
||||
}
|
||||
codegen: {
|
||||
frontend: false
|
||||
backend: true
|
||||
}
|
||||
pluralName: "TimeIntervals"
|
||||
current: "v0alpha1"
|
||||
versions: {
|
||||
"v0alpha1": {
|
||||
schema: {
|
||||
#TimeRange: {
|
||||
start_time: string
|
||||
end_time: string
|
||||
}
|
||||
#Interval: {
|
||||
times?: [...#TimeRange]
|
||||
weekdays?: [...string]
|
||||
days_of_month?: [...string]
|
||||
months?: [...string]
|
||||
years?: [...string]
|
||||
location?: string
|
||||
}
|
||||
spec: {
|
||||
name: string
|
||||
time_intervals: [...#Interval]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
.PHONY: generate
|
||||
generate:
|
||||
@grafana-app-sdk generate -g ./apis --kindgrouping=group --postprocess
|
||||
@@ -1,28 +0,0 @@
|
||||
//
|
||||
// Code generated by grafana-app-sdk. DO NOT EDIT.
|
||||
//
|
||||
|
||||
package v0alpha1
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"io"
|
||||
|
||||
"github.com/grafana/grafana-app-sdk/resource"
|
||||
)
|
||||
|
||||
// PlaylistJSONCodec is an implementation of resource.Codec for kubernetes JSON encoding
|
||||
type PlaylistJSONCodec struct{}
|
||||
|
||||
// Read reads JSON-encoded bytes from `reader` and unmarshals them into `into`
|
||||
func (*PlaylistJSONCodec) Read(reader io.Reader, into resource.Object) error {
|
||||
return json.NewDecoder(reader).Decode(into)
|
||||
}
|
||||
|
||||
// Write writes JSON-encoded bytes into `writer` marshaled from `from`
|
||||
func (*PlaylistJSONCodec) Write(writer io.Writer, from resource.Object) error {
|
||||
return json.NewEncoder(writer).Encode(from)
|
||||
}
|
||||
|
||||
// Interface compliance checks
|
||||
var _ resource.Codec = &PlaylistJSONCodec{}
|
||||
@@ -1,32 +0,0 @@
|
||||
package v0alpha1
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
// PlaylistMetadata defines model for PlaylistMetadata.
|
||||
type PlaylistMetadata struct {
|
||||
CreatedBy string `json:"createdBy"`
|
||||
CreationTimestamp time.Time `json:"creationTimestamp"`
|
||||
DeletionTimestamp *time.Time `json:"deletionTimestamp,omitempty"`
|
||||
Finalizers []string `json:"finalizers"`
|
||||
Generation int64 `json:"generation"`
|
||||
Labels map[string]string `json:"labels"`
|
||||
ResourceVersion string `json:"resourceVersion"`
|
||||
Uid string `json:"uid"`
|
||||
UpdateTimestamp time.Time `json:"updateTimestamp"`
|
||||
UpdatedBy string `json:"updatedBy"`
|
||||
}
|
||||
|
||||
// _kubeObjectMetadata is metadata found in a kubernetes object's metadata field.
|
||||
// It is not exhaustive and only includes fields which may be relevant to a kind's implementation,
|
||||
// As it is also intended to be generic enough to function with any API Server.
|
||||
type PlaylistKubeObjectMetadata struct {
|
||||
CreationTimestamp time.Time `json:"creationTimestamp"`
|
||||
DeletionTimestamp *time.Time `json:"deletionTimestamp,omitempty"`
|
||||
Finalizers []string `json:"finalizers"`
|
||||
Generation int64 `json:"generation"`
|
||||
Labels map[string]string `json:"labels"`
|
||||
ResourceVersion string `json:"resourceVersion"`
|
||||
Uid string `json:"uid"`
|
||||
}
|
||||
@@ -1,265 +0,0 @@
|
||||
//
|
||||
// Code generated by grafana-app-sdk. DO NOT EDIT.
|
||||
//
|
||||
|
||||
package v0alpha1
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/grafana/grafana-app-sdk/resource"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
"k8s.io/apimachinery/pkg/types"
|
||||
"time"
|
||||
)
|
||||
|
||||
// +k8s:openapi-gen=true
|
||||
type Playlist struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata"`
|
||||
Spec PlaylistSpec `json:"spec"`
|
||||
PlaylistStatus PlaylistStatus `json:"status"`
|
||||
}
|
||||
|
||||
func (o *Playlist) GetSpec() any {
|
||||
return o.Spec
|
||||
}
|
||||
|
||||
func (o *Playlist) SetSpec(spec any) error {
|
||||
cast, ok := spec.(PlaylistSpec)
|
||||
if !ok {
|
||||
return fmt.Errorf("cannot set spec type %#v, not of type Spec", spec)
|
||||
}
|
||||
o.Spec = cast
|
||||
return nil
|
||||
}
|
||||
|
||||
func (o *Playlist) GetSubresources() map[string]any {
|
||||
return map[string]any{
|
||||
"status": o.PlaylistStatus,
|
||||
}
|
||||
}
|
||||
|
||||
func (o *Playlist) GetSubresource(name string) (any, bool) {
|
||||
switch name {
|
||||
case "status":
|
||||
return o.PlaylistStatus, true
|
||||
default:
|
||||
return nil, false
|
||||
}
|
||||
}
|
||||
|
||||
func (o *Playlist) SetSubresource(name string, value any) error {
|
||||
switch name {
|
||||
case "status":
|
||||
cast, ok := value.(PlaylistStatus)
|
||||
if !ok {
|
||||
return fmt.Errorf("cannot set status type %#v, not of type PlaylistStatus", value)
|
||||
}
|
||||
o.PlaylistStatus = cast
|
||||
return nil
|
||||
default:
|
||||
return fmt.Errorf("subresource '%s' does not exist", name)
|
||||
}
|
||||
}
|
||||
|
||||
func (o *Playlist) GetStaticMetadata() resource.StaticMetadata {
|
||||
return resource.StaticMetadata{
|
||||
Name: o.ObjectMeta.Name,
|
||||
Namespace: o.ObjectMeta.Namespace,
|
||||
Group: o.GroupVersionKind().Group,
|
||||
Version: o.GroupVersionKind().Version,
|
||||
Kind: o.GroupVersionKind().Kind,
|
||||
}
|
||||
}
|
||||
|
||||
func (o *Playlist) SetStaticMetadata(metadata resource.StaticMetadata) {
|
||||
o.Name = metadata.Name
|
||||
o.Namespace = metadata.Namespace
|
||||
o.SetGroupVersionKind(schema.GroupVersionKind{
|
||||
Group: metadata.Group,
|
||||
Version: metadata.Version,
|
||||
Kind: metadata.Kind,
|
||||
})
|
||||
}
|
||||
|
||||
func (o *Playlist) GetCommonMetadata() resource.CommonMetadata {
|
||||
dt := o.DeletionTimestamp
|
||||
var deletionTimestamp *time.Time
|
||||
if dt != nil {
|
||||
deletionTimestamp = &dt.Time
|
||||
}
|
||||
// Legacy ExtraFields support
|
||||
extraFields := make(map[string]any)
|
||||
if o.Annotations != nil {
|
||||
extraFields["annotations"] = o.Annotations
|
||||
}
|
||||
if o.ManagedFields != nil {
|
||||
extraFields["managedFields"] = o.ManagedFields
|
||||
}
|
||||
if o.OwnerReferences != nil {
|
||||
extraFields["ownerReferences"] = o.OwnerReferences
|
||||
}
|
||||
return resource.CommonMetadata{
|
||||
UID: string(o.UID),
|
||||
ResourceVersion: o.ResourceVersion,
|
||||
Generation: o.Generation,
|
||||
Labels: o.Labels,
|
||||
CreationTimestamp: o.CreationTimestamp.Time,
|
||||
DeletionTimestamp: deletionTimestamp,
|
||||
Finalizers: o.Finalizers,
|
||||
UpdateTimestamp: o.GetUpdateTimestamp(),
|
||||
CreatedBy: o.GetCreatedBy(),
|
||||
UpdatedBy: o.GetUpdatedBy(),
|
||||
ExtraFields: extraFields,
|
||||
}
|
||||
}
|
||||
|
||||
func (o *Playlist) SetCommonMetadata(metadata resource.CommonMetadata) {
|
||||
o.UID = types.UID(metadata.UID)
|
||||
o.ResourceVersion = metadata.ResourceVersion
|
||||
o.Generation = metadata.Generation
|
||||
o.Labels = metadata.Labels
|
||||
o.CreationTimestamp = metav1.NewTime(metadata.CreationTimestamp)
|
||||
if metadata.DeletionTimestamp != nil {
|
||||
dt := metav1.NewTime(*metadata.DeletionTimestamp)
|
||||
o.DeletionTimestamp = &dt
|
||||
} else {
|
||||
o.DeletionTimestamp = nil
|
||||
}
|
||||
o.Finalizers = metadata.Finalizers
|
||||
if o.Annotations == nil {
|
||||
o.Annotations = make(map[string]string)
|
||||
}
|
||||
if !metadata.UpdateTimestamp.IsZero() {
|
||||
o.SetUpdateTimestamp(metadata.UpdateTimestamp)
|
||||
}
|
||||
if metadata.CreatedBy != "" {
|
||||
o.SetCreatedBy(metadata.CreatedBy)
|
||||
}
|
||||
if metadata.UpdatedBy != "" {
|
||||
o.SetUpdatedBy(metadata.UpdatedBy)
|
||||
}
|
||||
// Legacy support for setting Annotations, ManagedFields, and OwnerReferences via ExtraFields
|
||||
if metadata.ExtraFields != nil {
|
||||
if annotations, ok := metadata.ExtraFields["annotations"]; ok {
|
||||
if cast, ok := annotations.(map[string]string); ok {
|
||||
o.Annotations = cast
|
||||
}
|
||||
}
|
||||
if managedFields, ok := metadata.ExtraFields["managedFields"]; ok {
|
||||
if cast, ok := managedFields.([]metav1.ManagedFieldsEntry); ok {
|
||||
o.ManagedFields = cast
|
||||
}
|
||||
}
|
||||
if ownerReferences, ok := metadata.ExtraFields["ownerReferences"]; ok {
|
||||
if cast, ok := ownerReferences.([]metav1.OwnerReference); ok {
|
||||
o.OwnerReferences = cast
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func (o *Playlist) GetCreatedBy() string {
|
||||
if o.ObjectMeta.Annotations == nil {
|
||||
o.ObjectMeta.Annotations = make(map[string]string)
|
||||
}
|
||||
|
||||
return o.ObjectMeta.Annotations["grafana.com/createdBy"]
|
||||
}
|
||||
|
||||
func (o *Playlist) SetCreatedBy(createdBy string) {
|
||||
if o.ObjectMeta.Annotations == nil {
|
||||
o.ObjectMeta.Annotations = make(map[string]string)
|
||||
}
|
||||
|
||||
o.ObjectMeta.Annotations["grafana.com/createdBy"] = createdBy
|
||||
}
|
||||
|
||||
func (o *Playlist) GetUpdateTimestamp() time.Time {
|
||||
if o.ObjectMeta.Annotations == nil {
|
||||
o.ObjectMeta.Annotations = make(map[string]string)
|
||||
}
|
||||
|
||||
parsed, _ := time.Parse(time.RFC3339, o.ObjectMeta.Annotations["grafana.com/updateTimestamp"])
|
||||
return parsed
|
||||
}
|
||||
|
||||
func (o *Playlist) SetUpdateTimestamp(updateTimestamp time.Time) {
|
||||
if o.ObjectMeta.Annotations == nil {
|
||||
o.ObjectMeta.Annotations = make(map[string]string)
|
||||
}
|
||||
|
||||
o.ObjectMeta.Annotations["grafana.com/updateTimestamp"] = updateTimestamp.Format(time.RFC3339)
|
||||
}
|
||||
|
||||
func (o *Playlist) GetUpdatedBy() string {
|
||||
if o.ObjectMeta.Annotations == nil {
|
||||
o.ObjectMeta.Annotations = make(map[string]string)
|
||||
}
|
||||
|
||||
return o.ObjectMeta.Annotations["grafana.com/updatedBy"]
|
||||
}
|
||||
|
||||
func (o *Playlist) SetUpdatedBy(updatedBy string) {
|
||||
if o.ObjectMeta.Annotations == nil {
|
||||
o.ObjectMeta.Annotations = make(map[string]string)
|
||||
}
|
||||
|
||||
o.ObjectMeta.Annotations["grafana.com/updatedBy"] = updatedBy
|
||||
}
|
||||
|
||||
func (o *Playlist) Copy() resource.Object {
|
||||
return resource.CopyObject(o)
|
||||
}
|
||||
|
||||
func (o *Playlist) DeepCopyObject() runtime.Object {
|
||||
return o.Copy()
|
||||
}
|
||||
|
||||
// Interface compliance compile-time check
|
||||
var _ resource.Object = &Playlist{}
|
||||
|
||||
// +k8s:openapi-gen=true
|
||||
type PlaylistList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ListMeta `json:"metadata"`
|
||||
Items []Playlist `json:"items"`
|
||||
}
|
||||
|
||||
func (o *PlaylistList) DeepCopyObject() runtime.Object {
|
||||
return o.Copy()
|
||||
}
|
||||
|
||||
func (o *PlaylistList) Copy() resource.ListObject {
|
||||
cpy := &PlaylistList{
|
||||
TypeMeta: o.TypeMeta,
|
||||
Items: make([]Playlist, len(o.Items)),
|
||||
}
|
||||
o.ListMeta.DeepCopyInto(&cpy.ListMeta)
|
||||
for i := 0; i < len(o.Items); i++ {
|
||||
if item, ok := o.Items[i].Copy().(*Playlist); ok {
|
||||
cpy.Items[i] = *item
|
||||
}
|
||||
}
|
||||
return cpy
|
||||
}
|
||||
|
||||
func (o *PlaylistList) GetItems() []resource.Object {
|
||||
items := make([]resource.Object, len(o.Items))
|
||||
for i := 0; i < len(o.Items); i++ {
|
||||
items[i] = &o.Items[i]
|
||||
}
|
||||
return items
|
||||
}
|
||||
|
||||
func (o *PlaylistList) SetItems(items []resource.Object) {
|
||||
o.Items = make([]Playlist, len(items))
|
||||
for i := 0; i < len(items); i++ {
|
||||
o.Items[i] = *items[i].(*Playlist)
|
||||
}
|
||||
}
|
||||
|
||||
// Interface compliance compile-time check
|
||||
var _ resource.ListObject = &PlaylistList{}
|
||||
@@ -1,34 +0,0 @@
|
||||
//
|
||||
// Code generated by grafana-app-sdk. DO NOT EDIT.
|
||||
//
|
||||
|
||||
package v0alpha1
|
||||
|
||||
import (
|
||||
"github.com/grafana/grafana-app-sdk/resource"
|
||||
)
|
||||
|
||||
// schema is unexported to prevent accidental overwrites
|
||||
var (
|
||||
schemaPlaylist = resource.NewSimpleSchema("playlist.grafana.app", "v0alpha1", &Playlist{}, &PlaylistList{}, resource.WithKind("Playlist"),
|
||||
resource.WithPlural("playlists"), resource.WithScope(resource.NamespacedScope))
|
||||
kindPlaylist = resource.Kind{
|
||||
Schema: schemaPlaylist,
|
||||
Codecs: map[resource.KindEncoding]resource.Codec{
|
||||
resource.KindEncodingJSON: &PlaylistJSONCodec{},
|
||||
},
|
||||
}
|
||||
)
|
||||
|
||||
// Kind returns a resource.Kind for this Schema with a JSON codec
|
||||
func PlaylistKind() resource.Kind {
|
||||
return kindPlaylist
|
||||
}
|
||||
|
||||
// Schema returns a resource.SimpleSchema representation of Playlist
|
||||
func PlaylistSchema() *resource.SimpleSchema {
|
||||
return schemaPlaylist
|
||||
}
|
||||
|
||||
// Interface compliance checks
|
||||
var _ resource.Schema = kindPlaylist
|
||||
@@ -1,36 +0,0 @@
|
||||
package v0alpha1
|
||||
|
||||
// Defines values for PlaylistItemType.
|
||||
const (
|
||||
PlaylistItemTypeDashboardById PlaylistItemType = "dashboard_by_id"
|
||||
PlaylistItemTypeDashboardByTag PlaylistItemType = "dashboard_by_tag"
|
||||
PlaylistItemTypeDashboardByUid PlaylistItemType = "dashboard_by_uid"
|
||||
)
|
||||
|
||||
// PlaylistItem defines model for PlaylistItem.
|
||||
// +k8s:openapi-gen=true
|
||||
type PlaylistItem struct {
|
||||
// type of the item.
|
||||
Type PlaylistItemType `json:"type"`
|
||||
|
||||
// Value depends on type and describes the playlist item.
|
||||
// - dashboard_by_id: The value is an internal numerical identifier set by Grafana. This
|
||||
// is not portable as the numerical identifier is non-deterministic between different instances.
|
||||
// Will be replaced by dashboard_by_uid in the future. (deprecated)
|
||||
// - dashboard_by_tag: The value is a tag which is set on any number of dashboards. All
|
||||
// dashboards behind the tag will be added to the playlist.
|
||||
// - dashboard_by_uid: The value is the dashboard UID
|
||||
Value string `json:"value"`
|
||||
}
|
||||
|
||||
// PlaylistItemType type of the item.
|
||||
// +k8s:openapi-gen=true
|
||||
type PlaylistItemType string
|
||||
|
||||
// PlaylistSpec defines model for PlaylistSpec.
|
||||
// +k8s:openapi-gen=true
|
||||
type PlaylistSpec struct {
|
||||
Interval string `json:"interval"`
|
||||
Items []PlaylistItem `json:"items"`
|
||||
Title string `json:"title"`
|
||||
}
|
||||
@@ -1,70 +0,0 @@
|
||||
package v0alpha1
|
||||
|
||||
// Defines values for PlaylistOperatorStateState.
|
||||
const (
|
||||
PlaylistOperatorStateStateFailed PlaylistOperatorStateState = "failed"
|
||||
PlaylistOperatorStateStateInProgress PlaylistOperatorStateState = "in_progress"
|
||||
PlaylistOperatorStateStateSuccess PlaylistOperatorStateState = "success"
|
||||
)
|
||||
|
||||
// Defines values for PlayliststatusOperatorStateState.
|
||||
const (
|
||||
PlayliststatusOperatorStateStateFailed PlayliststatusOperatorStateState = "failed"
|
||||
PlayliststatusOperatorStateStateInProgress PlayliststatusOperatorStateState = "in_progress"
|
||||
PlayliststatusOperatorStateStateSuccess PlayliststatusOperatorStateState = "success"
|
||||
)
|
||||
|
||||
// PlaylistOperatorState defines model for PlaylistOperatorState.
|
||||
// +k8s:openapi-gen=true
|
||||
type PlaylistOperatorState struct {
|
||||
// descriptiveState is an optional more descriptive state field which has no requirements on format
|
||||
DescriptiveState *string `json:"descriptiveState,omitempty"`
|
||||
|
||||
// details contains any extra information that is operator-specific
|
||||
Details map[string]interface{} `json:"details,omitempty"`
|
||||
|
||||
// lastEvaluation is the ResourceVersion last evaluated
|
||||
LastEvaluation string `json:"lastEvaluation"`
|
||||
|
||||
// state describes the state of the lastEvaluation.
|
||||
// It is limited to three possible states for machine evaluation.
|
||||
State PlaylistOperatorStateState `json:"state"`
|
||||
}
|
||||
|
||||
// PlaylistOperatorStateState state describes the state of the lastEvaluation.
|
||||
// It is limited to three possible states for machine evaluation.
|
||||
// +k8s:openapi-gen=true
|
||||
type PlaylistOperatorStateState string
|
||||
|
||||
// PlaylistStatus defines model for PlaylistStatus.
|
||||
// +k8s:openapi-gen=true
|
||||
type PlaylistStatus struct {
|
||||
// additionalFields is reserved for future use
|
||||
AdditionalFields map[string]interface{} `json:"additionalFields,omitempty"`
|
||||
|
||||
// operatorStates is a map of operator ID to operator state evaluations.
|
||||
// Any operator which consumes this kind SHOULD add its state evaluation information to this field.
|
||||
OperatorStates map[string]PlayliststatusOperatorState `json:"operatorStates,omitempty"`
|
||||
}
|
||||
|
||||
// PlayliststatusOperatorState defines model for Playliststatus.#OperatorState.
|
||||
// +k8s:openapi-gen=true
|
||||
type PlayliststatusOperatorState struct {
|
||||
// descriptiveState is an optional more descriptive state field which has no requirements on format
|
||||
DescriptiveState *string `json:"descriptiveState,omitempty"`
|
||||
|
||||
// details contains any extra information that is operator-specific
|
||||
Details map[string]interface{} `json:"details,omitempty"`
|
||||
|
||||
// lastEvaluation is the ResourceVersion last evaluated
|
||||
LastEvaluation string `json:"lastEvaluation"`
|
||||
|
||||
// state describes the state of the lastEvaluation.
|
||||
// It is limited to three possible states for machine evaluation.
|
||||
State PlayliststatusOperatorStateState `json:"state"`
|
||||
}
|
||||
|
||||
// PlayliststatusOperatorStateState state describes the state of the lastEvaluation.
|
||||
// It is limited to three possible states for machine evaluation.
|
||||
// +k8s:openapi-gen=true
|
||||
type PlayliststatusOperatorStateState string
|
||||
@@ -1,340 +0,0 @@
|
||||
//go:build !ignore_autogenerated
|
||||
// +build !ignore_autogenerated
|
||||
|
||||
// Code generated by grafana-app-sdk. DO NOT EDIT.
|
||||
|
||||
package v0alpha1
|
||||
|
||||
import (
|
||||
common "k8s.io/kube-openapi/pkg/common"
|
||||
spec "k8s.io/kube-openapi/pkg/validation/spec"
|
||||
)
|
||||
|
||||
func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition {
|
||||
return map[string]common.OpenAPIDefinition{
|
||||
"github.com/grafana/grafana/apps/playlist/apis/playlist/v0alpha1.Playlist": schema_playlist_apis_playlist_v0alpha1_Playlist(ref),
|
||||
"github.com/grafana/grafana/apps/playlist/apis/playlist/v0alpha1.PlaylistItem": schema_playlist_apis_playlist_v0alpha1_PlaylistItem(ref),
|
||||
"github.com/grafana/grafana/apps/playlist/apis/playlist/v0alpha1.PlaylistList": schema_playlist_apis_playlist_v0alpha1_PlaylistList(ref),
|
||||
"github.com/grafana/grafana/apps/playlist/apis/playlist/v0alpha1.PlaylistOperatorState": schema_playlist_apis_playlist_v0alpha1_PlaylistOperatorState(ref),
|
||||
"github.com/grafana/grafana/apps/playlist/apis/playlist/v0alpha1.PlaylistSpec": schema_playlist_apis_playlist_v0alpha1_PlaylistSpec(ref),
|
||||
"github.com/grafana/grafana/apps/playlist/apis/playlist/v0alpha1.PlaylistStatus": schema_playlist_apis_playlist_v0alpha1_PlaylistStatus(ref),
|
||||
"github.com/grafana/grafana/apps/playlist/apis/playlist/v0alpha1.PlayliststatusOperatorState": schema_playlist_apis_playlist_v0alpha1_PlayliststatusOperatorState(ref),
|
||||
}
|
||||
}
|
||||
|
||||
func schema_playlist_apis_playlist_v0alpha1_Playlist(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||||
return common.OpenAPIDefinition{
|
||||
Schema: spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"object"},
|
||||
Properties: map[string]spec.Schema{
|
||||
"kind": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
|
||||
Type: []string{"string"},
|
||||
Format: "",
|
||||
},
|
||||
},
|
||||
"apiVersion": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
|
||||
Type: []string{"string"},
|
||||
Format: "",
|
||||
},
|
||||
},
|
||||
"metadata": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Default: map[string]interface{}{},
|
||||
Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"),
|
||||
},
|
||||
},
|
||||
"spec": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Default: map[string]interface{}{},
|
||||
Ref: ref("github.com/grafana/grafana/apps/playlist/apis/playlist/v0alpha1.PlaylistSpec"),
|
||||
},
|
||||
},
|
||||
"status": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Default: map[string]interface{}{},
|
||||
Ref: ref("github.com/grafana/grafana/apps/playlist/apis/playlist/v0alpha1.PlaylistStatus"),
|
||||
},
|
||||
},
|
||||
},
|
||||
Required: []string{"metadata", "spec", "status"},
|
||||
},
|
||||
},
|
||||
Dependencies: []string{
|
||||
"github.com/grafana/grafana/apps/playlist/apis/playlist/v0alpha1.PlaylistSpec", "github.com/grafana/grafana/apps/playlist/apis/playlist/v0alpha1.PlaylistStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"},
|
||||
}
|
||||
}
|
||||
|
||||
func schema_playlist_apis_playlist_v0alpha1_PlaylistItem(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||||
return common.OpenAPIDefinition{
|
||||
Schema: spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "PlaylistItem defines model for PlaylistItem.",
|
||||
Type: []string{"object"},
|
||||
Properties: map[string]spec.Schema{
|
||||
"type": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "type of the item.",
|
||||
Default: "",
|
||||
Type: []string{"string"},
|
||||
Format: "",
|
||||
},
|
||||
},
|
||||
"value": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "Value depends on type and describes the playlist item.\n - dashboard_by_id: The value is an internal numerical identifier set by Grafana. This\n is not portable as the numerical identifier is non-deterministic between different instances.\n Will be replaced by dashboard_by_uid in the future. (deprecated)\n - dashboard_by_tag: The value is a tag which is set on any number of dashboards. All\n dashboards behind the tag will be added to the playlist.\n - dashboard_by_uid: The value is the dashboard UID",
|
||||
Default: "",
|
||||
Type: []string{"string"},
|
||||
Format: "",
|
||||
},
|
||||
},
|
||||
},
|
||||
Required: []string{"type", "value"},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func schema_playlist_apis_playlist_v0alpha1_PlaylistList(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||||
return common.OpenAPIDefinition{
|
||||
Schema: spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"object"},
|
||||
Properties: map[string]spec.Schema{
|
||||
"kind": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
|
||||
Type: []string{"string"},
|
||||
Format: "",
|
||||
},
|
||||
},
|
||||
"apiVersion": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
|
||||
Type: []string{"string"},
|
||||
Format: "",
|
||||
},
|
||||
},
|
||||
"metadata": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Default: map[string]interface{}{},
|
||||
Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"),
|
||||
},
|
||||
},
|
||||
"items": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"array"},
|
||||
Items: &spec.SchemaOrArray{
|
||||
Schema: &spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Default: map[string]interface{}{},
|
||||
Ref: ref("github.com/grafana/grafana/apps/playlist/apis/playlist/v0alpha1.Playlist"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
Required: []string{"metadata", "items"},
|
||||
},
|
||||
},
|
||||
Dependencies: []string{
|
||||
"github.com/grafana/grafana/apps/playlist/apis/playlist/v0alpha1.Playlist", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"},
|
||||
}
|
||||
}
|
||||
|
||||
func schema_playlist_apis_playlist_v0alpha1_PlaylistOperatorState(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||||
return common.OpenAPIDefinition{
|
||||
Schema: spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "PlaylistOperatorState defines model for PlaylistOperatorState.",
|
||||
Type: []string{"object"},
|
||||
Properties: map[string]spec.Schema{
|
||||
"descriptiveState": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "descriptiveState is an optional more descriptive state field which has no requirements on format",
|
||||
Type: []string{"string"},
|
||||
Format: "",
|
||||
},
|
||||
},
|
||||
"details": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "details contains any extra information that is operator-specific",
|
||||
Type: []string{"object"},
|
||||
AdditionalProperties: &spec.SchemaOrBool{
|
||||
Allows: true,
|
||||
Schema: &spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"object"},
|
||||
Format: "",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"lastEvaluation": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "lastEvaluation is the ResourceVersion last evaluated",
|
||||
Default: "",
|
||||
Type: []string{"string"},
|
||||
Format: "",
|
||||
},
|
||||
},
|
||||
"state": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "state describes the state of the lastEvaluation. It is limited to three possible states for machine evaluation.",
|
||||
Default: "",
|
||||
Type: []string{"string"},
|
||||
Format: "",
|
||||
},
|
||||
},
|
||||
},
|
||||
Required: []string{"lastEvaluation", "state"},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func schema_playlist_apis_playlist_v0alpha1_PlaylistSpec(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||||
return common.OpenAPIDefinition{
|
||||
Schema: spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "PlaylistSpec defines model for PlaylistSpec.",
|
||||
Type: []string{"object"},
|
||||
Properties: map[string]spec.Schema{
|
||||
"interval": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Default: "",
|
||||
Type: []string{"string"},
|
||||
Format: "",
|
||||
},
|
||||
},
|
||||
"items": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"array"},
|
||||
Items: &spec.SchemaOrArray{
|
||||
Schema: &spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Default: map[string]interface{}{},
|
||||
Ref: ref("github.com/grafana/grafana/apps/playlist/apis/playlist/v0alpha1.PlaylistItem"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"title": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Default: "",
|
||||
Type: []string{"string"},
|
||||
Format: "",
|
||||
},
|
||||
},
|
||||
},
|
||||
Required: []string{"interval", "items", "title"},
|
||||
},
|
||||
},
|
||||
Dependencies: []string{
|
||||
"github.com/grafana/grafana/apps/playlist/apis/playlist/v0alpha1.PlaylistItem"},
|
||||
}
|
||||
}
|
||||
|
||||
func schema_playlist_apis_playlist_v0alpha1_PlaylistStatus(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||||
return common.OpenAPIDefinition{
|
||||
Schema: spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "PlaylistStatus defines model for PlaylistStatus.",
|
||||
Type: []string{"object"},
|
||||
Properties: map[string]spec.Schema{
|
||||
"additionalFields": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "additionalFields is reserved for future use",
|
||||
Type: []string{"object"},
|
||||
AdditionalProperties: &spec.SchemaOrBool{
|
||||
Allows: true,
|
||||
Schema: &spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"object"},
|
||||
Format: "",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"operatorStates": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "operatorStates is a map of operator ID to operator state evaluations. Any operator which consumes this kind SHOULD add its state evaluation information to this field.",
|
||||
Type: []string{"object"},
|
||||
AdditionalProperties: &spec.SchemaOrBool{
|
||||
Allows: true,
|
||||
Schema: &spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Default: map[string]interface{}{},
|
||||
Ref: ref("github.com/grafana/grafana/apps/playlist/apis/playlist/v0alpha1.PlayliststatusOperatorState"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
Dependencies: []string{
|
||||
"github.com/grafana/grafana/apps/playlist/apis/playlist/v0alpha1.PlayliststatusOperatorState"},
|
||||
}
|
||||
}
|
||||
|
||||
func schema_playlist_apis_playlist_v0alpha1_PlayliststatusOperatorState(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||||
return common.OpenAPIDefinition{
|
||||
Schema: spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "PlayliststatusOperatorState defines model for Playliststatus.#OperatorState.",
|
||||
Type: []string{"object"},
|
||||
Properties: map[string]spec.Schema{
|
||||
"descriptiveState": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "descriptiveState is an optional more descriptive state field which has no requirements on format",
|
||||
Type: []string{"string"},
|
||||
Format: "",
|
||||
},
|
||||
},
|
||||
"details": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "details contains any extra information that is operator-specific",
|
||||
Type: []string{"object"},
|
||||
AdditionalProperties: &spec.SchemaOrBool{
|
||||
Allows: true,
|
||||
Schema: &spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"object"},
|
||||
Format: "",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"lastEvaluation": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "lastEvaluation is the ResourceVersion last evaluated",
|
||||
Default: "",
|
||||
Type: []string{"string"},
|
||||
Format: "",
|
||||
},
|
||||
},
|
||||
"state": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "state describes the state of the lastEvaluation. It is limited to three possible states for machine evaluation.",
|
||||
Default: "",
|
||||
Type: []string{"string"},
|
||||
Format: "",
|
||||
},
|
||||
},
|
||||
},
|
||||
Required: []string{"lastEvaluation", "state"},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
module github.com/grafana/grafana/apps/playlist
|
||||
|
||||
go 1.24.2
|
||||
|
||||
require (
|
||||
github.com/grafana/grafana-app-sdk v0.19.0
|
||||
k8s.io/apimachinery v0.31.1
|
||||
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
|
||||
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
|
||||
github.com/go-logr/logr v1.4.2 // indirect
|
||||
github.com/go-openapi/jsonpointer v0.21.0 // indirect
|
||||
github.com/go-openapi/jsonreference v0.21.0 // indirect
|
||||
github.com/go-openapi/swag v0.23.0 // indirect
|
||||
github.com/gogo/protobuf v1.3.2 // indirect
|
||||
github.com/golang/protobuf v1.5.4 // indirect
|
||||
github.com/google/gnostic-models v0.6.8 // indirect
|
||||
github.com/google/gofuzz v1.2.0 // indirect
|
||||
github.com/josharian/intern v1.0.0 // indirect
|
||||
github.com/json-iterator/go v1.1.12 // indirect
|
||||
github.com/mailru/easyjson v0.7.7 // indirect
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
||||
github.com/modern-go/reflect2 v1.0.2 // indirect
|
||||
github.com/rogpeppe/go-internal v1.13.1 // indirect
|
||||
github.com/spf13/pflag v1.0.6 // indirect
|
||||
github.com/stretchr/testify v1.10.0 // indirect
|
||||
github.com/x448/float16 v0.8.4 // indirect
|
||||
golang.org/x/net v0.36.0 // indirect
|
||||
golang.org/x/text v0.22.0 // indirect
|
||||
google.golang.org/protobuf v1.36.4 // indirect
|
||||
gopkg.in/inf.v0 v0.9.1 // indirect
|
||||
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
k8s.io/klog/v2 v2.130.1 // indirect
|
||||
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 // indirect
|
||||
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
|
||||
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
|
||||
)
|
||||
@@ -1,117 +0,0 @@
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
|
||||
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g=
|
||||
github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc=
|
||||
github.com/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv5E=
|
||||
github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ=
|
||||
github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY=
|
||||
github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
|
||||
github.com/go-openapi/jsonpointer v0.21.0 h1:YgdVicSA9vH5RiHs9TZW5oyafXZFc6+2Vc1rr/O9oNQ=
|
||||
github.com/go-openapi/jsonpointer v0.21.0/go.mod h1:IUyH9l/+uyhIYQ/PXVA41Rexl+kOkAPDdXEYns6fzUY=
|
||||
github.com/go-openapi/jsonreference v0.21.0 h1:Rs+Y7hSXT83Jacb7kFyjn4ijOuVGSvOdF2+tg1TRrwQ=
|
||||
github.com/go-openapi/jsonreference v0.21.0/go.mod h1:LmZmgsrTkVg9LG4EaHeY8cBDslNPMo06cago5JNLkm4=
|
||||
github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE=
|
||||
github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ=
|
||||
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
|
||||
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
|
||||
github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
|
||||
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
|
||||
github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I=
|
||||
github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U=
|
||||
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
|
||||
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
||||
github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0=
|
||||
github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
||||
github.com/grafana/grafana-app-sdk v0.19.0 h1:RY9HvCFR+4WUy81n53wejZnof9qE6++pd6r24d6+JYs=
|
||||
github.com/grafana/grafana-app-sdk v0.19.0/go.mod h1:y0BgzYxc+a7CwOqkwUhN9zXd5cgZJjd2zAbgHEd/xzo=
|
||||
github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY=
|
||||
github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y=
|
||||
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
|
||||
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
|
||||
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
|
||||
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
|
||||
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
|
||||
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
|
||||
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
||||
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
|
||||
github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0=
|
||||
github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
|
||||
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||
github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
|
||||
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=
|
||||
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII=
|
||||
github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o=
|
||||
github.com/spf13/pflag v1.0.6 h1:jFzHGLGAlb3ruxLB8MhbI6A8+AQX/2eW4qeyNZXNp2o=
|
||||
github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
|
||||
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
|
||||
github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM=
|
||||
github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg=
|
||||
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||
golang.org/x/net v0.36.0 h1:vWF2fRbw4qslQsQzgFqZff+BItCvGFQqKzKIzx1rmoA=
|
||||
golang.org/x/net v0.36.0/go.mod h1:bFmbeoIPfrw4sMHNhb4J9f6+tPziuGjq7Jk/38fxi1I=
|
||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM=
|
||||
golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
||||
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
google.golang.org/protobuf v1.36.4 h1:6A3ZDJHn/eNqc1i+IdefRzy/9PokBTPvcqMySR7NNIM=
|
||||
google.golang.org/protobuf v1.36.4/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
|
||||
gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=
|
||||
gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
|
||||
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
|
||||
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
k8s.io/apimachinery v0.31.1 h1:mhcUBbj7KUjaVhyXILglcVjuS4nYXiwC+KKFBgIVy7U=
|
||||
k8s.io/apimachinery v0.31.1/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo=
|
||||
k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk=
|
||||
k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE=
|
||||
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 h1:BZqlfIlq5YbRMFko6/PM7FjZpUb45WallggurYhKGag=
|
||||
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340/go.mod h1:yD4MZYeKMBwQKVht279WycxKyM84kkAx2DPrTXaeb98=
|
||||
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 h1:pUdcCO1Lk/tbT5ztQWOBi5HBgbBP1J8+AsQnQCKsi8A=
|
||||
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
|
||||
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo=
|
||||
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0=
|
||||
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4=
|
||||
sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08=
|
||||
sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E=
|
||||
sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY=
|
||||
@@ -1 +0,0 @@
|
||||
module: "github.com/grafana/grafana/apps/playlist/kinds"
|
||||
@@ -1,39 +0,0 @@
|
||||
package core
|
||||
|
||||
externalName: {
|
||||
kind: "Playlist"
|
||||
group: "playlist"
|
||||
apiResource: {
|
||||
groupOverride: "playlist.grafana.app"
|
||||
}
|
||||
codegen: {
|
||||
frontend: false
|
||||
backend: true
|
||||
}
|
||||
pluralName: "Playlists"
|
||||
current: "v0alpha1"
|
||||
versions: {
|
||||
"v0alpha1": {
|
||||
schema: {
|
||||
#Item: {
|
||||
// type of the item.
|
||||
type: "dashboard_by_tag" | "dashboard_by_uid" | "dashboard_by_id" @cuetsy(kind="enum")
|
||||
// Value depends on type and describes the playlist item.
|
||||
// - dashboard_by_id: The value is an internal numerical identifier set by Grafana. This
|
||||
// is not portable as the numerical identifier is non-deterministic between different instances.
|
||||
// Will be replaced by dashboard_by_uid in the future. (deprecated)
|
||||
// - dashboard_by_tag: The value is a tag which is set on any number of dashboards. All
|
||||
// dashboards behind the tag will be added to the playlist.
|
||||
// - dashboard_by_uid: The value is the dashboard UID
|
||||
value: string
|
||||
}
|
||||
|
||||
spec: {
|
||||
title: string
|
||||
interval: string
|
||||
items: [...#Item]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -65,7 +65,6 @@ enable_gzip = false
|
||||
# https certs & key file
|
||||
cert_file =
|
||||
cert_key =
|
||||
cert_pass =
|
||||
|
||||
# Certificates file watch interval
|
||||
certs_watch_interval =
|
||||
@@ -313,9 +312,6 @@ application_insights_endpoint_url =
|
||||
# Controls if the UI contains any links to user feedback forms
|
||||
feedback_links_enabled = true
|
||||
|
||||
# Static context that is being added to analytics events
|
||||
reporting_static_context =
|
||||
|
||||
#################################### Security ############################
|
||||
[security]
|
||||
# disable creation of admin user on first start of grafana
|
||||
@@ -406,9 +402,6 @@ csrf_always_check = false
|
||||
# Comma-separated list of plugins ids that won't be loaded inside the frontend sandbox
|
||||
disable_frontend_sandbox_for_plugins = grafana-incident-app
|
||||
|
||||
# Comma-separated list of paths for POST/PUT URL in actions. Empty will allow anything that is not on the same origin
|
||||
actions_allow_post_url =
|
||||
|
||||
[security.encryption]
|
||||
# Defines the time-to-live (TTL) for decrypted data encryption keys stored in memory (cache).
|
||||
# Please note that small values may cause performance issues due to a high frequency decryption operations.
|
||||
@@ -432,6 +425,9 @@ external_snapshot_name = Publish to snapshots.raintank.io
|
||||
# creating and deleting snapshots.
|
||||
public_mode = false
|
||||
|
||||
# remove expired snapshot
|
||||
snapshot_remove_expired = true
|
||||
|
||||
#################################### Dashboards ##################
|
||||
|
||||
[dashboards]
|
||||
@@ -523,9 +519,6 @@ user_invite_max_lifetime_duration = 24h
|
||||
# The duration in time a verification email, used to update the email address of a user, remains valid before expiring. This setting should be expressed as a duration. Examples: 6h (hours), 2d (days), 1w (week). Default is 1h (1 hour).
|
||||
verification_email_max_lifetime_duration = 1h
|
||||
|
||||
# Frequency of updating a user's last seen time. The minimum supported duration is 5m (5 minutes). The maximum supported duration is 1h (1 hour)
|
||||
last_seen_update_interval = 15m
|
||||
|
||||
# Enter a comma-separated list of usernames to hide them in the Grafana UI. These users are shown to Grafana admins and to themselves.
|
||||
hidden_users =
|
||||
|
||||
@@ -582,16 +575,6 @@ oauth_auto_login = false
|
||||
# OAuth state max age cookie duration in seconds. Defaults to 600 seconds.
|
||||
oauth_state_cookie_max_age = 600
|
||||
|
||||
# Sets a custom oAuth error message. This is useful if you need to point the users to a specific location for support.
|
||||
oauth_login_error_message = oauth.login.error
|
||||
|
||||
# Minimum wait time in milliseconds for the server lock retry mechanism.
|
||||
# The server lock retry mechanism is used to prevent multiple Grafana instances from
|
||||
# simultaneously refreshing OAuth tokens. This mechanism waits at least this amount
|
||||
# of time before retrying to acquire the server lock. There are 5 retries in total.
|
||||
# The wait time between retries is calculated as random(n, n + 500)
|
||||
oauth_refresh_token_server_lock_min_wait_ms = 1000
|
||||
|
||||
# limit of api_key seconds to live before expiration
|
||||
api_key_max_seconds_to_live = -1
|
||||
|
||||
@@ -618,10 +601,6 @@ id_response_header_prefix = X-Grafana
|
||||
# The header value will encode the namespace ("user:<id>", "api-key:<id>", "service-account:<id>")
|
||||
id_response_header_namespaces = user api-key service-account
|
||||
|
||||
# Enables the use of managed service accounts for plugin authentication
|
||||
# This feature currently **only supports single-organization deployments**
|
||||
managed_service_accounts_enabled = false
|
||||
|
||||
#################################### SSO Settings ###########################
|
||||
[sso_settings]
|
||||
# interval for reloading the SSO Settings from the database
|
||||
@@ -777,7 +756,6 @@ allowed_domains =
|
||||
allowed_groups =
|
||||
allowed_organizations =
|
||||
role_attribute_strict = false
|
||||
org_mapping =
|
||||
allow_assign_grafana_admin = false
|
||||
force_use_graph_api = false
|
||||
tls_skip_verify_insecure = false
|
||||
@@ -1012,10 +990,6 @@ username_assertion =
|
||||
# By default this will include all Grafana Labs owned Azure plugins, or those that make use of Azure settings (Azure Monitor, Azure Data Explorer, Prometheus, MSSQL).
|
||||
forward_settings_to_plugins = grafana-azure-monitor-datasource, prometheus, grafana-azure-data-explorer-datasource, mssql
|
||||
|
||||
# Specifies whether Entra password auth can be used for the MSSQL data source
|
||||
# Disabled by default, needs to be explicitly enabled
|
||||
azure_entra_password_credentials_enabled = false
|
||||
|
||||
#################################### Role-based Access Control ###########
|
||||
[rbac]
|
||||
# If enabled, cache permissions in a in memory cache
|
||||
@@ -1134,9 +1108,6 @@ instrumentations_console_enabled = false
|
||||
# Should webvitals instrumentation be enabled, only affects Grafana Javascript Agent
|
||||
instrumentations_webvitals_enabled = false
|
||||
|
||||
# Should tracing instrumentation be enabled, only affects Grafana Javascript Agent
|
||||
instrumentations_tracing_enabled = false
|
||||
|
||||
# level of internal logging for debugging Grafana Javascript Agent.
|
||||
# possible values are: 0 = OFF, 1 = ERROR, 2 = WARN, 3 = INFO, 4 = VERBOSE
|
||||
# more details: https://github.com/grafana/faro-web-sdk/blob/v1.3.7/docs/sources/tutorials/quick-start-browser.md#how-to-activate-debugging
|
||||
@@ -1196,11 +1167,6 @@ global_correlations = -1
|
||||
# This is not strictly enforced yet, but will be enforced over time.
|
||||
alerting_rule_group_rules = 100
|
||||
|
||||
# Limit the number of query evaluation results per alert rule.
|
||||
# If the condition query of an alert rule produces more results than this limit,
|
||||
# the evaluation results in an error.
|
||||
alerting_rule_evaluation_results = -1
|
||||
|
||||
#################################### Unified Alerting ####################
|
||||
[unified_alerting]
|
||||
# Enable the Alerting sub-system and interface.
|
||||
@@ -1209,9 +1175,6 @@ enabled =
|
||||
# Comma-separated list of organization IDs for which to disable unified alerting. Only supported if unified alerting is enabled.
|
||||
disabled_orgs =
|
||||
|
||||
# Specify how long to wait for the alerting service to initialize
|
||||
initialization_timeout = 30s
|
||||
|
||||
# Specify the frequency of polling for admin config changes.
|
||||
# The interval string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
|
||||
admin_config_poll_interval = 60s
|
||||
@@ -1220,12 +1183,6 @@ admin_config_poll_interval = 60s
|
||||
# The interval string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
|
||||
alertmanager_config_poll_interval = 60s
|
||||
|
||||
# Maximum number of active and pending silences that a tenant can have at once. Default: 0 (no limit).
|
||||
alertmanager_max_silences_count =
|
||||
|
||||
# Maximum silence size in bytes. Default: 0 (no limit).
|
||||
alertmanager_max_silence_size_bytes =
|
||||
|
||||
# Set to true when using redis in cluster mode.
|
||||
ha_redis_cluster_mode_enabled = false
|
||||
|
||||
@@ -1307,10 +1264,6 @@ ha_label =
|
||||
# The interval string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
|
||||
ha_gossip_interval = 200ms
|
||||
|
||||
# Length of time to attempt to reconnect to a lost peer. Recommended to be short (<15m) when Grafana is running in a Kubernetes cluster.
|
||||
# The string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
|
||||
ha_reconnect_timeout = 6h
|
||||
|
||||
# The interval between gossip full state syncs. Setting this interval lower (more frequent) will increase convergence speeds
|
||||
# across larger clusters at the expense of increased bandwidth usage.
|
||||
# The interval string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
|
||||
@@ -1346,14 +1299,6 @@ disable_jitter = false
|
||||
# Retention period for Alertmanager notification log entries.
|
||||
notification_log_retention = 5d
|
||||
|
||||
# Duration for which a resolved alert state transition will continue to be sent to the Alertmanager.
|
||||
resolved_alert_retention = 15m
|
||||
|
||||
# Defines the limit of how many alert rule versions
|
||||
# should be stored in the database for each alert rule in an organization including the current one.
|
||||
# 0 value means no limit
|
||||
rule_version_record_limit = 0
|
||||
|
||||
[unified_alerting.screenshots]
|
||||
# Enable screenshots in notifications. You must have either installed the Grafana image rendering
|
||||
# plugin, or set up Grafana to use a remote rendering service.
|
||||
@@ -1431,12 +1376,6 @@ loki_basic_auth_password =
|
||||
# Optional max query length for queries sent to Loki. Default is 721h which matches the default Loki value.
|
||||
loki_max_query_length = 721h
|
||||
|
||||
# For "loki" only.
|
||||
# Maximum size in bytes for queries sent to Loki. This limit is applied to user provided filters as well as system defined ones, e.g. applied by access control.
|
||||
# If filter exceeds the limit, API returns error with code "alerting.state-history.loki.requestTooLong".
|
||||
# Default is 64kb
|
||||
loki_max_query_size = 65536
|
||||
|
||||
[unified_alerting.state_history.external_labels]
|
||||
# Optional extra labels to attach to outbound state history records or log streams.
|
||||
# Any number of label key-value-pairs can be provided.
|
||||
@@ -1455,26 +1394,6 @@ max_age =
|
||||
# Configures max number of alert annotations that Grafana stores. Default value is 0, which keeps all alert annotations.
|
||||
max_annotations_to_keep =
|
||||
|
||||
[recording_rules]
|
||||
# Enable recording rules. You must provide write credentials below.
|
||||
enabled = false
|
||||
|
||||
# Target URL (including write path) for recording rules.
|
||||
url =
|
||||
|
||||
# Optional username for basic authentication on recording rule write requests. Can be left blank to disable basic auth
|
||||
basic_auth_username =
|
||||
|
||||
# Optional assword for basic authentication on recording rule write requests. Can be left blank.
|
||||
basic_auth_password =
|
||||
|
||||
# Request timeout for recording rule writes.
|
||||
timeout = 10s
|
||||
|
||||
# Optional custom headers to include in recording rule write requests.
|
||||
[recording_rules.custom_headers]
|
||||
# exampleHeader = exampleValue
|
||||
|
||||
# NOTE: this configuration options are not used yet.
|
||||
[remote.alertmanager]
|
||||
|
||||
@@ -1532,9 +1451,6 @@ max_annotations_to_keep =
|
||||
# Enable the Explore section
|
||||
enabled = true
|
||||
|
||||
# set the default offset for the time picker
|
||||
defaultTimeOffset = 1h
|
||||
|
||||
#################################### Help #############################
|
||||
[help]
|
||||
# Enable the Help section
|
||||
@@ -1568,8 +1484,8 @@ expire_time = 7
|
||||
#################################### Internal Grafana Metrics ############
|
||||
# Metrics available at HTTP URL /metrics and /metrics/plugins/:pluginId
|
||||
[metrics]
|
||||
enabled = true
|
||||
interval_seconds = 10
|
||||
enabled = true
|
||||
interval_seconds = 10
|
||||
# Disable total stats (stat_totals_*) metrics to be generated
|
||||
disable_total_stats = false
|
||||
# The interval at which the total stats collector will update the stats. Default is 1800 seconds.
|
||||
@@ -1747,12 +1663,6 @@ install_token =
|
||||
hide_angular_deprecation =
|
||||
# Comma separated list of plugin ids for which environment variables should be forwarded. Used only when feature flag pluginsSkipHostEnvVars is enabled.
|
||||
forward_host_env_vars =
|
||||
# Comma separated list of plugin ids to install as part of the startup process.
|
||||
preinstall = grafana-lokiexplore-app
|
||||
# Controls whether preinstall plugins asynchronously (in the background) or synchronously (blocking). Useful when preinstalled plugins are used with provisioning.
|
||||
preinstall_async = true
|
||||
# Disables preinstall feature. It has the same effect as setting preinstall to an empty list.
|
||||
preinstall_disabled = false
|
||||
|
||||
#################################### Grafana Live ##########################################
|
||||
[live]
|
||||
@@ -1779,9 +1689,6 @@ ha_engine_address = "127.0.0.1:6379"
|
||||
# ha_engine_password allows setting an optional password to authenticate with the engine
|
||||
ha_engine_password = ""
|
||||
|
||||
# ha_prefix is a prefix for keys in the HA engine. It's used to separate keys for different Grafana instances.
|
||||
ha_prefix =
|
||||
|
||||
#################################### Grafana Image Renderer Plugin ##########################
|
||||
[plugin.grafana-image-renderer]
|
||||
# Instruct headless browser instance to use a default timezone when not provided by Grafana, e.g. when rendering panel image of alert.
|
||||
@@ -1983,16 +1890,6 @@ enabled = true
|
||||
is_target = false
|
||||
# Token used to send requests to grafana com
|
||||
gcom_api_token = ""
|
||||
# How long to wait for a request sent to gms to start a snapshot to complete
|
||||
start_snapshot_timeout = 5s
|
||||
# How long to wait for a request sent to gms to validate a key to complete
|
||||
validate_key_timeout = 5s
|
||||
# How long to wait for a request sent to gms to get a snapshot status to complete
|
||||
get_snapshot_status_timeout = 5s
|
||||
# How long to wait for a request sent to gms to create a presigned upload url
|
||||
create_upload_url_timeout = 5s
|
||||
# How long to wait for a request sent to gms to report an event
|
||||
report_event_timeout = 5s
|
||||
# How long to wait for a request to fetch an instance to complete
|
||||
fetch_instance_timeout = 5s
|
||||
# How long to wait for a request to create an access policy to complete
|
||||
@@ -2002,21 +1899,4 @@ fetch_access_policy_timeout = 5s
|
||||
# How long to wait for a request to create to delete an access policy to complete
|
||||
delete_access_policy_timeout = 5s
|
||||
# The domain name used to access cms
|
||||
domain = grafana.net
|
||||
# Folder used to store snapshot files. Defaults to the home dir
|
||||
snapshot_folder = ""
|
||||
# Link to form to give feedback on the feature
|
||||
feedback_url = https://docs.google.com/forms/d/e/1FAIpQLSeEE33vhbSpR8A8S1A1ocZ1ByVRRwiRl1GZr2FSrEer_tSa8w/viewform?usp=sf_link
|
||||
# How frequently should the frontend UI poll for changes while resources are migrating
|
||||
frontend_poll_interval = 2s
|
||||
|
||||
################################## Frontend development configuration ###################################
|
||||
# Warning! Any settings placed in this section will be available on `process.env.frontend_dev_{foo}` within frontend code
|
||||
# Any values placed here may be accessible to the UI. Do not place sensitive information here.
|
||||
[frontend_dev]
|
||||
# Should UI tests fail when console log/warn/erroring?
|
||||
# Does not affect the result when running on CI - only for allowing devs to choose this behaviour locally
|
||||
fail_tests_on_console = true
|
||||
# Whether or not to enable the MSW mock API, which intercepts requests and returns mock data
|
||||
# Should only be used for local development or demo purposes
|
||||
mock_api = false
|
||||
domain = grafana-dev.net
|
||||
|
||||
@@ -11,11 +11,10 @@ port = 389
|
||||
use_ssl = false
|
||||
# If set to true, use LDAP with STARTTLS instead of LDAPS
|
||||
start_tls = false
|
||||
# The value of an accepted TLS cipher. By default, this value is empty. Example value: ["TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384"])
|
||||
# The value of an accepted TLS cipher. By default, this value is empty. Example value: ["TLS_AES_256_GCM_SHA384"])
|
||||
# For a complete list of supported ciphers and TLS versions, refer to: https://go.dev/src/crypto/tls/cipher_suites.go
|
||||
# Starting with Grafana v11.0 only ciphers with ECDHE support are accepted for TLS 1.2 connections.
|
||||
tls_ciphers = []
|
||||
# This is the minimum TLS version allowed. By default, this value is empty. Accepted values are: TLS1.1 (only for Grafana v10.4 or older), TLS1.2, TLS1.3.
|
||||
# This is the minimum TLS version allowed. By default, this value is empty. Accepted values are: TLS1.1, TLS1.2, TLS1.3.
|
||||
min_tls_version = ""
|
||||
# set to true if you want to skip ssl cert validation
|
||||
ssl_skip_verify = false
|
||||
|
||||
320
conf/sample.ini
320
conf/sample.ini
@@ -31,13 +31,13 @@
|
||||
# Protocol (http, https, h2, socket)
|
||||
;protocol = http
|
||||
|
||||
# Minimum TLS version allowed. By default, this value is empty. Accepted values are: TLS1.2, TLS1.3. If nothing is set TLS1.2 would be taken
|
||||
# This is the minimum TLS version allowed. By default, this value is empty. Accepted values are: TLS1.2, TLS1.3. If nothing is set TLS1.2 would be taken
|
||||
;min_tls_version = ""
|
||||
|
||||
# The ip address to bind to, empty will bind to all interfaces
|
||||
;http_addr =
|
||||
|
||||
# The http port to use
|
||||
# The http port to use
|
||||
;http_port = 3000
|
||||
|
||||
# The public facing domain name used to access grafana from a browser
|
||||
@@ -67,9 +67,6 @@
|
||||
;cert_file =
|
||||
;cert_key =
|
||||
|
||||
# optional password to be used to decrypt key file
|
||||
;cert_pass =
|
||||
|
||||
# Certificates file watch interval
|
||||
;certs_watch_interval =
|
||||
|
||||
@@ -97,10 +94,6 @@
|
||||
#exampleHeader1 = exampleValue1
|
||||
#exampleHeader2 = exampleValue2
|
||||
|
||||
[environment]
|
||||
# Sets whether the local file system is available for Grafana to use. Default is true for backward compatibility.
|
||||
;local_file_system_available = true
|
||||
|
||||
#################################### GRPC Server #########################
|
||||
;[grpc_server]
|
||||
;network = "tcp"
|
||||
@@ -110,8 +103,6 @@
|
||||
;key_file =
|
||||
;max_recv_msg_size =
|
||||
;max_send_msg_size =
|
||||
# this will log the request and response for each unary gRPC call
|
||||
;enable_logging = false
|
||||
|
||||
#################################### Database ####################################
|
||||
[database]
|
||||
@@ -125,22 +116,11 @@
|
||||
;user = root
|
||||
# If the password contains # or ; you have to wrap it with triple quotes. Ex """#password;"""
|
||||
;password =
|
||||
|
||||
# Use either URL or the previous fields to configure the database
|
||||
# Example: mysql://user:secret@host:port/database
|
||||
;url =
|
||||
|
||||
# Max idle conn setting default is 2
|
||||
;max_idle_conn = 2
|
||||
|
||||
# Max conn setting default is 0 (mean not set)
|
||||
;max_open_conn =
|
||||
|
||||
# Connection Max Lifetime default is 14400 (means 14400 seconds or 4 hours)
|
||||
;conn_max_lifetime = 14400
|
||||
|
||||
# Set to true to log the sql calls and execution times.
|
||||
;log_queries =
|
||||
|
||||
# For "postgres", use either "disable", "require" or "verify-full"
|
||||
# For "mysql", use either "true", "false", or "skip-verify".
|
||||
;ssl_mode = disable
|
||||
@@ -162,6 +142,18 @@
|
||||
# For "sqlite3" only, path relative to data_path setting
|
||||
;path = grafana.db
|
||||
|
||||
# Max idle conn setting default is 2
|
||||
;max_idle_conn = 2
|
||||
|
||||
# Max conn setting default is 0 (mean not set)
|
||||
;max_open_conn =
|
||||
|
||||
# Connection Max Lifetime default is 14400 (means 14400 seconds or 4 hours)
|
||||
;conn_max_lifetime = 14400
|
||||
|
||||
# Set to true to log the sql calls and execution times.
|
||||
;log_queries =
|
||||
|
||||
# For "sqlite3" only. cache mode setting used for connecting to the database. (private, shared)
|
||||
;cache_mode = private
|
||||
|
||||
@@ -183,6 +175,11 @@
|
||||
# Set to true to add metrics and tracing for database queries.
|
||||
;instrument_queries = false
|
||||
|
||||
################################### Data sources #########################
|
||||
[datasources]
|
||||
# Upper limit of data sources that Grafana will return. This limit is a temporary configuration and it will be deprecated when pagination will be introduced on the list data sources API.
|
||||
;datasource_limit = 5000
|
||||
|
||||
#################################### Cache server #############################
|
||||
[remote_cache]
|
||||
# Either "redis", "memcached" or "database" default is "database"
|
||||
@@ -303,18 +300,9 @@
|
||||
# Intercom secret, optional, used to hash user_id before passing to Intercom via Rudderstack
|
||||
;intercom_secret =
|
||||
|
||||
# Application Insights connection string. Specify an URL string to enable this feature.
|
||||
;application_insights_connection_string =
|
||||
|
||||
# Optional. Specifies an Application Insights endpoint URL where the endpoint string is wrapped in backticks ``.
|
||||
;application_insights_endpoint_url =
|
||||
|
||||
# Controls if the UI contains any links to user feedback forms
|
||||
;feedback_links_enabled = true
|
||||
|
||||
# Static context that is being added to analytics events
|
||||
;reporting_static_context = grafanaInstance=12, os=linux
|
||||
|
||||
#################################### Security ####################################
|
||||
[security]
|
||||
# disable creation of admin user on first start of grafana
|
||||
@@ -395,7 +383,6 @@
|
||||
# $NONCE in the template includes a random nonce.
|
||||
# $ROOT_PATH is server.root_url without the protocol.
|
||||
;content_security_policy_report_only_template = """script-src 'self' 'unsafe-eval' 'unsafe-inline' 'strict-dynamic' $NONCE;object-src 'none';font-src 'self';style-src 'self' 'unsafe-inline' blob:;img-src * data:;base-uri 'self';connect-src 'self' grafana.com ws://$ROOT_PATH wss://$ROOT_PATH;manifest-src 'self';media-src 'none';form-action 'self';"""
|
||||
|
||||
# Controls if old angular plugins are supported or not.
|
||||
;angular_support_enabled = false
|
||||
|
||||
@@ -411,9 +398,6 @@
|
||||
# Comma-separated list of plugins ids that won't be loaded inside the frontend sandbox
|
||||
;disable_frontend_sandbox_for_plugins =
|
||||
|
||||
# Comma-separated list of paths for POST/PUT URL in actions. Empty will allow anything that is not on the same origin
|
||||
;actions_allow_post_url =
|
||||
|
||||
[security.encryption]
|
||||
# Defines the time-to-live (TTL) for decrypted data encryption keys stored in memory (cache).
|
||||
# Please note that small values may cause performance issues due to a high frequency decryption operations.
|
||||
@@ -437,7 +421,10 @@
|
||||
# creating and deleting snapshots.
|
||||
;public_mode = false
|
||||
|
||||
#################################### Dashboards ##################
|
||||
# remove expired snapshot
|
||||
;snapshot_remove_expired = true
|
||||
|
||||
#################################### Dashboards History ##################
|
||||
[dashboards]
|
||||
# Number dashboard versions to keep (per dashboard). Default: 20, Minimum: 1
|
||||
;versions_to_keep = 20
|
||||
@@ -449,30 +436,6 @@
|
||||
# Path to the default home dashboard. If this value is empty, then Grafana uses StaticRootPath + "dashboards/home.json"
|
||||
;default_home_dashboard_path =
|
||||
|
||||
################################### Data sources #########################
|
||||
[datasources]
|
||||
# Upper limit of data sources that Grafana will return. This limit is a temporary configuration and it will be deprecated when pagination will be introduced on the list data sources API.
|
||||
;datasource_limit = 5000
|
||||
|
||||
# Number of queries to be executed concurrently. Only for the datasource supports concurrency.
|
||||
# For now only Loki and InfluxDB (with influxql) are supporting concurrency behind the feature flags.
|
||||
# Check datasource documentations for enabling concurrency.
|
||||
;concurrent_query_count = 10
|
||||
|
||||
################################### SQL Data Sources #####################
|
||||
[sql_datasources]
|
||||
# Default maximum number of open connections maintained in the connection pool
|
||||
# when connecting to SQL based data sources
|
||||
;max_open_conns_default = 100
|
||||
|
||||
# Default maximum number of idle connections maintained in the connection pool
|
||||
# when connecting to SQL based data sources
|
||||
;max_idle_conns_default = 100
|
||||
|
||||
# Default maximum connection lifetime used when connecting
|
||||
# to SQL based data sources.
|
||||
;max_conn_lifetime_default = 14400
|
||||
|
||||
#################################### Users ###############################
|
||||
[users]
|
||||
# disable user signup / registration
|
||||
@@ -500,7 +463,7 @@
|
||||
;login_hint = email or username
|
||||
;password_hint = password
|
||||
|
||||
# Default UI theme ("dark", "light" or "system")
|
||||
# Default UI theme ("dark" or "light")
|
||||
;default_theme = dark
|
||||
|
||||
# Default UI language (supported IETF language tag, such as en-US)
|
||||
@@ -526,9 +489,6 @@
|
||||
# The duration in time a verification email, used to update the email address of a user, remains valid before expiring. This setting should be expressed as a duration. Examples: 6h (hours), 2d (days), 1w (week). Default is 1h (1 hour).
|
||||
;verification_email_max_lifetime_duration = 1h
|
||||
|
||||
# Frequency of updating a user's last seen time. The minimum supported duration is 5m (5 minutes). The maximum supported duration is 1h (1 hour).
|
||||
;last_seen_update_interval = 15m
|
||||
|
||||
# Enter a comma-separated list of users login to hide them in the Grafana UI. These users are shown to Grafana admins and themselves.
|
||||
; hidden_users =
|
||||
|
||||
@@ -583,19 +543,9 @@
|
||||
# Deprecated, use auto_login option for specific provider instead.
|
||||
;oauth_auto_login = false
|
||||
|
||||
# Sets a custom oAuth error message. This is useful if you need to point the users to a specific location for support.
|
||||
;oauth_login_error_message = oauth.login.error
|
||||
|
||||
# OAuth state max age cookie duration in seconds. Defaults to 600 seconds.
|
||||
;oauth_state_cookie_max_age = 600
|
||||
|
||||
# Minimum wait time in milliseconds for the server lock retry mechanism.
|
||||
# The server lock retry mechanism is used to prevent multiple Grafana instances from
|
||||
# simultaneously refreshing OAuth tokens. This mechanism waits at least this amount
|
||||
# of time before retrying to acquire the server lock. There are 5 retries in total.
|
||||
# The wait time between retries is calculated as random(n, n + 500)
|
||||
; oauth_refresh_token_server_lock_min_wait_ms = 1000
|
||||
|
||||
# limit of api_key seconds to live before expiration
|
||||
;api_key_max_seconds_to_live = -1
|
||||
|
||||
@@ -608,6 +558,9 @@
|
||||
# Set to true to enable Azure authentication option for HTTP-based datasources.
|
||||
;azure_auth_enabled = false
|
||||
|
||||
# Set to skip the organization role from JWT login and use system's role assignment instead.
|
||||
; skip_org_role_sync = false
|
||||
|
||||
# Use email lookup in addition to the unique ID provided by the IdP
|
||||
;oauth_allow_insecure_email_lookup = false
|
||||
|
||||
@@ -622,10 +575,6 @@
|
||||
# The header value will encode the namespace ("user:<id>", "api-key:<id>", "service-account:<id>")
|
||||
;id_response_header_namespaces = user api-key service-account
|
||||
|
||||
# Enables the use of managed service accounts for plugin authentication
|
||||
# This feature currently **only supports single-organization deployments**
|
||||
; managed_service_accounts_enabled = false
|
||||
|
||||
#################################### Anonymous Auth ######################
|
||||
[auth.anonymous]
|
||||
# enable anonymous access
|
||||
@@ -640,9 +589,6 @@
|
||||
# mask the Grafana version number for unauthenticated users
|
||||
;hide_version = false
|
||||
|
||||
# number of devices in total
|
||||
;device_limit =
|
||||
|
||||
#################################### GitHub Auth ##########################
|
||||
[auth.github]
|
||||
;name = GitHub
|
||||
@@ -665,12 +611,6 @@
|
||||
;org_mapping =
|
||||
;allow_assign_grafana_admin = false
|
||||
;skip_org_role_sync = false
|
||||
;tls_skip_verify_insecure = false
|
||||
;tls_client_cert =
|
||||
;tls_client_key =
|
||||
;tls_client_ca =
|
||||
# GitHub OAuth apps does not provide refresh tokens and the access tokens never expires.
|
||||
;use_refresh_token = false
|
||||
|
||||
#################################### GitLab Auth #########################
|
||||
[auth.gitlab]
|
||||
@@ -698,7 +638,6 @@
|
||||
;tls_client_key =
|
||||
;tls_client_ca =
|
||||
;use_pkce = true
|
||||
;use_refresh_token = true
|
||||
|
||||
#################################### Google Auth ##########################
|
||||
[auth.google]
|
||||
@@ -723,12 +662,7 @@
|
||||
;org_mapping =
|
||||
;allow_assign_grafana_admin = false
|
||||
;skip_org_role_sync = false
|
||||
;tls_skip_verify_insecure = false
|
||||
;tls_client_cert =
|
||||
;tls_client_key =
|
||||
;tls_client_ca =
|
||||
;use_pkce = true
|
||||
;use_refresh_token = true
|
||||
|
||||
#################################### Grafana.com Auth ####################
|
||||
[auth.grafana_com]
|
||||
@@ -742,7 +676,6 @@
|
||||
;scopes = user:email
|
||||
;allowed_organizations =
|
||||
;skip_org_role_sync = false
|
||||
;use_refresh_token = false
|
||||
|
||||
#################################### Azure AD OAuth #######################
|
||||
[auth.azuread]
|
||||
@@ -761,12 +694,10 @@
|
||||
;allowed_groups =
|
||||
;allowed_organizations =
|
||||
;role_attribute_strict = false
|
||||
;org_mapping =
|
||||
;allow_assign_grafana_admin = false
|
||||
;use_pkce = true
|
||||
# prevent synchronizing users organization roles
|
||||
;skip_org_role_sync = false
|
||||
;use_refresh_token = true
|
||||
|
||||
#################################### Okta OAuth #######################
|
||||
[auth.okta]
|
||||
@@ -789,18 +720,12 @@
|
||||
; org_mapping =
|
||||
;allow_assign_grafana_admin = false
|
||||
;skip_org_role_sync = false
|
||||
;tls_skip_verify_insecure = false
|
||||
;tls_client_cert =
|
||||
;tls_client_key =
|
||||
;tls_client_ca =
|
||||
;use_pkce = true
|
||||
;use_refresh_token = true
|
||||
|
||||
#################################### Generic OAuth ##########################
|
||||
[auth.generic_oauth]
|
||||
;name = OAuth
|
||||
;icon = signin
|
||||
;enabled = false
|
||||
;name = OAuth
|
||||
;allow_sign_up = true
|
||||
;auto_login = false
|
||||
;client_id = some_id
|
||||
@@ -811,11 +736,7 @@
|
||||
;email_attribute_path =
|
||||
;login_attribute_path =
|
||||
;name_attribute_path =
|
||||
;role_attribute_path =
|
||||
;role_attribute_strict = false
|
||||
;groups_attribute_path =
|
||||
;id_token_attribute_name =
|
||||
;team_ids_attribute_path
|
||||
;auth_url = https://foo.bar/login/oauth/authorize
|
||||
;token_url = https://foo.bar/login/oauth/access_token
|
||||
;api_url = https://foo.bar/user
|
||||
@@ -824,8 +745,11 @@
|
||||
;allowed_domains =
|
||||
;team_ids =
|
||||
;allowed_organizations =
|
||||
;role_attribute_path =
|
||||
;role_attribute_strict = false
|
||||
;org_attribute_path =
|
||||
;org_mapping =
|
||||
;groups_attribute_path =
|
||||
;team_ids_attribute_path =
|
||||
;tls_skip_verify_insecure = false
|
||||
;tls_client_cert =
|
||||
@@ -834,8 +758,6 @@
|
||||
;use_pkce = false
|
||||
;auth_style =
|
||||
;allow_assign_grafana_admin = false
|
||||
;skip_org_role_sync = false
|
||||
;use_refresh_token = false
|
||||
|
||||
#################################### Basic Auth ##########################
|
||||
[auth.basic]
|
||||
@@ -859,7 +781,6 @@
|
||||
#################################### Auth JWT ##########################
|
||||
[auth.jwt]
|
||||
;enabled = true
|
||||
;enable_login_token = false
|
||||
;header_name = X-JWT-Assertion
|
||||
;email_claim = sub
|
||||
;username_claim = sub
|
||||
@@ -873,13 +794,11 @@
|
||||
# Use in conjunction with key_file in case the JWT token's header specifies a key ID in "kid" field
|
||||
;key_id = some-key-id
|
||||
;role_attribute_path =
|
||||
;role_attribute_strict = false
|
||||
;groups_attribute_path =
|
||||
;role_attribute_strict = false
|
||||
;auto_sign_up = false
|
||||
;url_login = false
|
||||
;allow_assign_grafana_admin = false
|
||||
;skip_org_role_sync = false
|
||||
;signout_redirect_url =
|
||||
|
||||
#################################### Auth LDAP ##########################
|
||||
[auth.ldap]
|
||||
@@ -1001,10 +920,6 @@
|
||||
# By default this will include all Grafana Labs owned Azure plugins, or those that make use of Azure settings (Azure Monitor, Azure Data Explorer, Prometheus, MSSQL).
|
||||
;forward_settings_to_plugins = grafana-azure-monitor-datasource, prometheus, grafana-azure-data-explorer-datasource, mssql
|
||||
|
||||
# Specifies whether Entra password auth can be used for the MSSQL data source
|
||||
# Disabled by default, needs to be explicitly enabled
|
||||
;azure_entra_password_credentials_enabled = false
|
||||
|
||||
#################################### Role-based Access Control ###########
|
||||
[rbac]
|
||||
;permission_cache = true
|
||||
@@ -1127,9 +1042,6 @@
|
||||
# Should webvitals instrumentation be enabled, only affects Grafana Javascript Agent
|
||||
;instrumentations_webvitals_enabled = false
|
||||
|
||||
# Should tracing instrumentation be enabled, only affects Grafana Javascript Agent
|
||||
;instrumentations_tracing_enabled = false
|
||||
|
||||
# Api Key, only applies to Grafana Javascript Agent provider
|
||||
;api_key = testApiKey
|
||||
|
||||
@@ -1174,9 +1086,6 @@
|
||||
# global limit of alerts
|
||||
;global_alert_rule = -1
|
||||
|
||||
# global limit of files uploaded to the SQL DB
|
||||
;global_file = 1000
|
||||
|
||||
# global limit of correlations
|
||||
; global_correlations = -1
|
||||
|
||||
@@ -1184,11 +1093,6 @@
|
||||
# This is not strictly enforced yet, but will be enforced over time.
|
||||
;alerting_rule_group_rules = 100
|
||||
|
||||
# Limit the number of query evaluation results per alert rule.
|
||||
# If the condition query of an alert rule produces more results than this limit,
|
||||
# the evaluation results in an error.
|
||||
;alerting_rule_evaluation_results = -1
|
||||
|
||||
#################################### Unified Alerting ####################
|
||||
[unified_alerting]
|
||||
#Enable the Unified Alerting sub-system and interface. When enabled we'll migrate all of your alert rules and notification channels to the new system. New alert rules will be created and your notification channels will be converted into an Alertmanager configuration. Previous data is preserved to enable backwards compatibility but new data is removed.```
|
||||
@@ -1197,9 +1101,6 @@
|
||||
# Comma-separated list of organization IDs for which to disable unified alerting. Only supported if unified alerting is enabled.
|
||||
;disabled_orgs =
|
||||
|
||||
# Specify how long to wait for the alerting service to initialize
|
||||
;initialization_timeout = 30s
|
||||
|
||||
# Specify the frequency of polling for admin config changes.
|
||||
# The interval string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
|
||||
;admin_config_poll_interval = 60s
|
||||
@@ -1208,13 +1109,6 @@
|
||||
# The interval string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
|
||||
;alertmanager_config_poll_interval = 60s
|
||||
|
||||
|
||||
# Maximum number of active and pending silences that a tenant can have at once. Default: 0 (no limit).
|
||||
;alertmanager_max_silences_count =
|
||||
|
||||
# Maximum silence size in bytes. Default: 0 (no limit).
|
||||
;alertmanager_max_silence_size_bytes =
|
||||
|
||||
# Set to true when using redis in cluster mode.
|
||||
;ha_redis_cluster_mode_enabled = false
|
||||
|
||||
@@ -1296,10 +1190,6 @@
|
||||
# The interval string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
|
||||
;ha_gossip_interval = "200ms"
|
||||
|
||||
# Length of time to attempt to reconnect to a lost peer. Recommended to be short (<15m) when Grafana is running in a Kubernetes cluster.
|
||||
# The string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
|
||||
;ha_reconnect_timeout = 6h
|
||||
|
||||
# The interval between gossip full state syncs. Setting this interval lower (more frequent) will increase convergence speeds
|
||||
# across larger clusters at the expense of increased bandwidth usage.
|
||||
# The interval string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
|
||||
@@ -1335,43 +1225,6 @@
|
||||
# Retention period for Alertmanager notification log entries.
|
||||
;notification_log_retention = 5d
|
||||
|
||||
# Duration for which a resolved alert state transition will continue to be sent to the Alertmanager.
|
||||
;resolved_alert_retention = 15m
|
||||
|
||||
# Defines the limit of how many alert rule versions
|
||||
# should be stored in the database for each alert rule in an organization including the current one.
|
||||
# 0 value means no limit
|
||||
;rule_version_record_limit= 0
|
||||
|
||||
[unified_alerting.screenshots]
|
||||
# Enable screenshots in notifications. You must have either installed the Grafana image rendering
|
||||
# plugin, or set up Grafana to use a remote rendering service.
|
||||
# For more information on configuration options, refer to [rendering].
|
||||
;capture = false
|
||||
|
||||
# The timeout for capturing screenshots. If a screenshot cannot be captured within the timeout then
|
||||
# the notification is sent without a screenshot. The maximum duration is 30 seconds. This timeout
|
||||
# should be less than the minimum Interval of all Evaluation Groups to avoid back pressure on alert
|
||||
# rule evaluation.
|
||||
;capture_timeout = 10s
|
||||
|
||||
# The maximum number of screenshots that can be taken at the same time. This option is different from
|
||||
# concurrent_render_request_limit as max_concurrent_screenshots sets the number of concurrent screenshots
|
||||
# that can be taken at the same time for all firing alerts where as concurrent_render_request_limit sets
|
||||
# the total number of concurrent screenshots across all Grafana services.
|
||||
;max_concurrent_screenshots = 5
|
||||
|
||||
# Uploads screenshots to the local Grafana server or remote storage such as Azure, S3 and GCS. Please
|
||||
# see [external_image_storage] for further configuration options. If this option is false then
|
||||
# screenshots will be persisted to disk for up to temp_data_lifetime.
|
||||
;upload_external_image_storage = false
|
||||
|
||||
[unified_alerting.reserved_labels]
|
||||
# Comma-separated list of reserved labels added by the Grafana Alerting engine that should be disabled.
|
||||
# For example: `disabled_labels=grafana_folder`
|
||||
disabled_labels =
|
||||
|
||||
|
||||
[unified_alerting.reserved_labels]
|
||||
# Comma-separated list of reserved labels added by the Grafana Alerting engine that should be disabled.
|
||||
# For example: `disabled_labels=grafana_folder`
|
||||
@@ -1426,12 +1279,6 @@ disabled_labels =
|
||||
# Optional max query length for queries sent to Loki. Default is 721h which matches the default Loki value.
|
||||
; loki_max_query_length = 360h
|
||||
|
||||
# For "loki" only.
|
||||
# Maximum size in bytes for queries sent to Loki. This limit is applied to user provided filters as well as system defined ones, e.g. applied by access control.
|
||||
# If filter exceeds the limit, API returns error with code "alerting.state-history.loki.requestTooLong".
|
||||
# Default is 64kb
|
||||
;loki_max_query_size = 65536
|
||||
|
||||
[unified_alerting.state_history.external_labels]
|
||||
# Optional extra labels to attach to outbound state history records or log streams.
|
||||
# Any number of label key-value-pairs can be provided.
|
||||
@@ -1448,27 +1295,6 @@ max_age =
|
||||
# Configures max number of alert annotations that Grafana stores. Default value is 0, which keeps all alert annotations.
|
||||
max_annotations_to_keep =
|
||||
|
||||
#################################### Recording Rules #####################
|
||||
[recording_rules]
|
||||
# Enable recording rules. You must provide write credentials below.
|
||||
enabled = false
|
||||
|
||||
# Target URL (including write path) for recording rules.
|
||||
url =
|
||||
|
||||
# Optional username for basic authentication on recording rule write requests. Can be left blank to disable basic auth
|
||||
basic_auth_username =
|
||||
|
||||
# Optional assword for basic authentication on recording rule write requests. Can be left blank.
|
||||
basic_auth_password =
|
||||
|
||||
# Request timeout for recording rule writes.
|
||||
timeout = 30s
|
||||
|
||||
# Optional custom headers to include in recording rule write requests.
|
||||
[recording_rules.custom_headers]
|
||||
# exampleHeader = exampleValue
|
||||
|
||||
#################################### Annotations #########################
|
||||
[annotations]
|
||||
# Configures the batch size for the annotation clean-up job. This setting is used for dashboard, API, and alert annotations.
|
||||
@@ -1529,11 +1355,6 @@ timeout = 30s
|
||||
# Enable the Query history
|
||||
;enabled = true
|
||||
|
||||
#################################### Short Links #############################
|
||||
[short_links]
|
||||
# Short links which are never accessed will be deleted as cleanup. Time is in days. Default is 7 days. Max is 365. 0 means they will be deleted approximately every 10 minutes.
|
||||
;expire_time = 7
|
||||
|
||||
#################################### Internal Grafana Metrics ##########################
|
||||
# Metrics available at HTTP URL /metrics and /metrics/plugins/:pluginId
|
||||
[metrics]
|
||||
@@ -1641,16 +1462,14 @@ timeout = 30s
|
||||
|
||||
[external_image_storage.webdav]
|
||||
;url =
|
||||
;public_url =
|
||||
;username =
|
||||
;password =
|
||||
;public_url =
|
||||
|
||||
[external_image_storage.gcs]
|
||||
;key_file =
|
||||
;bucket =
|
||||
;path =
|
||||
;enable_signed_urls = false
|
||||
;signed_url_expiration =
|
||||
|
||||
[external_image_storage.azure_blob]
|
||||
;account_name =
|
||||
@@ -1677,12 +1496,6 @@ timeout = 30s
|
||||
# Default is 5m. This should be more than enough for most deployments.
|
||||
# Change the value only if image rendering is failing and you see `Failed to get the render key from cache` in Grafana logs.
|
||||
;render_key_lifetime = 5m
|
||||
# Default width for panel screenshot
|
||||
;default_image_width = 1000
|
||||
# Default height for panel screenshot
|
||||
;default_image_height = 500
|
||||
# Default scale for panel screenshot
|
||||
;default_image_scale = 1
|
||||
|
||||
[panels]
|
||||
# If set to true Grafana will allow script tags in text panels. Not recommended as it enable XSS vulnerabilities.
|
||||
@@ -1733,9 +1546,6 @@ timeout = 30s
|
||||
# ha_engine_password allows setting an optional password to authenticate with the engine
|
||||
;ha_engine_password = ""
|
||||
|
||||
# ha_prefix is a prefix for keys in the HA engine. It's used to separate keys for different Grafana instances.
|
||||
;ha_prefix =
|
||||
|
||||
#################################### Grafana Image Renderer Plugin ##########################
|
||||
[plugin.grafana-image-renderer]
|
||||
# Instruct headless browser instance to use a default timezone when not provided by Grafana, e.g. when rendering panel image of alert.
|
||||
@@ -1765,10 +1575,6 @@ timeout = 30s
|
||||
# Default is false. This can be useful to enable (true) when troubleshooting.
|
||||
;rendering_dumpio =
|
||||
|
||||
# Instruct headless browser instance whether to register metrics for the duration of every rendering step. Default is false.
|
||||
# This can be useful to enable (true) when optimizing the rendering mode settings to improve the plugin performance or when troubleshooting.
|
||||
;rendering_timing_metrics =
|
||||
|
||||
# Additional arguments to pass to the headless browser instance. Default is --no-sandbox. The list of Chromium flags can be found
|
||||
# here (https://peter.sh/experiments/chromium-command-line-switches/). Multiple arguments is separated with comma-character.
|
||||
;rendering_args =
|
||||
@@ -1802,6 +1608,14 @@ timeout = 30s
|
||||
;grpc_host =
|
||||
;grpc_port =
|
||||
|
||||
[support_bundles]
|
||||
# Enable support bundle creation (default: true)
|
||||
#enabled = true
|
||||
# Only server admins can generate and view support bundles (default: true)
|
||||
#server_admin_only = true
|
||||
# If set, bundles will be encrypted with the provided public keys separated by whitespace
|
||||
#public_keys = ""
|
||||
|
||||
[enterprise]
|
||||
# Path to a valid Grafana Enterprise license.jwt file
|
||||
;license_path =
|
||||
@@ -1854,15 +1668,6 @@ timeout = 30s
|
||||
# Enable or disable loading other base map layers
|
||||
;enable_custom_baselayers = true
|
||||
|
||||
#################################### Support Bundles #####################################
|
||||
[support_bundles]
|
||||
# Enable support bundle creation (default: true)
|
||||
#enabled = true
|
||||
# Only server admins can generate and view support bundles (default: true)
|
||||
#server_admin_only = true
|
||||
# If set, bundles will be encrypted with the provided public keys separated by whitespace
|
||||
#public_keys = ""
|
||||
|
||||
# Move an app plugin referenced by its id (including all its pages) to a specific navigation section
|
||||
[navigation.app_sections]
|
||||
# The following will move an app plugin with the id of `my-app-id` under the `cfg` section
|
||||
@@ -1903,44 +1708,3 @@ timeout = 30s
|
||||
[public_dashboards]
|
||||
# Set to false to disable public dashboards
|
||||
;enabled = true
|
||||
|
||||
###################################### Cloud Migration ######################################
|
||||
[cloud_migration]
|
||||
# Set to true to enable target-side migration UI
|
||||
;is_target = false
|
||||
# Token used to send requests to grafana com
|
||||
;gcom_api_token = ""
|
||||
# How long to wait for a request sent to gms to start a snapshot to complete
|
||||
;start_snapshot_timeout = 5s
|
||||
# How long to wait for a request sent to gms to validate a key to complete
|
||||
;validate_key_timeout = 5s
|
||||
# How long to wait for a request sent to gms to get a snapshot status to complete
|
||||
;get_snapshot_status_timeout = 5s
|
||||
# How long to wait for a request sent to gms to create a presigned upload url
|
||||
;create_upload_url_timeout = 5s
|
||||
# How long to wait for a request sent to gms to report an event
|
||||
;report_event_timeout = 5s
|
||||
# How long to wait for a request to fetch an instance to complete
|
||||
;fetch_instance_timeout = 5s
|
||||
# How long to wait for a request to create an access policy to complete
|
||||
;create_access_policy_timeout = 5s
|
||||
# How long to wait for a request to create to fetch an access policy to complete
|
||||
;fetch_access_policy_timeout = 5s
|
||||
# How long to wait for a request to create to delete an access policy to complete
|
||||
;delete_access_policy_timeout = 5s
|
||||
# The domain name used to access cms
|
||||
;domain = grafana-dev.net
|
||||
# Folder used to store snapshot files. Defaults to the home dir
|
||||
;snapshot_folder = ""
|
||||
# Link to form to give feedback on the feature
|
||||
;feedback_url = ""
|
||||
# How frequently should the frontend UI poll for changes while resources are migrating
|
||||
;frontend_poll_interval = 2s
|
||||
|
||||
################################## Frontend development configuration ###################################
|
||||
# Warning! Any settings placed in this section will be available on `process.env.frontend_dev_{foo}` within frontend code
|
||||
# Any values placed here may be accessible to the UI. Do not place sensitive information here.
|
||||
[frontend_dev]
|
||||
# Should UI tests fail when console log/warn/erroring?
|
||||
# Does not affect the result when running on CI - only for allowing devs to choose this behaviour locally
|
||||
; fail_tests_on_console = true
|
||||
|
||||
@@ -270,17 +270,17 @@ In case there is an uncertainty around the prioritization of an issue, please as
|
||||
1. If applicable, label the issue `priority/support-subscription`.
|
||||
1. Add the issue to the next upcoming patch or major/minor stable release milestone. Ask maintainers for help if unsure if it's a patch or not. Create a new milestone if there are none.
|
||||
1. Make sure to add the issue to a suitable backlog of a GitHub project and prioritize it or assign someone to work on it now or very soon.
|
||||
1. Consider requesting [help from the community](#5-request-help-from-the-community), even though it may be problematic given a short amount of time until it should be released.
|
||||
1. Consider requesting [help from the community](#5-requesting-help-from-the-community), even though it may be problematic given a short amount of time until it should be released.
|
||||
|
||||
**Important long-term**
|
||||
|
||||
1. Label the issue `priority/important-longterm`.
|
||||
1. Consider requesting [help from the community](#5-request-help-from-the-community).
|
||||
1. Consider requesting [help from the community](#5-requesting-help-from-the-community).
|
||||
|
||||
**Nice to have**
|
||||
|
||||
1. Label the issue `priority/nice-to-have`.
|
||||
1. Consider requesting [help from the community](#5-request-help-from-the-community).
|
||||
1. Consider requesting [help from the community](#5-requesting-help-from-the-community).
|
||||
|
||||
**Not critical, but unsure?**
|
||||
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
# Architecture
|
||||
|
||||
Do you want to make Grafana contributions with bigger impact? These guides help you get a better understanding of the structure and design of the Grafana codebase.
|
||||
Are you looking to take on contributions with bigger impact? These guides help you get a better understanding of the structure and design of the Grafana codebase.
|
||||
|
||||
- To learn more about the frontend architecture, refer to [Frontend data requests](frontend-data-requests.md).
|
||||
- To learn more about the backend architecture, refer to [contribute/backend](/contribute/backend/README.md).
|
||||
Learn more about the backend architecture in [contribute/backend](/contribute/backend/README.md).
|
||||
|
||||
Learn more about the frontend architecture:
|
||||
|
||||
- Part 1: [Data requests](frontend-data-requests.md)
|
||||
|
||||
@@ -1,18 +1,16 @@
|
||||
# Frontend data requests
|
||||
# Data requests
|
||||
|
||||
[BackendSrv](https://github.com/grafana/grafana/blob/main/packages/grafana-runtime/src/services/backendSrv.ts) handles all outgoing HTTP requests from Grafana. This document explains the high-level concepts used by `BackendSrv`.
|
||||
|
||||
## Cancel requests
|
||||
## Canceling requests
|
||||
|
||||
While data sources can implement their own cancellation concept, we recommend that you use the method described in this section.
|
||||
This section describes how canceling requests work in Grafana. While data sources can implement their own cancellation concept, we recommend that you use the method we describe here.
|
||||
|
||||
A data request can take a long time to finish. During the time between when a request starts and finishes, the user can change context. For example, the user may navigate away or issue the same request again.
|
||||
|
||||
If we wait for canceled requests to complete, they might create unnecessary load on the data sources.
|
||||
If we wait for canceled requests to complete, it might create unnecessary load on data sources.
|
||||
|
||||
### Request cancellation by Grafana version
|
||||
|
||||
Grafana uses a concept called _request cancellation_ to cancel any ongoing request that Grafana doesn't need. The process for canceling requests in this manner varies by Grafana version.
|
||||
Grafana uses a concept called _request cancellation_ to cancel any ongoing request that Grafana doesn't need.
|
||||
|
||||
#### Before Grafana 7.2
|
||||
|
||||
@@ -27,22 +25,22 @@ The cancellation logic is as follows:
|
||||
|
||||
Grafana 7.2 introduced an additional way of canceling requests using [RxJs](https://github.com/ReactiveX/rxjs). To support the new cancellation functionality, the data source needs to use the new `fetch` function in [BackendSrv](https://github.com/grafana/grafana/blob/main/packages/grafana-runtime/src/services/backendSrv.ts).
|
||||
|
||||
Migrating the core data sources to the new `fetch` function is an ongoing process. To learn more, refer to [this issue](https://github.com/grafana/grafana/issues/27222).
|
||||
Migrating the core data sources to the new `fetch` function [is an ongoing process that you can read about in this issue.](https://github.com/grafana/grafana/issues/27222)
|
||||
|
||||
## Request queue
|
||||
|
||||
If Grafana isn't configured to support HTTP/2, browsers connecting with HTTP 1.1 enforce a limit of 4 to 8 parallel requests (the specific limit varies). Because of this limit, if some requests take a long time, they will block later requests and make interacting with Grafana very slow.
|
||||
If Grafana isn't configured to support HTTP/2, browsers connecting with HTTP 1.1 enforce a limit of 4 - 8 parallel requests (the specific limit varies). Because of this limit, if some requests take a long time, they will block later requests and make interacting with Grafana very slow.
|
||||
|
||||
[Enabling HTTP/2 support in Grafana](https://grafana.com/docs/grafana/latest/administration/configuration/#protocol) allows far more parallel requests.
|
||||
|
||||
### Before Grafana 7.2
|
||||
#### Before Grafana 7.2
|
||||
|
||||
Not supported.
|
||||
|
||||
### After Grafana 7.2
|
||||
#### After Grafana 7.2
|
||||
|
||||
Grafana uses a _request queue_ to process all incoming data requests in order while reserving a free "spot" for any requests to the Grafana API.
|
||||
|
||||
Since the first implementation of the request queue doesn't take into account what browser the user uses, the request queue's limit for parallel data source requests is hard-coded to 5.
|
||||
Since the first implementation of the request queue doesn't take into account what browser the user uses, the _request queue_ limit for parallel data source requests is hard-coded to 5.
|
||||
|
||||
> **Note:** Grafana instances [configured with HTTP/2](https://grafana.com/docs/grafana/latest/administration/configuration/#protocol) have a hard-coded limit of 1000.
|
||||
> **Note:** Grafana instances [configured with HTTP2](https://grafana.com/docs/grafana/latest/administration/configuration/#protocol) will have a hard coded limit of 1000.
|
||||
|
||||
@@ -1,16 +1,13 @@
|
||||
# Backend
|
||||
|
||||
The contribution guidelines for Grafana backend developers contain a lot of information for anyone who wants to contribute to our open source project.
|
||||
But you don't necessarily have to read all of it, so long as you read what is most relevant to you.
|
||||
First read the [backend style guide](/contribute/backend/style-guide.md)
|
||||
to get a sense for how we work to ensure that the Grafana codebase is
|
||||
consistent and accessible. The rest of the backend contributor
|
||||
documentation is more relevant to reviewers and contributors looking to
|
||||
make larger changes.
|
||||
|
||||
## Guidelines everyone should read
|
||||
|
||||
We recommend that all contributors read the [backend style guide](/contribute/backend/style-guide.md) to get a sense for how we try to ensure that the Grafana codebase is consistent and accessible.
|
||||
The rest of the backend contributor documentation tends to be more relevant to reviewers and contributors who want to make changes of greater size or quantity.
|
||||
|
||||
## Guidelines specifically for backend developers
|
||||
|
||||
For anyone who reviews code for the Grafana backend, get a basic understanding of the content of the following files:
|
||||
For anyone reviewing code for Grafana's backend, a basic understanding
|
||||
of content of the following files is expected:
|
||||
|
||||
- [Currently recommended practices](/contribute/backend/recommended-practices.md)
|
||||
- [Services](/contribute/backend/services.md)
|
||||
@@ -18,11 +15,13 @@ For anyone who reviews code for the Grafana backend, get a basic understanding o
|
||||
- [Database](/contribute/backend/database.md)
|
||||
- [HTTP API](/pkg/api/README.md)
|
||||
|
||||
## Guidelines for contributors who make or review large changes to the backend
|
||||
|
||||
If you want to make or review large changes to the backend, be sure to habitually familiarize yourself with the entire contents of
|
||||
Reviewers who review large changes should additionally make a habit out
|
||||
of familiarizing themselves with the content of
|
||||
[/contribute/backend](/contribute/backend) from time to time.
|
||||
|
||||
## Guidelines for dependency management
|
||||
## Dependency management
|
||||
|
||||
If you work with a dependency that requires an upgrade, refer to [Upgrade dependencies](/contribute/backend/upgrade-dependencies.md).
|
||||
Refer to:
|
||||
|
||||
- [UPGRADING_DEPENDENCIES.md](https://github.com/grafana/grafana/blob/main/UPGRADING_DEPENDENCIES.md)
|
||||
- [Upgrading dependencies](/contribute/backend/upgrading-dependencies.md)
|
||||
|
||||
@@ -1,30 +1,30 @@
|
||||
# Communication
|
||||
|
||||
Grafana uses dependency injection and method calls on Go interfaces to
|
||||
Grafana use dependency injection and method calls on Go interfaces to
|
||||
communicate between different parts of the backend.
|
||||
|
||||
## Commands and queries
|
||||
|
||||
Grafana structures arguments to [services](services.md) using a "command/query"
|
||||
Grafana structures arguments to [services](services.md) using a command/query
|
||||
separation where commands are instructions for a mutation and queries retrieve
|
||||
records from a service.
|
||||
|
||||
Services should define their methods as follows:
|
||||
|
||||
- `func[T, U any](ctx context.Context, args T) (U, error)`
|
||||
Services should define their methods as `func[T, U any](ctx context.Context, args T) (U, error)`.
|
||||
|
||||
Each function should take two arguments. First, a `context.Context` that
|
||||
carries information about the tracing span, cancellation, and similar
|
||||
runtime information that might be relevant to the call. Secondly, `T`,
|
||||
a struct defined in the service's root package. Refer to the instructions
|
||||
for [package hierarchy](package-hierarchy.md) that contains zero or
|
||||
runtime information that might be relevant to the call. Secondly, `T` is
|
||||
a `struct` defined in the service's root package (see the instructions
|
||||
for [package hierarchy](package-hierarchy.md)) that contains zero or
|
||||
more arguments that can be passed to the method.
|
||||
|
||||
The return values are more flexible, and these may consist of none, one, or two values.
|
||||
If the function returns two values, the second value should be either a `bool` or `error` to indicate the success or failure of the call.
|
||||
The first value `U` carries a value of any exported type appropriate for the service.
|
||||
The return values is more flexible, and may consist of none, one, or two
|
||||
values. If there are two values returned, the second value should be
|
||||
either an `bool` or `error` indicating the success or failure of the
|
||||
call. The first value `U` carries a value of any exported type that
|
||||
makes sense for the service.
|
||||
|
||||
The following example shows an interface that provides method signatures for
|
||||
Following is an example of an interface providing method signatures for
|
||||
some calls adhering to these guidelines:
|
||||
|
||||
```
|
||||
@@ -39,20 +39,23 @@ type Alphabetical interface {
|
||||
}
|
||||
```
|
||||
|
||||
> **Note:** Because we request an operation to be performed, command are written in imperative mood, such as `CreateFolderCommand`, `GetDashboardQuery` and `DeletePlaylistCommand`.
|
||||
> Because we request an operation to be performed, command are written in imperative mood, such as `CreateFolderCommand`, `GetDashboardQuery` and `DeletePlaylistCommand`.
|
||||
|
||||
The use of complex types for arguments in Go means a few different
|
||||
things for us. Most importantly, it provides us with the equivalent of named parameters from other languages, and it reduces the headache of figuring out which argument is which that often occurs with three or more arguments.
|
||||
things for us, it provides us with the equivalent of named parameters
|
||||
from other languages, and it reduces the headache of figuring out which
|
||||
argument is which that often occurs with three or more arguments.
|
||||
|
||||
However, it means that all input parameters are optional and
|
||||
that it's up to the developer to make sure that the zero value is
|
||||
useful or at least safe for all fields.
|
||||
Also, although it's easy to add another field, the field must be set for the correct function of the service that isn't detectable at compile time.
|
||||
On the flip-side, it means that all input parameters are optional and
|
||||
that it is up to the programmer to make sure that the zero value is
|
||||
useful or at least safe for all fields and that while it's easy to add
|
||||
another field, if that field must be set for the correct function of the
|
||||
service that is not detectable at compile time.
|
||||
|
||||
### Queries with Result fields
|
||||
|
||||
Some queries have a `Result` field that is mutated and populated by the
|
||||
method being called. This is a remainder from when the `_bus_` was used
|
||||
Some queries have a Result field that is mutated and populated by the
|
||||
method being called. This is a remainder from when the _bus_ was used
|
||||
for sending commands and queries as well as for events.
|
||||
|
||||
All bus commands and queries had to implement the Go type
|
||||
@@ -60,8 +63,8 @@ All bus commands and queries had to implement the Go type
|
||||
and mutation of the `msg` variable or returning structured information in
|
||||
`error` were the two most convenient ways to communicate with the caller.
|
||||
|
||||
You should refactor all `Result` fields so that they are returned from
|
||||
the query method. For example:
|
||||
All `Result` fields should be refactored so that they are returned from
|
||||
the query method:
|
||||
|
||||
```
|
||||
type GetQuery struct {
|
||||
@@ -92,9 +95,9 @@ func (s *Service) Get(ctx context.Context, cmd GetQuery) (ResultType, error) {
|
||||
|
||||
## Events
|
||||
|
||||
An _event_ is something that happened in the past. Since an event has already happened, you can't change it. Instead, you can react to events by triggering additional application logic to be run, whenever they occur.
|
||||
An event is something that happened in the past. Since an event has already happened, you can't change it. Instead, you can react to events by triggering additional application logic to be run, whenever they occur.
|
||||
|
||||
> **Note:** Because events happened in the past, their names are written in the past tense, such as `UserCreated` and `OrgUpdated`.
|
||||
> Because they happened in the past, event names are written in past tense, such as `UserCreated`, and `OrgUpdated`.
|
||||
|
||||
### Subscribe to an event
|
||||
|
||||
@@ -113,11 +116,11 @@ func (s *MyService) UserCreated(event *events.UserCreated) error {
|
||||
}
|
||||
```
|
||||
|
||||
> **Tip:** To learn about the available events, refer to the documentation in the `events` package.
|
||||
**Tip:** Browse the available events in the `events` package.
|
||||
|
||||
### Publish an event
|
||||
|
||||
If you want to let other parts of the application react to changes in a service, you can publish your own events. For example:
|
||||
If you want to let other parts of the application react to changes in a service, you can publish your own events:
|
||||
|
||||
```go
|
||||
event := &events.StickersSentEvent {
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
# Database
|
||||
|
||||
Grafana uses databases to persist settings between restarts. If you don't specify one, Grafana creates a [SQLite3](https://www.sqlite.org/) database file on your local disk. This guide explains how to store and retrieve data from the default or other databases.
|
||||
|
||||
## Supported databases and services
|
||||
Grafana uses a database to persist settings between restarts. In fact, if you don't specify one, Grafana creates a [SQLite3](https://www.sqlite.org/) database file on your local disk. This guide explains how to store and retrieve data from the database.
|
||||
|
||||
Grafana supports the [following databases](https://grafana.com/docs/installation/requirements/#database):
|
||||
|
||||
@@ -18,7 +16,7 @@ Grafana uses the [XORM](https://xorm.io) framework for persisting objects to the
|
||||
|
||||
> **Deprecated:** We are deprecating `sqlstore` handlers in favor of using the `SQLStore` object directly in each service. Since most services still use the `sqlstore` handlers, we still want to explain how they work.
|
||||
|
||||
The `sqlstore` package allows you to register [command handlers](communication.md#commands-and-queries) that either store or retrieve objects from the database. The `sqlstore` handlers are similar to services:
|
||||
The `sqlstore` package allows you to register [command handlers](communication.md#handle-commands) that either store, or retrieve objects from the database. `sqlstore` handlers are similar to services:
|
||||
|
||||
- [Services](services.md) are command handlers that _contain business logic_.
|
||||
- `sqlstore` handlers are command handlers that _access the database_.
|
||||
@@ -29,8 +27,8 @@ The `sqlstore` package allows you to register [command handlers](communication.m
|
||||
|
||||
To register a handler:
|
||||
|
||||
- Create a new file, `myrepo.go`, in the `sqlstore` package.
|
||||
- Create a [command handler](communication.md#commands-and-queries).
|
||||
- Create a new file `myrepo.go` in the `sqlstore` package.
|
||||
- Create a [command handler](communication.md#handle-commands).
|
||||
- Register the handler in the `init` function:
|
||||
|
||||
```go
|
||||
@@ -50,7 +48,7 @@ Here, `inTransactionCtx` is a helper function in the `sqlstore` package that pro
|
||||
|
||||
## `SQLStore`
|
||||
|
||||
As opposed to a `sqlstore` handler, the `SQLStore` is a service itself. Like the handler, the `SQLStore` is responsible for storing and retrieving objects, to and from the database.
|
||||
As opposed to a `sqlstore` handler, the `SQLStore` is a service itself. The `SQLStore` has the same responsibility however: to store and retrieve objects, to and from the database.
|
||||
|
||||
To use the `SQLStore`, inject it in your service struct:
|
||||
|
||||
@@ -60,7 +58,7 @@ type MyService struct {
|
||||
}
|
||||
```
|
||||
|
||||
You can now make SQL queries in any of your [command handlers](communication.md#commands-and-queries) or [event listeners](communication.md#subscribe-to-an-event):
|
||||
You can now make SQL queries in any of your [command handlers](communication.md#handle-commands) or [event listeners](communication.md#subscribe-to-an-event):
|
||||
|
||||
```go
|
||||
func (s *MyService) DeleteDashboard(ctx context.Context, cmd *models.DeleteDashboardCommand) error {
|
||||
@@ -75,13 +73,13 @@ For transactions, use the `WithTransactionalDbSession` method instead.
|
||||
|
||||
## Migrations
|
||||
|
||||
As your use of Grafana evolves, you may need to create _schema migrations_ for one or more database tables.
|
||||
As Grafana evolves, it becomes necessary to create _schema migrations_ for one or more database tables.
|
||||
|
||||
To see all the types of migrations you can add, refer to [migrations.go](/pkg/services/sqlstore/migrator/migrations.go).
|
||||
|
||||
Before you add a migration, make sure that you:
|
||||
|
||||
- Never change a migration that has been committed and pushed to `main`.
|
||||
- Never change a migration that has been committed and pushed to main.
|
||||
- Always add new migrations, to change or undo previous migrations.
|
||||
|
||||
Add a migration using one of the following methods:
|
||||
@@ -89,7 +87,7 @@ Add a migration using one of the following methods:
|
||||
- Add migrations in the `migrations` package.
|
||||
- Implement the `DatabaseMigrator` for the service.
|
||||
|
||||
> **Important:** If there are previous migrations for a service, use that method. Don't add migrations using both methods or you risk running migrations in the wrong order.
|
||||
**Important:** If there are previous migrations for a service, use that method. By adding migrations using both methods, you risk running migrations in the wrong order.
|
||||
|
||||
### Add migrations in `migrations` package
|
||||
|
||||
@@ -99,15 +97,15 @@ To add a migration:
|
||||
|
||||
- Open the [migrations.go](/pkg/services/sqlstore/migrations/migrations.go) file.
|
||||
- In the `AddMigrations` function, find the `addXxxMigration` function for the service you want to create a migration for.
|
||||
- At the end of the `addXxxMigration` function, register your migration (refer to the following example).
|
||||
- At the end of the `addXxxMigration` function, register your migration:
|
||||
|
||||
- [Example](https://github.com/grafana/grafana/blob/00d0640b6e778ddaca021670fe851fe00982acf2/pkg/services/sqlstore/migrations/migrations.go#L55-L70)
|
||||
> **NOTE:** Putting migrations behind feature flags is no longer recommended as it may cause the migration skip integration testing.
|
||||
|
||||
> **Note:** We no longer recommend putting migrations behind feature flags because this could cause the migration to skip integration testing.
|
||||
[Example](https://github.com/grafana/grafana/blob/00d0640b6e778ddaca021670fe851fe00982acf2/pkg/services/sqlstore/migrations/migrations.go#L55-L70)
|
||||
|
||||
### Implement `DatabaseMigrator`
|
||||
|
||||
During initialization, SQL store queries the service registry, and runs migrations for every service that implements the [DatabaseMigrator](https://github.com/grafana/grafana/blob/d27c3822f28e5f26199b4817892d6d24a7a26567/pkg/registry/registry.go#L46-L50) interface.
|
||||
During initialization, SQL store queries the service registry, and runs migrations for every service that implements the [DatabaseMigrator](https://github.com/grafana/grafana/blob/44c2007498c76c2dbb48e8366b4af410f1ee1b98/pkg/registry/registry.go#L101-L106) interface.
|
||||
|
||||
To add a migration:
|
||||
|
||||
|
||||
@@ -1,24 +1,26 @@
|
||||
# Errors
|
||||
|
||||
Grafana includes its own error type [github.com/grafana/grafana/pkg/util/errutil.Error](../../pkg/util/errutil/errors.go).
|
||||
Introduced in June 2022, the type is built on top of the Go `error` interface.
|
||||
It extends the interface to contain all the information necessary by Grafana to handle errors in an informative and safe way.
|
||||
Grafana introduced its own error type [github.com/grafana/grafana/pkg/util/errutil.Error](../../pkg/util/errutil/errors.go)
|
||||
in June 2022. It's built on top of the Go `error` interface extended to
|
||||
contain all the information necessary by Grafana to handle errors in an
|
||||
informative and safe way.
|
||||
|
||||
Previously, Grafana passed around regular Go errors and therefore had to
|
||||
Previously, Grafana has passed around regular Go errors and have had to
|
||||
rely on bespoke solutions in API handlers to communicate informative
|
||||
messages to the end-user. With the new `errutil.Error`, the API handlers
|
||||
can be streamlined. The error carries information about public messaging,
|
||||
structured data related to the error, localization metadata, log level,
|
||||
HTTP status code, and so on.
|
||||
can be slimmed as information about public messaging, structured data
|
||||
related to the error, localization metadata, log level, HTTP status
|
||||
code, and so forth are carried by the error.
|
||||
|
||||
## Declare errors
|
||||
## Basic use
|
||||
|
||||
### Declaring errors
|
||||
|
||||
For a service, declare the different categories of errors that may occur
|
||||
from your service (this corresponds to categories for which you might want
|
||||
to have specific public error messages or templates).
|
||||
|
||||
Globally construct variables using the `errutil.<status>(status, messageID, opts...)
|
||||
functions. For example:
|
||||
from your service (this corresponds to what you might want to have
|
||||
specific public error messages or their templates for) by globally
|
||||
constructing variables using the `errutil.<status>(status, messageID, opts...)`
|
||||
functions, e.g.
|
||||
|
||||
- `errutil.NotFound(messageID, opts...)`
|
||||
- `errutil.BadRequest(messageID, opts...)`
|
||||
@@ -31,41 +33,44 @@ functions. For example:
|
||||
- `errutil.NotImplemented(messageID, opts...)`
|
||||
- `errutil.ClientClosedRequest(messageID, opts...)`
|
||||
|
||||
The previous functions use `errutil.NewBase(status, messageID, opts...)` under the covers, and that function should in general only be used outside the `errutil` package for `errutil.StatusUnknown`. For example, you can use that function when there are no accurate status code available.
|
||||
Above functions uses `errutil.NewBase(status, messageID, opts...)` under the covers, and that function should in general only be used outside the `errutil` package for `errutil.StatusUnknown`, e.g. when there are no accurate status code available/provided.
|
||||
|
||||
The status code loosely corresponds to HTTP status codes and provides a
|
||||
default log level for errors.
|
||||
The default log levels ensure that the request logging is properly informing administrators about various errors occurring in Grafana (for example, `StatusBadRequest` isn't usually as relevant as `StatusInternal`).
|
||||
All available status codes live in the `errutil` package and have names starting with `Status`.
|
||||
default log level for errors to ensure that the request logging is
|
||||
properly informing administrators about various errors occurring in
|
||||
Grafana (e.g. `StatusBadRequest` is generally speaking not as relevant
|
||||
as `StatusInternal`). All available status codes live in the `errutil`
|
||||
package and have names starting with `Status`.
|
||||
|
||||
The `messageID` is constructed as `<servicename>.<errorIdentifier>` where
|
||||
The messageID is constructed as `<servicename>.<errorIdentifier>` where
|
||||
the `<servicename>` corresponds to the root service directory per
|
||||
[the package hierarchy](package-hierarchy.md) and `<errorIdentifier>`
|
||||
is a camelCased short identifier that identifies the specific category
|
||||
of errors within the service.
|
||||
|
||||
Group errors together (that is, share `errutil.Base`) based on
|
||||
their public-facing properties. A single `messageID` should represent a
|
||||
translatable string and its metadata.
|
||||
`_service.MissingRequiredFields_` and `_service.MessageTooLong_` are likely
|
||||
Errors should be grouped together (i.e. share `errutil.Base`) based on
|
||||
their public facing properties, a single messageID should represent a
|
||||
translatable string and what metadata is carried with it.
|
||||
_service.MissingRequiredFields_ and _service.MessageTooLong_ are likely
|
||||
to be two different errors that are both validation failures, as their
|
||||
user-friendly expansions are likely different.
|
||||
This is the maximization rule of declaring as many errors with `errutil.Error` as you need public message structures.
|
||||
user-friendly expansions are likely different. This is the maximization
|
||||
rule of declaring as many `errutil.Error`s as you need public message
|
||||
structures.
|
||||
|
||||
The other side of the coin is that even though such messages as
|
||||
"user is rate limited", "user doesn't exist", "wrong username", and
|
||||
"wrong password" are reasonable errors to distinguish internally,
|
||||
for security reasons the end-user shouldn't be told which particular
|
||||
The other side of this is that even though a login service's
|
||||
"user is ratelimited", "user does not exist", "wrong username", and
|
||||
"wrong password" are reasonable errors to separate between internally,
|
||||
for security reasons the end-user should not be told which particular
|
||||
error they struck. This means that they should share the same base (such
|
||||
as _login.Failed_).
|
||||
This is the minimization rule of grouping together distinct logged errors that provide the same information via the API.
|
||||
as _login.Failed_). This is the minimization rule of grouping together
|
||||
distinct logged errors that provide the same information via the API.
|
||||
|
||||
To set a static message sent to the client when the error occurs, append the
|
||||
`errutil.WithPublicMessage(message string)` option to
|
||||
the `NewBase` function call. For dynamic messages or more options, refer
|
||||
To set a static message sent to the client when the error occurs, the
|
||||
`errutil.WithPublicMessage(message string)` option may be appended to
|
||||
the NewBase function call. For dynamic messages or more options, refer
|
||||
to the `errutil` package's GoDocs.
|
||||
|
||||
You can then construct errors using the `Base.Errorf` method, which
|
||||
Errors are then constructed using the `Base.Errorf` method, which
|
||||
functions like the [fmt.Errorf](https://pkg.go.dev/fmt#Errorf) method
|
||||
except that it creates an `errutil.Error`.
|
||||
|
||||
@@ -90,27 +95,34 @@ func Look(id int) (*Thing, error) {
|
||||
}
|
||||
```
|
||||
|
||||
Errors are considered to be part of `errutil.Base` and
|
||||
`errutil.Template`, and whatever errors are wrapped for the purposes of the
|
||||
`errors.Is` function.a
|
||||
Errors consider themselves to be both its `errutil.Base` or
|
||||
`errutil.Template` and whatever errors it wraps for the purposes of the
|
||||
`errors.Is` function.
|
||||
|
||||
Refer to the package and method documentation for
|
||||
`github.com/grafana/grafana/pkg/util/errutil` for details on how to
|
||||
construct and use Grafana style errors.
|
||||
This documentation isn't readily available on `pkg.go.dev`, but it can be viewed using [godoc](https://go.dev/cmd/godoc/) from the Grafana directory.
|
||||
Check out the package and method documentation for
|
||||
github.com/grafana/grafana/pkg/util/errutil for details on how to
|
||||
construct and use Grafana style errors. This documentation is
|
||||
unfortunately not readily available on pkg.go.dev because Grafana is not
|
||||
fully Go modules compatible, but can be viewed using
|
||||
[godoc](https://go.dev/cmd/godoc/) from the Grafana directory.
|
||||
|
||||
## Error source
|
||||
### Error source
|
||||
|
||||
You can optionally specify an error source that describes an error's origin.
|
||||
By default, it's `_server_` and means the error originates from within the application, for example, Grafana.
|
||||
The `errutil.WithDownstream()` option may be appended to the `NewBase` function call to denote an error originates from a _downstream_ server or service.
|
||||
The error source information is used in the API layer to distinguish between Grafana errors and non-Grafana errors. Error source information is given for use when instrumenting the application, allowing Grafana operators to define SLOs based on actual Grafana errors.
|
||||
You can optionally specify an error source that describes from where an
|
||||
error originates. By default, it's _server_ and means the error originates
|
||||
from within the application, e.g. Grafana. The `errutil.WithDownstream()`
|
||||
option may be appended to the NewBase function call to denote an error
|
||||
originates from a _downstream_ server/service. The error source information
|
||||
is used in the API layer to distinguish between Grafana errors and
|
||||
non-Grafana errors to include this information when instrumenting the
|
||||
application and by that allowing Grafana operators to define SLO's
|
||||
based on actual Grafana errors.
|
||||
|
||||
## Handle errors in the API
|
||||
### Handling errors in the API
|
||||
|
||||
API handlers use the `github.com/grafana/grafana/pkg/api/response.Err`
|
||||
or `github.com/grafana/grafana/pkg/api/response.ErrWithFallback`
|
||||
(same signature as `response.Error`) function to create responses based
|
||||
on `errutil.Error`.
|
||||
|
||||
> **Note:** Using `response.Err` requires all errors to be Grafana style errors.
|
||||
Using `response.Err` requires all errors to be Grafana style errors.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Instrumenting Grafana
|
||||
|
||||
This guide provides conventions and best practices for instrumenting Grafana using logs, metrics, and traces.
|
||||
Guidance, conventions and best practices for instrumenting Grafana using logs, metrics and traces.
|
||||
|
||||
## Logs
|
||||
|
||||
@@ -8,7 +8,7 @@ Logs are files that record events, warnings and errors as they occur within a so
|
||||
|
||||
### Usage
|
||||
|
||||
Use the [pkg/infra/log](/pkg/infra/log/) package to create a named, structured logger. Example:
|
||||
Use the [pkg/infra/log](/pkg/infra/log/) package to create a named structured logger. Example:
|
||||
|
||||
```go
|
||||
import (
|
||||
@@ -26,38 +26,38 @@ logger.Error("Error msg", "error", fmt.Errorf("BOOM"))
|
||||
|
||||
### Naming conventions
|
||||
|
||||
Name the logger using lowercase characters, for example, `log.New("my-logger")` using snake_case or kebab-case styling.
|
||||
Name the logger using lowercase characters, e.g. `log.New("my-logger")` using snake_case or kebab-case styling.
|
||||
|
||||
Prefix the logger name with an area name when using different loggers across a feature or related packages; for example, `log.New("plugin.loader")` and `log.New("plugin.client")`.
|
||||
Prefix the logger name with an area name when using different loggers across a feature or related packages, e.g. `log.New("plugin.loader")` and `log.New("plugin.client")`.
|
||||
|
||||
Start the log message with a capital letter, for example, `logger.Info("Hello world")` instead of `logger.Info("hello world")`. The log message should be an identifier for the log entry. Avoid parameterization in favor of key-value pairs for additional data.
|
||||
Start the log message with a capital letter, e.g. `logger.Info("Hello world")` instead of `logger.Info("hello world")`. The log message should be an identifier for the log entry, avoid parameterization in favor of key-value pairs for additional data.
|
||||
|
||||
To be consistent with Go identifiers, prefer using camelCase style when naming log keys; for example, `remoteAddr`.
|
||||
Prefer using camelCase style when naming log keys, e.g. _remoteAddr_, to be consistent with Go identifiers.
|
||||
|
||||
Use the key `Error` when logging Go errors; for example, `logger.Error("Something failed", "error", fmt.Errorf("BOOM"))`.
|
||||
Use the key _error_ when logging Go errors, e.g. `logger.Error("Something failed", "error", fmt.Errorf("BOOM"))`.
|
||||
|
||||
### Validate and sanitize input coming from user input
|
||||
|
||||
If log messages or key/value pairs originate from user input they should be validated and sanitized.
|
||||
If log messages or key/value pairs originates from user input they **should** be validated and sanitized.
|
||||
|
||||
Be careful not to expose any sensitive information in log messages; for example, secrets and credentials. It's easy to do this by mistake if you include a struct as a value.
|
||||
Be **careful** to not expose any sensitive information in log messages e.g. secrets, credentials etc. It's especially easy to do by mistake when including a struct as value.
|
||||
|
||||
### Log levels
|
||||
|
||||
When should you use each log level?
|
||||
When to use which log level?
|
||||
|
||||
- **Debug:** Informational messages of high frequency, less-important messages during normal operations, or both.
|
||||
- **Info:** Informational messages of low frequency, important messages, or both.
|
||||
- **Warning:** Use warning messages sparingly. If used, messages should be actionable.
|
||||
- **Error:** Error messages indicating some operation failed (with an error) and the program didn't have a way to handle the error.
|
||||
- **Debug:** Informational messages of high frequency and/or less-important messages during normal operations.
|
||||
- **Info:** Informational messages of low frequency and/or important messages.
|
||||
- **Warning:** Should in normal cases not be used/needed. If used should be actionable.
|
||||
- **Error:** Error messages indicating some operation failed (with an error) and the program didn't have a way of handle the error.
|
||||
|
||||
### Contextual logging
|
||||
|
||||
Use a contextual logger to include additional key/value pairs attached to `context.Context`. For example, a `traceID`, used to allow correlating logs with traces, correlate logs with a common identifier, either or both.
|
||||
Use a contextual logger to include additional key/value pairs attached to `context.Context`, e.g. `traceID`, to allow correlating logs with traces and/or correlate logs with a common identifier.
|
||||
|
||||
You must [Enable tracing in Grafana](#enable-tracing-in-grafana) to get a `traceID`.
|
||||
You must [Enable tracing in Grafana](#2-enable-tracing-in-grafana) to get a traceID
|
||||
|
||||
For example:
|
||||
Example:
|
||||
|
||||
```go
|
||||
import (
|
||||
@@ -80,9 +80,9 @@ func doSomething(ctx context.Context) {
|
||||
|
||||
### Enable certain log levels for certain loggers
|
||||
|
||||
You can enable certain log levels during development to make logging easier. For example, you can enable `debug` to allow certain loggers to minimize the generated log output and makes it easier to find things. Refer to [[log.filters]](https://grafana.com/docs/grafana/latest/setup-grafana/configure-grafana/#filters) for information on how to to set different levels for specific loggers.
|
||||
During development, it's convenient to enable certain log level, e.g. debug, for certain loggers to minimize the generated log output and make it easier to find things. See [[log.filters]](https://grafana.com/docs/grafana/latest/setup-grafana/configure-grafana/#filters) for information how to configure this.
|
||||
|
||||
You can also configure multiple loggers. For example:
|
||||
It's also possible to configure multiple loggers:
|
||||
|
||||
```ini
|
||||
[log]
|
||||
@@ -114,41 +114,41 @@ There are many possible types of metrics that can be tracked. One popular method
|
||||
|
||||
### Naming conventions
|
||||
|
||||
Use the namespace `grafana` to prefix any defined metric names with `grafana_`. This prefix makes it clear for operators that any metric named `grafana_*` belongs to Grafana.
|
||||
Use the namespace _grafana_ as that would prefix any defined metric names with `grafana_`. This will make it clear for operators that any metric named `grafana_*` belongs to Grafana.
|
||||
|
||||
Use snake_case style when naming metrics; for example, `http_request_duration_seconds` instead of `httpRequestDurationSeconds`.
|
||||
Use snake*case style when naming metrics, e.g. \_http_request_duration_seconds* instead of _httpRequestDurationSeconds_.
|
||||
|
||||
Use snake_case style when naming labels; for example, `status_code` instead of `statusCode`.
|
||||
Use snake*case style when naming labels, e.g. \_status_code* instead of _statusCode_.
|
||||
|
||||
If a metric type is a counter, name it with a `_total` suffix; for example, `http_requests_total`.
|
||||
If metric type is a _counter_, name it with a `_total` suffix, e.g. _http_requests_total_.
|
||||
|
||||
If a metric type is a histogram and you're measuring duration, name it with a `_<unit>` suffix; for example, `http_request_duration_seconds`.
|
||||
If metric type is a _histogram_ and you're measuring duration, name it with a `_<unit>` suffix, e.g. _http_request_duration_seconds_.
|
||||
|
||||
If a metric type is a gauge, name it to denote that it's a value that can increase and decrease; for example, `http_request_in_flight`.
|
||||
If metric type is a _gauge_, name it to denote it's a value that can increase and decrease , e.g. _http_request_in_flight_.
|
||||
|
||||
### Label values and high cardinality
|
||||
|
||||
Be careful with what label values you accept or add. Using or allowing too many label values could result in [high cardinality problems](https://grafana.com/blog/2022/02/15/what-are-cardinality-spikes-and-why-do-they-matter/).
|
||||
Be careful with what label values you add/accept. Using/allowing too many label values could result in [high cardinality problems](https://grafana.com/blog/2022/02/15/what-are-cardinality-spikes-and-why-do-they-matter/).
|
||||
|
||||
If label values originate from user input they should be validated. Use `metricutil.SanitizeLabelName(<label value>)` from the `pkg/infra/metrics/metricutil` package to sanitize label names.
|
||||
If label values originates from user input they **should** be validated. Use `metricutil.SanitizeLabelName(<label value>`) from _pkg/infra/metrics/metricutil_ package to sanitize label names. Very **important** to only allow a pre-defined set of labels to minimize the risk of high cardinality problems.
|
||||
|
||||
> **Important:** Only allow a pre-defined set of labels to minimize the risk of high cardinality problems. Be careful not to expose any sensitive information in label values such as secrets and credentials.
|
||||
Be **careful** to not expose any sensitive information in label values, e.g. secrets, credentials etc.
|
||||
|
||||
### Guarantee the existence of metrics
|
||||
|
||||
To guarantee the existence of metrics before any observations have happened, you can use the helper methods available in the `pkg/infra/metrics/metricutil` package.
|
||||
If you want to guarantee the existence of metrics before any observations has happened there's a couple of helper methods available in the _pkg/infra/metrics/metricutil_ package.
|
||||
|
||||
### How to collect and visualize metrics locally
|
||||
|
||||
1. Ensure you have Docker installed and running on your machine.
|
||||
1. Start Prometheus.
|
||||
1. Ensure you have Docker installed and running on your machine
|
||||
1. Start Prometheus
|
||||
|
||||
```bash
|
||||
make devenv sources=prometheus
|
||||
```
|
||||
|
||||
1. Run Grafana, and then create a Prometheus data source if you do not have one yet. Set the server URL to `http://localhost:9090`, enable basic authentication, and enter the same authentication you have for local Grafana.
|
||||
1. Use Grafana Explore or dashboards to query any exported Grafana metrics. You can also view them at `http://localhost:3000/metrics`.
|
||||
1. Run Grafana, and create a Prometheus datasource if you do not have one yet. Set the server URL to `http://localhost:9090`, enable basic auth, and type in the same auth you have for local Grafana
|
||||
1. Use Grafana Explore or dashboards to query any exported Grafana metrics. You can also view them at http://localhost:3000/metrics
|
||||
|
||||
## Traces
|
||||
|
||||
@@ -156,9 +156,9 @@ A distributed trace is data that tracks an application request as it flows throu
|
||||
|
||||
### Usage
|
||||
|
||||
Grafana uses [OpenTelemetry](https://opentelemetry.io/) for distributed tracing. There's an interface `Tracer` in the `pkg/infra/tracing` package that implements the [OpenTelemetry Tracer interface](https://pkg.go.dev/go.opentelemetry.io/otel/trace), which you can use to create traces and spans. To access `Tracer` you need to get it injected as a dependency of your service. Refer to [Services](services.md) for more details. For more information, you may also refer to [The OpenTelemetry documentation](https://opentelemetry.io/docs/instrumentation/go/manual/).
|
||||
Grafana uses [OpenTelemetry](https://opentelemetry.io/) for distributed tracing. There's an interface `Tracer` in the _pkg/infra/tracing_ package that implements the [OpenTelemetry Tracer interface](go.opentelemetry.io/otel/trace), which you can use to create traces and spans. To get a hold of a `Tracer` you would need to get it injected as dependency into your service, see [Services](services.md) for more details. For more information, see https://opentelemetry.io/docs/instrumentation/go/manual/.
|
||||
|
||||
For example:
|
||||
Example:
|
||||
|
||||
```go
|
||||
import (
|
||||
@@ -183,7 +183,7 @@ func (s *MyService) Hello(ctx context.Context, name string) (string, error) {
|
||||
ctx, span := s.tracer.Start(ctx, "MyService.Hello", trace.WithAttributes(
|
||||
attribute.String("my_attribute", "val"),
|
||||
))
|
||||
// make sure the span is marked as finished when this
|
||||
// this make sure the span is marked as finished when this
|
||||
// method ends to allow the span to be flushed and sent to
|
||||
// storage backend.
|
||||
defer span.End()
|
||||
@@ -197,7 +197,7 @@ func (s *MyService) Hello(ctx context.Context, name string) (string, error) {
|
||||
// Use the helper functions tracing.Errorf or tracing.Error
|
||||
// to set the span’s status to Error to make
|
||||
// the span tracking a failed operation as an error span and
|
||||
// record the error as an exception span event for the provided span.
|
||||
// record error as an exception span event for the provided span.
|
||||
return "", tracing.Errorf(span, "failed to check name: %w", err)
|
||||
}
|
||||
|
||||
@@ -219,37 +219,35 @@ func (s *MyService) Hello(ctx context.Context, name string) (string, error) {
|
||||
|
||||
Span names should follow the [guidelines from OpenTelemetry](https://opentelemetry.io/docs/reference/specification/trace/api/#span).
|
||||
|
||||
| Span Name | Guidance |
|
||||
| ------------------------- | ---------------------------------------------------------- |
|
||||
| `get` | Too general |
|
||||
| `get_account/42` | Too specific |
|
||||
| `get_account` | Good, and `account_id=42` would make a nice Span attribute |
|
||||
| `get_account/{accountId}` | Also good (using the “HTTP route”) |
|
||||
| Span Name | Guidance |
|
||||
| ----------------------- | -------------------------------------------------------- |
|
||||
| get | Too general |
|
||||
| get_account/42 | Too specific |
|
||||
| get_account | Good, and account_id=42 would make a nice Span attribute |
|
||||
| get_account/{accountId} | Also good (using the “HTTP route”) |
|
||||
|
||||
Span attribute and span event attributes should follow the [attribute naming specification from OpenTelemetry](https://opentelemetry.io/docs/reference/specification/common/attribute-naming/).
|
||||
Span attribute and span event attributes should follow the [Attribute naming specification from OpenTelemetry](https://opentelemetry.io/docs/reference/specification/common/attribute-naming/). Good attribute key examples:
|
||||
|
||||
These are a few examples of good attributes:
|
||||
- service.version
|
||||
- http.status_code
|
||||
|
||||
- `service.version`
|
||||
- `http.status_code`
|
||||
|
||||
Refer to [trace semantic conventions from OpenTelemetry](https://opentelemetry.io/docs/reference/specification/trace/semantic_conventions/) for additional conventions regarding well-known protocols and operations.
|
||||
See [Trace semantic conventions from OpenTelemetry](https://opentelemetry.io/docs/reference/specification/trace/semantic_conventions/) for additional conventions regarding well-known protocols and operations.
|
||||
|
||||
### Span names and high cardinality
|
||||
|
||||
Be careful with what span names you add or accept. Using or allowing too many span names can result in high cardinality problems.
|
||||
Be careful with what span names you add/accept. Using/allowing too many span names could result in high cardinality problems.
|
||||
|
||||
### Validate and sanitize input coming from user input
|
||||
|
||||
If span names, attribute values, or event values originate from user input, they should be validated and sanitized. It's very important to only allow a pre-defined set of span names to minimize the risk of high cardinality problems.
|
||||
If span names, attribute or event values originates from user input they **should** be validated and sanitized. It's very **important** to only allow a pre-defined set of span names to minimize the risk of high cardinality problems.
|
||||
|
||||
Be careful to not expose any sensitive information in span names, attribute or event values; for example, secrets, credentials, and so on.
|
||||
Be **careful** to not expose any sensitive information in span names, attribute or event values, e.g. secrets, credentials etc.
|
||||
|
||||
### Span attributes
|
||||
|
||||
Consider using `attributes.<Type>("<key>", <value>)` instead of `attributes.Key("<key>").<Type>(<value>)` since it requires fewer characters and is easier to read.
|
||||
Consider using `attributes.<Type>("<key>", <value>)` in favor of `attributes.Key("<key>").<Type>(<value>)` since it requires less characters and thereby reads easier.
|
||||
|
||||
For example:
|
||||
Example:
|
||||
|
||||
```go
|
||||
attribute.String("datasource_name", proxy.ds.Name)
|
||||
@@ -263,29 +261,29 @@ attribute.Key("org_id").Int64(proxy.ctx.SignedInUser.OrgID)
|
||||
|
||||
### How to collect, visualize and query traces (and correlate logs with traces) locally
|
||||
|
||||
1. Start Jaeger
|
||||
#### 1. Start Jaeger
|
||||
|
||||
```bash
|
||||
make devenv sources=jaeger
|
||||
```
|
||||
```bash
|
||||
make devenv sources=jaeger
|
||||
```
|
||||
|
||||
1. Enable tracing in Grafana<a name="enable-tracing-in-grafana"></a>
|
||||
#### 2. Enable tracing in Grafana
|
||||
|
||||
To enable tracing in Grafana, you must set the address in your `config.ini` file:
|
||||
To enable tracing in Grafana, you must set the address in your config.ini file
|
||||
|
||||
```ini
|
||||
[tracing.opentelemetry.jaeger]
|
||||
address = http://localhost:14268/api/traces
|
||||
```
|
||||
```ini
|
||||
[tracing.opentelemetry.jaeger]
|
||||
address = http://localhost:14268/api/traces
|
||||
```
|
||||
|
||||
1. Search/browse collected logs and traces in Grafana Explore
|
||||
#### 3. Search/browse collected logs and traces in Grafana Explore
|
||||
|
||||
You need provisioned `gdev-jaeger` and `gdev-loki` data sources. Refer to [developer dashboard and data sources](https://github.com/grafana/grafana/tree/main/devenv#developer-dashboards-and-data-sources) for set up instructions.
|
||||
You need provisioned gdev-jaeger and gdev-loki datasources, see [developer dashboard and data sources](https://github.com/grafana/grafana/tree/main/devenv#developer-dashboards-and-data-sources) for setup instructions.
|
||||
|
||||
Open Grafana explore and select the `gdev-loki` data source and use the query `{filename="/var/log/grafana/grafana.log"} | logfmt`.
|
||||
Open Grafana explore and select gdev-loki datasource and use the query `{filename="/var/log/grafana/grafana.log"} | logfmt`.
|
||||
|
||||
You can then inspect any log message that includes a `traceID` and from there click `gdev-jaeger` to split the view and inspect the trace in question.
|
||||
You can then inspect any log message that includes a `traceID` and from there click on `gdev-jaeger` to split view and inspect the trace in question.
|
||||
|
||||
1. Search or browse collected traces in Jaeger UI
|
||||
#### 4. Search/browse collected traces in Jaeger UI
|
||||
|
||||
You can open `http://localhost:16686` to use the Jaeger UI for browsing and searching traces.
|
||||
You can open http://localhost:16686 to use the Jaeger UI for browsing and searching traces.
|
||||
|
||||
@@ -9,18 +9,18 @@ inspiration for the way we organize packages.
|
||||
|
||||
## Principles of how to structure a service in Grafana
|
||||
|
||||
To learn how to structure a Grafana service, refer to [our documentation](services.md).
|
||||
[](services.md)
|
||||
|
||||
### Domain types and interfaces should be in local "root" packages
|
||||
|
||||
Let's say you're creating a "tea pot" service. You should place everything another
|
||||
Let's say you're creating a _tea pot_ service, place everything another
|
||||
service needs to interact with the tea pot service in
|
||||
`pkg/services/teapot`. Choose a name according to the
|
||||
[Go package naming conventions](https://go.dev/blog/package-names).
|
||||
_pkg/services/teapot_, choosing a name according to
|
||||
[Go's package naming conventions](https://go.dev/blog/package-names).
|
||||
|
||||
Typically, you have one or more interfaces that your service provides
|
||||
in the root package. Also, you should have any types, errors, and other constants
|
||||
that makes sense for another service to interact with the tea pot service to
|
||||
Typically, you'd have one or more interfaces that your service provides
|
||||
in the root package along with any types, errors, and other constants
|
||||
that makes sense for another service interacting with this service to
|
||||
use.
|
||||
|
||||
Avoid depending on other services when structuring the root package to
|
||||
@@ -28,34 +28,37 @@ reduce the risk of running into circular dependencies.
|
||||
|
||||
### Sub-packages should depend on roots, not the other way around
|
||||
|
||||
Small to medium-sized packages should be able to have only a single
|
||||
Small-to-medium sized packages should be able to have only a single
|
||||
sub-package containing the implementation of the service. By moving the
|
||||
implementation into a separate package we reduce the risk of triggering
|
||||
circular dependencies.
|
||||
circular dependencies (in Go, circular dependencies are evaluated per
|
||||
package and this structure logically moves it to be per type or function
|
||||
declaration).
|
||||
|
||||
> **Note:** In Go, circular dependencies are evaluated per package, and this structure logically moves it to be per type or function declaration.
|
||||
|
||||
Large packages may need to utilize multiple sub-packages at the discretion
|
||||
Large packages may need utilize multiple sub-packages at the discretion
|
||||
of the implementor. Keep interfaces and domain types to the root
|
||||
package.
|
||||
|
||||
### Try to name sub-packages for project-wide uniqueness
|
||||
### Try to name sub-packages for project wide uniqueness
|
||||
|
||||
Prefix sub-packages with the service name or an abbreviation of the service name, whichever is more appropriate, to provide a unique package name.
|
||||
This allows `teaimpl` to be distinguished from `coffeeimpl` without the need for package aliases, and encourages the use of the same name to reference your package throughout the codebase.
|
||||
Prefix sub-packages with the service name or an abbreviation of the
|
||||
service name (whichever is more appropriate) to provide an ideally
|
||||
unique package name. This allows `teaimpl` to be distinguished from
|
||||
`coffeeimpl` without the need for package aliases, and encourages the
|
||||
use of the same name to reference your package throughout the codebase.
|
||||
|
||||
### A well-behaving service provides test doubles for itself
|
||||
|
||||
Other services may depend on your service, and it's good practice to
|
||||
provide means for those services to set up a test instance of the
|
||||
dependency as needed. Refer to Google's
|
||||
[Testing on the Toilet: Know Your Test Doubles](https://testing.googleblog.com/2013/07/testing-on-toilet-know-your-test-doubles.html) for a brief
|
||||
dependency as needed. Refer to
|
||||
[Google Testing's Testing on the Toilet: Know Your Test Doubles](https://testing.googleblog.com/2013/07/testing-on-toilet-know-your-test-doubles.html) for a brief
|
||||
explanation of how we semantically aim to differentiate fakes, mocks,
|
||||
and stubs within our codebase.
|
||||
|
||||
Place test doubles in a sub-package to your root package named
|
||||
`<servicename>test` or `<service-abbreviation>test`, such that the `teapot` service may have the
|
||||
`teapottest` or `teatest`.
|
||||
`teapottest` or `teatest`
|
||||
|
||||
A stub or mock may be sufficient if the service is not a dependency of a
|
||||
lot of services or if it's called primarily for side effects so that a
|
||||
@@ -67,32 +70,34 @@ regular service without the need of complicated setup.
|
||||
|
||||
### Separate store and logic
|
||||
|
||||
When building a new service, collect data validation, manipulation, scheduled
|
||||
events, and so forth, in a service implementation. This implementation should
|
||||
be built so that it is agnostic about its store.
|
||||
When building a new service, data validation, manipulation, scheduled
|
||||
events and so forth should be collected in a service implementation that
|
||||
is built to be agnostic about its store.
|
||||
|
||||
The storage should be an interface that is not directly called from
|
||||
outside the service and should be kept to a minimum complexity to
|
||||
provide the functionality necessary for the service.
|
||||
|
||||
Use a simple litmus test to determine whether an in-memory implementation is a feasible test-double to assess the service. This will reduce the complexity of the storage interface.
|
||||
A litmus test to reduce the complexity of the storage interface is
|
||||
whether an in-memory implementation is a feasible test double to build
|
||||
to test the service.
|
||||
|
||||
### Outside the service root
|
||||
|
||||
Some parts of the service definition remain outside the
|
||||
service directory and reflect the legacy package hierarchy.
|
||||
As of June 2022, the parts that remain outside the service are migrations and API endpoints.
|
||||
Some parts of the service definition remains outside the
|
||||
service directory and reflects the legacy package hierarchy.
|
||||
As of June 2022, the parts that remain outside the service are:
|
||||
|
||||
#### Migrations
|
||||
|
||||
The `pkg/services/sqlstore/migrations` package contains all migrations for SQL
|
||||
databases for all Grafana services except for Grafana Enterprise.
|
||||
`pkg/services/sqlstore/migrations` contains all migrations for SQL
|
||||
databases, for all services (not including Grafana Enterprise).
|
||||
Migrations are written per the [database.md](database.md#migrations) document.
|
||||
|
||||
#### API endpoints
|
||||
|
||||
The `pkg/api/api.go` package contains the endpoint definitions for the most of
|
||||
Grafana HTTP API except for Grafana Enterprise.
|
||||
`pkg/api/api.go` contains the endpoint definitions for the most of
|
||||
Grafana HTTP API (not including Grafana Enterprise).
|
||||
|
||||
## Practical example
|
||||
|
||||
@@ -165,16 +170,16 @@ func (s *sqlStore) Delete(ctx.Context, root.DeleteLetterCommand) error { … }
|
||||
|
||||
## Legacy package hierarchy
|
||||
|
||||
> **Note:** Many services still adhere to the legacy model as outlined below. While it is okay to
|
||||
> **Note:** A lot of services still adhere to the legacy model as outlined below. While it is ok to
|
||||
> extend existing services based on the legacy model, you are _strongly_ encouraged to structure any
|
||||
> new services or major refactorings using the new package layout.
|
||||
|
||||
Grafana has long used a package-by-layer layout where domain types
|
||||
are placed in `pkg/models`, all SQL logic in `pkg/services/sqlstore`,
|
||||
are placed in **pkg/models**, all SQL logic in **pkg/services/sqlstore**,
|
||||
and so forth.
|
||||
|
||||
This is an example of how the tea pot service could be structured
|
||||
throughout the codebase in the legacy model:
|
||||
This is an example of how the _tea pot_ service could be structured
|
||||
throughout the codebase in the legacy model.
|
||||
|
||||
- _pkg/_
|
||||
- _api/_
|
||||
@@ -200,13 +205,13 @@ throughout the codebase in the legacy model:
|
||||
for the service.
|
||||
|
||||
The implementation of legacy services varies widely from service to
|
||||
service. Some of these files, perhaps many, may be missing and there may be
|
||||
service, some or more of these files may be missing and there may be
|
||||
more files related to a service than those listed here.
|
||||
|
||||
Some legacy services that provide infrastructure also take care of the
|
||||
Some legacy services providing infrastructure will also take care of the
|
||||
integration with several domains. The cleanup service both
|
||||
provides the infrastructure to occasionally run cleanup scripts and
|
||||
defines the cleanup scripts. Ideally, the service should be migrated
|
||||
to only handle the scheduling and synchronization of cleanup jobs.
|
||||
The logic for the individual jobs should be placed with a service that is
|
||||
defines the cleanup scripts. Ideally, this would be migrated
|
||||
to only handle the scheduling and synchronization of clean up jobs.
|
||||
The logic for the individual jobs would be placed with a service that is
|
||||
related to whatever is being cleaned up.
|
||||
|
||||
@@ -1,151 +1,169 @@
|
||||
# Currently recommended practices
|
||||
|
||||
Grafana Labs occasionally identifies patterns that may be useful or harmful so that we can introduce or remove from the codebase.
|
||||
When the complexity or importance of introducing or removing such idiomatic patterns is sufficiently high, we document it on this page to provide a reference. Because the relevance of these practices may vary over time, we call them _currently recommended practices_.
|
||||
|
||||
## Large-scale refactoring
|
||||
We occasionally identify patterns that are either useful or harmful that
|
||||
we'll want to introduce or remove from the codebase. When the complexity
|
||||
or importance of introducing or removing such a pattern is sufficiently
|
||||
high, we'll document it here to provide an addressable local
|
||||
'currently recommended practice'. By collecting these practices in a
|
||||
single place, we're able to reference them and make it easier to have a
|
||||
shared understanding of how to write idiomatic code for the Grafana
|
||||
backend.
|
||||
|
||||
Large-scale refactoring based on a new recommended practice is a
|
||||
delicate matter. It's usually better to introduce the new
|
||||
delicate matter, and most of the time it's better to introduce the new
|
||||
way incrementally over multiple releases and over time to balance the
|
||||
desire to introduce new useful patterns with the need to keep Grafana
|
||||
want to introduce new useful patterns and the need to keep Grafana
|
||||
stable. It's also easier to review and revert smaller chunks of changes,
|
||||
reducing the risk of complications.
|
||||
|
||||
## States of refactoring
|
||||
|
||||
Refer to the following table to identify important categories of refactoring.
|
||||
|
||||
| State | Description |
|
||||
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| Proposed | This is an optional practice that has been proposed and received positively by the Grafana team. Follow this proposal as you choose. |
|
||||
| Ongoing, active | The practice is actively being worked on. New code should adhere to the practice whenever possible. |
|
||||
| Ongoing, passive | There's no immediate active work on refactoring old code. New code should adhere to the practice whenever possible. |
|
||||
| Completed | The work has been done and there is no, or negligible, legacy code left that needs refactoring. New code must adhere to the practice. |
|
||||
| Abandoned | The practice doesn't have any active ongoing work and new code doesn't need to comply with the practice described. |
|
||||
| State | Description |
|
||||
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| Proposed | The practice has been proposed and been positively received by the Grafana team. Following the proposal is a discretionary choice for developers. |
|
||||
| Ongoing, active | The practice is actively being worked on. New code should adhere to the practice where at all possible. |
|
||||
| Ongoing, passive | There is no immediate active work on refactoring old code. New code should adhere to the practice where at all possible. |
|
||||
| Completed | The work has been done and there is no, or negligible, legacy code left that need refactoring. New code must adhere to the practice. |
|
||||
| Abandoned | The practice has no longer any active ongoing work and new code don't need to comply with the practice described. |
|
||||
|
||||
## 1 - Idiomatic Grafana code should be idiomatic Go code
|
||||
|
||||
**Status:** Ongoing, passive.
|
||||
|
||||
It's easier for contributors to start contributing to Grafana if our
|
||||
It'll be easier for contributors to start contributing to Grafana if our
|
||||
code is easily understandable. When there isn't a more specific Grafana
|
||||
recommended practice, we recommend that you follow the practices as put forth
|
||||
recommended practice, we recommend following the practices as put forth
|
||||
by the Go project for development of Go code or the Go compiler itself
|
||||
as appropriate.
|
||||
when applicable.
|
||||
|
||||
Firstly, best practice is the online book [_Effective Go_](https://golang.org/doc/effective_go.html), which isn't updated to reflect more recent changes since Go was initially released, but which remains a good source for understanding the general differences between Go and other languages.
|
||||
The first resource we recommend everyone developing Grafana's backend to
|
||||
skim is "[Effective Go](https://golang.org/doc/effective_go.html)",
|
||||
which isn't updated to reflect more recent changes since Go was
|
||||
initially released but remain a good source for understanding the
|
||||
general differences between Go and other languages.
|
||||
|
||||
Secondly, the guidelines for [Code Review Comments](https://github.com/golang/go/wiki/CodeReviewComments) for the Go compiler can mostly be applied directly to the Grafana codebase.
|
||||
There are idiosyncrasies in Grafana, such as interfaces living closer to their declarations than to their users for services, and the documentation doesn't enforce public declarations.
|
||||
Instead, the documentation prioritizes high coverage aimed at end-users over documenting internals in the backend.
|
||||
Secondly, the guidelines for [Code Review Comments](https://github.com/golang/go/wiki/CodeReviewComments)
|
||||
for the Go compiler can mostly be applied directly to the Grafana
|
||||
codebase. There are idiosyncrasies in Grafana such as interfaces living
|
||||
closer to its declaration than to its users for services and don't
|
||||
enforce documentation of public declarations (prioritize high coverage
|
||||
of documentation aimed at end-users over documenting internals in the
|
||||
backend).
|
||||
|
||||
- [_Effective Go_](https://golang.org/doc/effective_go.html).
|
||||
- [Code Review Comments](https://github.com/golang/go/wiki/CodeReviewComments).
|
||||
- [Effective Go](https://golang.org/doc/effective_go.html)
|
||||
- [Code Review Comments](https://github.com/golang/go/wiki/CodeReviewComments)
|
||||
|
||||
## 100 - Global state
|
||||
|
||||
**State:** Ongoing, passive.
|
||||
|
||||
Global state makes testing and debugging software harder, and it's something we want to avoid whenever possible.
|
||||
Global state makes testing and debugging software harder, and it's something we want to avoid when possible. Unfortunately, there is quite a lot of global state in Grafana.
|
||||
|
||||
Unfortunately, there's quite a lot of global state in Grafana.
|
||||
We want to migrate away from this state by using
|
||||
[Wire](https://github.com/google/wire) and dependency injection to pack code.
|
||||
We want to migrate away from this by using
|
||||
[Wire](https://github.com/google/wire) and dependency injection to pack
|
||||
|
||||
## 101 - Limit use of the init() function
|
||||
## 101 - Limit the use of the init() function
|
||||
|
||||
**State:** Ongoing, passive.
|
||||
|
||||
Don't use the `init()` function for any purpose other than registering services or implementations.
|
||||
Only use the init() function to register services/implementations.
|
||||
|
||||
## 102 - Refactor settings
|
||||
## 102 - Settings refactoring
|
||||
|
||||
**State:** Ongoing, passive.
|
||||
|
||||
We plan to move all settings from package-level vars in the settings package to the [`setting.Cfg`](https://github.com/grafana/grafana/blob/df917663e6f358a076ed3daa9b199412e95c11f4/pkg/setting/setting.go#L210) struct. To access the settings, services and components can inject `setting.Cfg`:
|
||||
The plan is to move all settings to from package level vars in settings package to the [setting.Cfg](https://github.com/grafana/grafana/blob/df917663e6f358a076ed3daa9b199412e95c11f4/pkg/setting/setting.go#L210) struct. To access the settings, services and components can inject this setting.Cfg struct:
|
||||
|
||||
- [`Cfg` struct](https://github.com/grafana/grafana/blob/df917663e6f358a076ed3daa9b199412e95c11f4/pkg/setting/setting.go#L210)
|
||||
- [Injection](https://github.com/grafana/grafana/blob/c9773e55b234b7637ea97b671161cd856a1d3d69/pkg/services/cleanup/cleanup.go#L34)
|
||||
- [Cfg struct](https://github.com/grafana/grafana/blob/df917663e6f358a076ed3daa9b199412e95c11f4/pkg/setting/setting.go#L210)
|
||||
- [Injection example](https://github.com/grafana/grafana/blob/c9773e55b234b7637ea97b671161cd856a1d3d69/pkg/services/cleanup/cleanup.go#L34)
|
||||
|
||||
## 103 - Reduce use of GoConvey
|
||||
## 103 - Reduce the use of GoConvey
|
||||
|
||||
**State:** Completed.
|
||||
|
||||
We encourage you to migrate away from using GoConvey.
|
||||
Instead, we suggest the use of `stdlib` testing with [testify](https://github.com/stretchr/testify), because it's the most common approach in the Go community, and we think it will be easier for new contributors.
|
||||
To learn more about how we want to write tests, refer to the [backend style guide](/contribute/backend/style-guide.md).
|
||||
We want to migrate away from using GoConvey. Instead, we want to use
|
||||
stdlib testing with [testify](https://github.com/stretchr/testify),
|
||||
because it's the most common approach in the Go community, and we think
|
||||
it will be easier for new contributors. Read more about how we want to
|
||||
write tests in the [style guide](/contribute/backend/style-guide.md).
|
||||
|
||||
## 104 - Refactor SqlStore
|
||||
|
||||
**State:** Completed.
|
||||
|
||||
The `sqlstore` handlers all use a global `xorm` engine variable. Refactor them to use the `SqlStore` instance.
|
||||
The `sqlstore` handlers all use a global xorm engine variable. Refactor them to use the `SqlStore` instance.
|
||||
|
||||
## 105 - Avoid global HTTP handler functions
|
||||
|
||||
**State:** Ongoing, passive.
|
||||
|
||||
Refactor HTTP handlers so that the handler methods are on the `HttpServer` instance or a more detailed handler struct. For example, `AuthHandler`.
|
||||
Doing so ensures that the handler methods get access to `HttpServer` service dependencies (and its `Cfg` object), so that global state may be avoided.
|
||||
Refactor HTTP handlers so that the handler methods are on the HttpServer instance or a more detailed handler struct. E.g (AuthHandler). This ensures they get access to HttpServer service dependencies (and Cfg object) and can avoid global state.
|
||||
|
||||
## 106 - Compare dates
|
||||
## 106 - Date comparison
|
||||
|
||||
**State:** Ongoing, passive.
|
||||
|
||||
Store newly introduced date columns in the database as epoch-based integers (that is, Unix timestamps) if they require date comparison.
|
||||
This permits you to have a unified approach for comparing dates against all the supported databases instead of needing to handle dates differently for each database.
|
||||
Also, when you compare epoch-based integers you no longer need error-pruning transformations to and from other time zones.
|
||||
Store newly introduced date columns in the database as epoch based
|
||||
integers (i.e. unix timestamps) if they require date comparison. This
|
||||
permits a unified approach for comparing dates against all the supported
|
||||
databases instead of handling dates differently for each database. Also,
|
||||
by comparing epoch based integers, we no longer need error pruning
|
||||
transformations to and from other time zones.
|
||||
|
||||
## 107 - Avoid the `simplejson` package
|
||||
## 107 - Avoid use of the simplejson package
|
||||
|
||||
**State:** Ongoing, passive
|
||||
|
||||
Don't use the `simplejson` package (`pkg/components/simplejson`) instead of types (that is, Go structs) because this results in code that is difficult to maintain.
|
||||
Use of the `simplejson` package (`pkg/components/simplejson`) in place
|
||||
of types (Go structs) results in code that is difficult to maintain.
|
||||
Instead, create types for objects and use the Go standard library's
|
||||
[`encoding/json`](https://golang.org/pkg/encoding/json/) package.
|
||||
|
||||
## 108 - Enable provisioning
|
||||
## 108 - Provisionable\*
|
||||
|
||||
**State:** Abandoned: The file-based refactoring of Grafana is limited to work natively only on on-premise installations of Grafana.
|
||||
We want to enhance the use of the API to enable provisioning for all Grafana instances in the future.
|
||||
**State:** Abandoned: Grafana's file based refactoring is limited to work natively only on on-premise installations of Grafana. We're looking at enhancing the use of the API to enable provisioning for all Grafana instances.
|
||||
|
||||
All new features that require state should be able to configure Grafana using configuration files.
|
||||
For example:
|
||||
All new features that require state should be possible to configure using config files. For example:
|
||||
|
||||
- [Data sources](https://github.com/grafana/grafana/tree/main/pkg/services/provisioning/datasources)
|
||||
- [Alert notifiers](https://github.com/grafana/grafana/tree/main/pkg/services/provisioning/notifiers)
|
||||
- [Dashboards](https://github.com/grafana/grafana/tree/main/pkg/services/provisioning/dashboards)
|
||||
|
||||
Today it's only possible to provision data sources and dashboards, but we want to support it throughout Grafana in the future.
|
||||
Today it's only possible to provision data sources and dashboards but this is something we want to support all over Grafana.
|
||||
|
||||
### 109 - Use `context.Context`
|
||||
### 109 - Use context.Context "everywhere"
|
||||
|
||||
**State:** Completed.
|
||||
|
||||
You should use and propagate the package [`context`](https://golang.org/pkg/context/) through all the layers of your code.
|
||||
For example, the `context.Context` of an incoming API request should be propagated to any other layers being used, such as the bus, service layer, and database layer.
|
||||
Utility functions and methods normally don't need `context.Context`.
|
||||
To follow Go best practices, any function or method that receives a
|
||||
`context.Context` argument should receive it as its [first parameter](https://github.com/golang/go/wiki/CodeReviewComments#contexts).
|
||||
The package [context](https://golang.org/pkg/context/) should be used
|
||||
and propagated through all the layers of the code. For example the
|
||||
`context.Context` of an incoming API request should be propagated to any
|
||||
other layers being used such as the bus, service and database layers.
|
||||
Utility functions/methods normally doesn't need `context.Context`.
|
||||
To follow Go best practices, any function/method that receives a
|
||||
[`context.Context` argument should receive it as its first parameter](https://github.com/golang/go/wiki/CodeReviewComments#contexts).
|
||||
|
||||
We encourage you to make sure that `context.Context` is passed down through all layers of your code.
|
||||
When you provide contextual information for the full life cycle of an API request, Grafana can use contextual logging. It also provides contextual information about the
|
||||
authenticated user, and it creates multiple spans for a distributed trace of service calls, database queries, and so on.
|
||||
To be able to solve certain problems and/or implement and support
|
||||
certain features making sure that `context.Context` is passed down
|
||||
through all layers of the code is vital. Being able to provide
|
||||
contextual information for the full life-cycle of an API request allows
|
||||
us to use contextual logging, provide contextual information about the
|
||||
authenticated user, create multiple spans for a distributed trace of
|
||||
service calls and database queries etc.
|
||||
|
||||
Code should use `context.TODO` whenever it's unclear which `Context` to use,
|
||||
or if it isn't yet available because the surrounding function hasn't yet
|
||||
been extended to accept a `context.Context` argument. For more details, refer to the documentation:
|
||||
Code should use `context.TODO` when it's unclear which Context to use,
|
||||
or it is not yet available (because the surrounding function has not yet
|
||||
been extended to accept a `context.Context` argument).
|
||||
|
||||
- [Services](/contribute/backend/services.md)
|
||||
- [Communication](/contribute/backend/communication.md)
|
||||
- [Database](/contribute/backend/database.md)
|
||||
More details in [Services](/contribute/backend/services.md), [Communication](/contribute/backend/communication.md) and [Database](/contribute/backend/database.md).
|
||||
|
||||
[Original design doc](https://docs.google.com/document/d/1ebUhUVXU8FlShezsN-C64T0dOoo-DaC9_r-c8gB2XEU/edit#).
|
||||
|
||||
## 110 - Move API error handling to service layer
|
||||
|
||||
**State:** Ongoing, passive.
|
||||
|
||||
All errors returned from services in Grafana should carry a status and
|
||||
the information necessary to provide a structured message that faces the end-user. Structured messages can be displayed on the frontend and may be [internationalized](../internationalization.md).
|
||||
All errors returned from Grafana's services should carry a status and
|
||||
the information necessary to provide a structured end-user facing
|
||||
message that the frontend can display and internationalize for
|
||||
end-users.
|
||||
|
||||
To learn more, refer to [Errors](/contribute/backend/errors.md).
|
||||
More details in [Errors](/contribute/backend/errors.md).
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
# Services
|
||||
|
||||
A Grafana _service_ encapsulates and exposes application logic to the rest of the application through a set of related operations.
|
||||
A Grafana _service_ encapsulates and exposes application logic to the rest of the application, through a set of related operations.
|
||||
|
||||
Grafana uses [Wire](https://github.com/google/wire), which is a code generation tool that automates connecting components using [dependency injection](https://en.wikipedia.org/wiki/Dependency_injection). Wire represents dependencies between components as function parameters, which encourages explicit initialization instead of global variables.
|
||||
Grafana uses [Wire](https://github.com/google/wire), which is a code generation tool that automates connecting components using [dependency injection](https://en.wikipedia.org/wiki/Dependency_injection). Dependencies between components are represented in Wire as function parameters, encouraging explicit initialization instead of global variables.
|
||||
|
||||
Even though the services in Grafana do different things, they share a number of patterns. To better understand how a service works, let's build one from scratch!
|
||||
|
||||
Before a service can start communicating with the rest of Grafana, it needs to be registered with Wire. Refer to the `ProvideService` factory method in the following service example and note how it's being referenced in the `wire.go` example.
|
||||
Before a service can start communicating with the rest of Grafana, it needs to be registered with Wire, see `ProvideService` factory function/method in the service example below and how it's being referenced in the wire.go example below.
|
||||
|
||||
When you run Wire, it inspects the parameters of `ProvideService` and makes sure that all its dependencies have been wired up and initialized properly.
|
||||
When Wire is run, it inspects the parameters of `ProvideService` and makes sure that all its dependencies have been wired up and initialized properly.
|
||||
|
||||
**Service example:**
|
||||
|
||||
@@ -49,16 +49,16 @@ func (s *Service) init() error {
|
||||
|
||||
// IsDisabled returns true if the service is disabled.
|
||||
//
|
||||
// Satisfies the registry.CanBeDisabled interface that guarantees
|
||||
// that Run() isn't called if the service is disabled.
|
||||
// Satisfies the registry.CanBeDisabled interface which will guarantee
|
||||
// that Run() is not called if the service is disabled.
|
||||
func (s *Service) IsDisabled() bool {
|
||||
return !s.cfg.IsServiceEnabled()
|
||||
}
|
||||
|
||||
// Run runs the service in the background.
|
||||
//
|
||||
// Satisfies the registry.BackgroundService interface which
|
||||
// guarantees that the service can be registered as a background service.
|
||||
// Satisfies the registry.BackgroundService interface which will
|
||||
// guarantee that the service can be registered as a background service.
|
||||
func (s *Service) Run(ctx context.Context) error {
|
||||
// background service logic...
|
||||
<-ctx.Done()
|
||||
@@ -109,30 +109,30 @@ func InitializeForTest(cla setting.CommandLineArgs, opts Options, apiOpts api.Se
|
||||
|
||||
A background service runs in the background of the lifecycle between Grafana startup and shutdown. To run your service in the background, it must satisfy the `registry.BackgroundService` interface. Pass it through to the `NewBackgroundServiceRegistry` call in the [ProvideBackgroundServiceRegistry](/pkg/registry/backgroundsvcs/background_services.go) function to register it.
|
||||
|
||||
For an example of the `Run` method, see the previous example.
|
||||
You can see an example implementation above of the Run method.
|
||||
|
||||
## Disabled services
|
||||
|
||||
If you want to guarantee that a background service is not run by Grafana when certain criteria are met, or if a service is disabled, your service must satisfy the `registry.CanBeDisabled` interface. When the `service.IsDisabled` method returns `true`, Grafana won't call the `service.Run` method.
|
||||
If you want to guarantee that a background service is not run by Grafana when certain criteria are met/service is disabled, your service must satisfy the `registry.CanBeDisabled` interface. When the `service.IsDisabled` method returns true, Grafana will not call the `service.Run` method.
|
||||
|
||||
If you want to run certain initialization code whether service is disabled or not, you need to handle this in the service factory method.
|
||||
|
||||
For an example of the `IsDisabled` method and custom initialization code when the service is disabled, see the previous implementation code.
|
||||
You can see an example implementation above of the `IsDisabled` method and custom initialization code when the service is disabled.
|
||||
|
||||
## Run Wire (generate code)
|
||||
## Run Wire / generate code
|
||||
|
||||
Running `make run` calls `make gen-go` on the first run. The `gen-go` in turn calls the Wire binary and generates the code in [`wire_gen.go`](/pkg/server/wire_gen.go). The Wire binary is installed using [`bingo`](https://github.com/bwplotka/bingo) which downloads and installs all the tools needed, including the Wire binary at the specified version.
|
||||
Running `make run` calls `make gen-go` on the first run. `gen-go` in turn calls the wire binary and generates the code in [wire_gen.go](/pkg/server/wire_gen.go) and [wire_gen.go](/pkg/cmd/grafana-cli/runner/wire_gen.go). The wire binary is installed using [bingo](https://github.com/bwplotka/bingo) which downloads and installs all the tools needed, including the Wire binary at the specified version.
|
||||
|
||||
## OSS vs. Enterprise
|
||||
## OSS vs Enterprise
|
||||
|
||||
Grafana OSS and Grafana Enterprise share code and dependencies. Grafana Enterprise overrides or extends certain OSS services.
|
||||
|
||||
There's a [`wireexts_oss.go`](/pkg/server/wireexts_oss.go) that has the `wireinject` and `oss` build tags as requirements. Here you can register services that might have other implementations, for example, Grafana Enterprise.
|
||||
There's a [wireexts_oss.go](/pkg/server/wireexts_oss.go) that has the `wireinject` and `oss` build tags as requirements. Here services that might have other implementations, e.g. Grafana Enterprise, can be registered.
|
||||
|
||||
Similarly, there's a `wireexts_enterprise.go` file in the Enterprise source code repository where you can override or register other service implementations.
|
||||
Similarly, there's a wireexts_enterprise.go file in the Enterprise source code repository where other service implementations can be overridden/be registered.
|
||||
|
||||
To extend an OSS background service, create a specific background interface for that type and inject that type to [`ProvideBackgroundServiceRegistry`](/pkg/registry/backgroundsvcs/background_services.go) instead of the concrete type. Next, add a Wire binding for that interface in [`wireexts_oss.go`](/pkg/server/wireexts_oss.go) and in the enterprise `wireexts` file.
|
||||
To extend an OSS background service, create a specific background interface for that type and inject that type to [ProvideBackgroundServiceRegistry](/pkg/registry/backgroundsvcs/background_services.go) instead of the concrete type. Then add a wire binding for that interface in [wireexts_oss.go](/pkg/server/wireexts_oss.go) and in the enterprise wireexts file.
|
||||
|
||||
## Methods
|
||||
|
||||
Any public method of a service should take `context.Context` as its first argument. If the method calls the bus, it will propagate other services or the database context, if possible.
|
||||
Any public method of a service should take `context.Context` as its first argument. If the method calls the bus, other services or the database the context should be propagated, if possible.
|
||||
|
||||
@@ -1,69 +1,71 @@
|
||||
# Support bundles
|
||||
|
||||
Support bundles comprehensively collect the information needed for debugging. Specifically, support bundles function as an archive that contains one file per collector that is selected by the user.
|
||||
Support bundles are a way to collect all the information needed to debug a problem.
|
||||
They are generated from the support bundle menu in the UI under the Help section.
|
||||
|
||||
Generally, collectors are functions in the backend that collect information about the service in which they are running. Services can register collectors during their initialization.
|
||||
The support bundle is an archive that contains one file per collector selected by
|
||||
the user.
|
||||
|
||||
## Find the support bundle information
|
||||
Collectors are functions in the backend that collect information about the service they are running in.
|
||||
Services can register collectors during their initialization.
|
||||
|
||||
Support bundles are generated from information located in the Grafana UI's online documentation. Under **Help**, select the **Support bundle** menu.
|
||||
## Adding a new support bundle collector
|
||||
|
||||
## Add a new support bundle collector
|
||||
|
||||
To add a new support bundle collector, follow these steps which use the usage stats service as an example. For example:
|
||||
To add a new support bundle collector, you need to follow these steps,
|
||||
we'll use the usage stats service as an example:
|
||||
|
||||
1. Import the support bundles registry in the service's `ProvideService` function:
|
||||
|
||||
```go
|
||||
type UsageStats struct {
|
||||
...
|
||||
}
|
||||
```go
|
||||
type UsageStats struct {
|
||||
...
|
||||
}
|
||||
|
||||
func ProvideService(
|
||||
...
|
||||
bundleRegistry supportbundles.Service, // Bundle registry
|
||||
) (*UsageStats, error)
|
||||
```
|
||||
func ProvideService(
|
||||
...
|
||||
bundleRegistry supportbundles.Service, // Bundle registry
|
||||
) (*UsageStats, error)
|
||||
```
|
||||
|
||||
After importing the support bundle, run `make gen-go` to wire the registry to the service.
|
||||
2. `make gen-go` will then be able to wire the registry to the service.
|
||||
|
||||
1. Implement the collector. For example:
|
||||
3. Implement the collector
|
||||
|
||||
```go
|
||||
func (uss *UsageStats) supportBundleCollector() supportbundles.Collector {
|
||||
return supportbundles.Collector{
|
||||
UID: "usage-stats", // Unique ID for the collector
|
||||
DisplayName: "Usage statistics", // Display name for the collector in the UI
|
||||
Description: "Usage statistics of the Grafana instance", // Description for the collector in the UI
|
||||
IncludedByDefault: false, // Indicates whether the collector is included by default in the support bundle and can't be deselected. Usually you want this to be false.
|
||||
Default: false, // Indicates whether the collector is selected by default in the support bundle. User can still deselect it.
|
||||
// Function that will actually collect the file during the support bundle generation.
|
||||
Fn: func(ctx context.Context) (*supportbundles.SupportItem, error) {
|
||||
// Add your service's logic to collect the information you need
|
||||
// In this example we collect the usage stats and place them appropriately in JSON
|
||||
// This helps us get information about the usage of the Grafana instance
|
||||
report, err := uss.GetUsageReport(context.Background())
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
```go
|
||||
func (uss *UsageStats) supportBundleCollector() supportbundles.Collector {
|
||||
return supportbundles.Collector{
|
||||
UID: "usage-stats", // unique ID for the collector
|
||||
DisplayName: "Usage statistics", // display name for the collector in the UI
|
||||
Description: "Usage statistics of the Grafana instance", // description for the collector in the UI
|
||||
IncludedByDefault: false, // whether the collector is included by default in the support bundle and can't be deselected. Most times you want this to be false.
|
||||
Default: false, // whether the collector is selected by default in the support bundle. User can still deselect it.
|
||||
// Function that will actually collect the file during the support bundle generation.
|
||||
Fn: func(ctx context.Context) (*supportbundles.SupportItem, error) {
|
||||
// Add your service's logic to collect the information you need
|
||||
// In this example we are collecting the usage stats and marshalling them to JSON
|
||||
// This helps us get information about the usage of the Grafana instance
|
||||
report, err := uss.GetUsageReport(context.Background())
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
data, err := json.Marshal(report)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
data, err := json.Marshal(report)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return &supportbundles.SupportItem{
|
||||
// Filename of the file in the archive
|
||||
// Can be any extension (most commonly, .json and .md).
|
||||
Filename: "usage-stats.json",
|
||||
FileBytes: data, // []byte of the file
|
||||
}, nil
|
||||
},
|
||||
}
|
||||
}
|
||||
```
|
||||
return &supportbundles.SupportItem{
|
||||
// filename of the file in the archive
|
||||
// can be any extension. (most common is .json and .md)
|
||||
Filename: "usage-stats.json",
|
||||
FileBytes: data, // []byte of the file
|
||||
}, nil
|
||||
},
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
1. Register the collector in the service's `ProvideService` function. For example:
|
||||
4. Register the collector in the service's `ProvideService` function:
|
||||
|
||||
```go
|
||||
func ProvideService(
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
# Upgrade dependencies
|
||||
|
||||
We recommend the practices in this documentation when upgrading the various backend dependencies of Grafana.
|
||||
|
||||
## Protocol buffers (protobufs)
|
||||
|
||||
Use the most recent stable version of the [protobuf library](http://github.com/golang/protobuf) in Grafana and the plugin SDK.
|
||||
|
||||
Additionally, you typically want to upgrade your protobuf compiler toolchain and re-compile the protobuf files.
|
||||
|
||||
> **Note:** You need Buf CLI installed and available in your path. For instructions, refer to the [Buf Docs documentation](https://buf.build/docs/installation).
|
||||
|
||||
After you've installed Buf CLI, re-compile the protobuf files in Grafana and the plugin SDK. Use this code:
|
||||
|
||||
```shell
|
||||
cd $GRAFANA
|
||||
make protobuf
|
||||
cd $GRAFANA_PLUGIN_SDK_GO
|
||||
mage protobuf
|
||||
```
|
||||
|
||||
After upgrading the protobuf dependency in Grafana and the plugin SDK, it is a best practice to test that your code still works before creating your PR. Specifically:
|
||||
|
||||
- Test a plugin built with upgraded SDK on upgraded Grafana
|
||||
- Test a plugin built with non-upgraded SDK on upgraded Grafana
|
||||
- Test a plugin built with upgraded SDK on non-upgraded Grafana
|
||||
@@ -1,26 +0,0 @@
|
||||
# Upgrade Go version
|
||||
|
||||
We recommend the practices outlined in this documentation when you upgrade Go for use in Grafana development.
|
||||
|
||||
## Example PR
|
||||
|
||||
Refer to the following PR for an example of how to perform a Go upgrade:
|
||||
|
||||
- [PR ##79329](https://github.com/grafana/grafana/pull/79329)
|
||||
|
||||
## Main areas to update
|
||||
|
||||
Change at least the following parts of Go and related files:
|
||||
|
||||
- [`go.mod`](/go.mod#L3)
|
||||
- [`go.work`](/go.work#L1)
|
||||
- [`scripts/drone/variables.star`](/scripts/drone/variables.star#L6)
|
||||
- [`Makefile`](/Makefile#L12)
|
||||
- [`Dockerfile`](/Dockerfile#L6)
|
||||
|
||||
Then, run `go mod tidy` and `go work sync`. Also, run `make drone` so changes reflect the updates to `.star` and `drone.yml` files.
|
||||
|
||||
### Additional files to change
|
||||
|
||||
- Look in the `.github/workflows` folder for what Go version is being used there in various workflows.
|
||||
- Make sure to create a PR with the corresponding changes in the `grafana/grafana-enterprise` repository.
|
||||
26
contribute/backend/upgrading-dependencies.md
Normal file
26
contribute/backend/upgrading-dependencies.md
Normal file
@@ -0,0 +1,26 @@
|
||||
# Upgrading dependencies
|
||||
|
||||
Notes on upgrading various backend dependencies.
|
||||
|
||||
## Protobuf
|
||||
|
||||
When upgrading the [protobuf](http://github.com/golang/protobuf) library in Grafana and the plugin SDK,
|
||||
you typically also want to upgrade your protobuf compiler toolchain and re-compile protobuf files.
|
||||
|
||||
**Note:** You need Buf CLI installed and availabile in your path, see https://buf.build/docs/installation for instructions.
|
||||
|
||||
Re-compile protobuf files in grafana and the plugin SDK:
|
||||
|
||||
```shell
|
||||
cd $GRAFANA
|
||||
make protobuf
|
||||
cd $GRAFANA_PLUGIN_SDK_GO
|
||||
mage protobuf
|
||||
```
|
||||
|
||||
After upgrading the protobuf dependency in Grafana and the plugin SDK, it might be wise to test that things still work,
|
||||
before making corresponding PRs:
|
||||
|
||||
- Test a plugin built with upgraded SDK on upgraded Grafana
|
||||
- Test a plugin built with non-upgraded SDK on upgraded Grafana
|
||||
- Test a plugin built with upgraded SDK on non-upgraded Grafana
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user