mirror of
https://github.com/grafana/grafana.git
synced 2026-01-08 21:22:59 +08:00
Compare commits
384 Commits
release-11
...
v10.4.11
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a40fee9162 | ||
|
|
7cfb3ec25a | ||
|
|
6aa75962da | ||
|
|
c66109b725 | ||
|
|
26f770c44a | ||
|
|
92628e5c16 | ||
|
|
69eeb5705c | ||
|
|
5acb0e05ed | ||
|
|
70ce6cba9c | ||
|
|
e8b2507d97 | ||
|
|
8db7d753cb | ||
|
|
963a12f8f1 | ||
|
|
db1c94f950 | ||
|
|
db82bf363c | ||
|
|
9facf85d70 | ||
|
|
bee1c139cc | ||
|
|
fa58bd62bb | ||
|
|
6b9a02165c | ||
|
|
3a902f8569 | ||
|
|
8c0fda37ae | ||
|
|
8ac8442e8b | ||
|
|
655b4fd499 | ||
|
|
13d9ccca99 | ||
|
|
9b929ab7cd | ||
|
|
1d552f25ae | ||
|
|
2b7cdc8ff9 | ||
|
|
a8215d10df | ||
|
|
79a9941056 | ||
|
|
1c902eeed2 | ||
|
|
478bd662ae | ||
|
|
c89543df2f | ||
|
|
fbb0ce8beb | ||
|
|
5143815ffd | ||
|
|
eba254cc31 | ||
|
|
18e500bfbe | ||
|
|
5de3f27ca5 | ||
|
|
f6530f62c2 | ||
|
|
11d5696ed0 | ||
|
|
596e03f56e | ||
|
|
a87fb21be0 | ||
|
|
8525525115 | ||
|
|
6f76c8dff8 | ||
|
|
8c384b71bd | ||
|
|
6b79e50585 | ||
|
|
7a08b0bae7 | ||
|
|
8ea727bb4f | ||
|
|
b5dce4670d | ||
|
|
32fe385aed | ||
|
|
f2f6eabd21 | ||
|
|
7198ba3d33 | ||
|
|
9878342d54 | ||
|
|
429079711a | ||
|
|
79c0be876f | ||
|
|
257f46b2e4 | ||
|
|
dcce9bdbd2 | ||
|
|
dc9b660a0f | ||
|
|
a02075b7be | ||
|
|
dd51b79600 | ||
|
|
5da383d5b8 | ||
|
|
46bcb54d61 | ||
|
|
769114b1d7 | ||
|
|
da7dea8759 | ||
|
|
89761efb75 | ||
|
|
82d719d8b3 | ||
|
|
0829e07098 | ||
|
|
b3fcff79da | ||
|
|
9da678809b | ||
|
|
d59331a168 | ||
|
|
a97d3c0d43 | ||
|
|
ab54645c93 | ||
|
|
fc4453e872 | ||
|
|
272cf8b0a2 | ||
|
|
87b80011bf | ||
|
|
e1bd1f43da | ||
|
|
a71d083205 | ||
|
|
2c780cef83 | ||
|
|
882042cdff | ||
|
|
30cf62234c | ||
|
|
70190aa1e6 | ||
|
|
0f672869ca | ||
|
|
97c2a1747d | ||
|
|
fd6bd298c2 | ||
|
|
007a8bd2a9 | ||
|
|
e9c7ba1cd6 | ||
|
|
bbe655c172 | ||
|
|
fcb1abde3c | ||
|
|
8586ffe34c | ||
|
|
9c9d47e99e | ||
|
|
6f64c51675 | ||
|
|
eaa3292d72 | ||
|
|
bbd4b2ceb5 | ||
|
|
4f8c7e23b5 | ||
|
|
466e2573c1 | ||
|
|
5330f1f23c | ||
|
|
638ee558e7 | ||
|
|
d08c574c7e | ||
|
|
4a5745080e | ||
|
|
1ba236b146 | ||
|
|
ffdb7d44f8 | ||
|
|
8ee4dd1527 | ||
|
|
3fadbc527b | ||
|
|
f47875ea51 | ||
|
|
606664d2fa | ||
|
|
02d78c3c53 | ||
|
|
7c66cceb96 | ||
|
|
38763f2378 | ||
|
|
50ef5bf048 | ||
|
|
faef7f4c47 | ||
|
|
b037f37bfe | ||
|
|
8e9aa45716 | ||
|
|
e95b1e838c | ||
|
|
4e8032b846 | ||
|
|
17cbd4277d | ||
|
|
fec5b421a9 | ||
|
|
1491c9adc3 | ||
|
|
b4a1af52f4 | ||
|
|
4313c396ec | ||
|
|
833a7bb07a | ||
|
|
dbb0125c6a | ||
|
|
7619cf69c2 | ||
|
|
66e10baeca | ||
|
|
c72d75e1f2 | ||
|
|
98b44044ee | ||
|
|
7b0f62330c | ||
|
|
245297028e | ||
|
|
d6cc55b487 | ||
|
|
fe84edad52 | ||
|
|
c9e26654c6 | ||
|
|
6a66878377 | ||
|
|
58481df86e | ||
|
|
54a3ccf2a2 | ||
|
|
3f351af597 | ||
|
|
4a20bb264a | ||
|
|
56a4af87d7 | ||
|
|
cc3d582b46 | ||
|
|
4a29d54f06 | ||
|
|
32f04b3d31 | ||
|
|
c40b6d1228 | ||
|
|
f4d7a1e68e | ||
|
|
a9af777eda | ||
|
|
ebfd9487f3 | ||
|
|
45e837a908 | ||
|
|
e57a2bd156 | ||
|
|
dec99e6c47 | ||
|
|
c6d889a063 | ||
|
|
ceb2132029 | ||
|
|
30447a4aee | ||
|
|
edecfc5093 | ||
|
|
9d34224c13 | ||
|
|
25206430e0 | ||
|
|
1aae7a417b | ||
|
|
f78ef067e1 | ||
|
|
121af0bcba | ||
|
|
0a4f814f69 | ||
|
|
9e9f48db95 | ||
|
|
4047431e4c | ||
|
|
565368e39d | ||
|
|
819b5291af | ||
|
|
ed451d6e55 | ||
|
|
1141f3bb9d | ||
|
|
f063ee874e | ||
|
|
8791093f6e | ||
|
|
b980721bbc | ||
|
|
bba00fe1fb | ||
|
|
ec4ab90270 | ||
|
|
7f116201ad | ||
|
|
26dc471d57 | ||
|
|
9bec9705e8 | ||
|
|
fade57d78e | ||
|
|
56fd4fa858 | ||
|
|
3f26eefdb2 | ||
|
|
0bfd547800 | ||
|
|
21a4a6e1d4 | ||
|
|
57f0aa72fe | ||
|
|
a0f7ac82fb | ||
|
|
6f088607c5 | ||
|
|
aa3d2684f4 | ||
|
|
6c740f014e | ||
|
|
2fd873886a | ||
|
|
3724a83786 | ||
|
|
6e6fbf6a34 | ||
|
|
4d4cc11452 | ||
|
|
b49ed3d4c4 | ||
|
|
cbbd6b1f7f | ||
|
|
654db2500a | ||
|
|
46ed4f787f | ||
|
|
d05e50ee42 | ||
|
|
2fcd898227 | ||
|
|
1e0db5c631 | ||
|
|
803f7dd285 | ||
|
|
5435a8983b | ||
|
|
cc9b0fc049 | ||
|
|
98b2b9fc32 | ||
|
|
c4ab8b95d3 | ||
|
|
e2eae9bbff | ||
|
|
523131f0e4 | ||
|
|
18b2d1e63e | ||
|
|
5dfc92cdec | ||
|
|
edde0fa815 | ||
|
|
8e9b524b55 | ||
|
|
367051d038 | ||
|
|
3075d2d9a6 | ||
|
|
88930e7dee | ||
|
|
de23625b5d | ||
|
|
74c506771c | ||
|
|
28ce8360ab | ||
|
|
361bffd0fd | ||
|
|
892da04fd1 | ||
|
|
d35aec7beb | ||
|
|
e9c8f1186d | ||
|
|
849e1ef338 | ||
|
|
5685650754 | ||
|
|
cf070edc6c | ||
|
|
f5b545bf28 | ||
|
|
4b6b5a92ed | ||
|
|
58b3dd2fe7 | ||
|
|
7922b180fa | ||
|
|
879edcbc32 | ||
|
|
0ed766d9a1 | ||
|
|
26048baa0b | ||
|
|
6da802c275 | ||
|
|
2602409a3b | ||
|
|
f00fa30661 | ||
|
|
aefbefe524 | ||
|
|
d316bde11d | ||
|
|
8d43195b13 | ||
|
|
ffe9a5a0ae | ||
|
|
6d0b46f7d8 | ||
|
|
648b4a445e | ||
|
|
2619d47e9a | ||
|
|
da8b84dc28 | ||
|
|
2c66783f98 | ||
|
|
2530844825 | ||
|
|
6663747180 | ||
|
|
f4e1c28d9d | ||
|
|
3dc3cecc40 | ||
|
|
557b1f4ab9 | ||
|
|
e409b3c1d7 | ||
|
|
7499870cdd | ||
|
|
a7ce497ec2 | ||
|
|
7ebbf46399 | ||
|
|
7b49041a46 | ||
|
|
f5b230d995 | ||
|
|
701c851be7 | ||
|
|
d922afa346 | ||
|
|
dbac966482 | ||
|
|
22809dea50 | ||
|
|
7ceb112f37 | ||
|
|
f97672fc23 | ||
|
|
87f391e6b3 | ||
|
|
acb8d033ed | ||
|
|
5591796ba8 | ||
|
|
2c9344abfc | ||
|
|
46f63365c8 | ||
|
|
f7070df4d3 | ||
|
|
125ec4bdbb | ||
|
|
8358e3db22 | ||
|
|
1eab6e50c6 | ||
|
|
71bee5716b | ||
|
|
af94019e2a | ||
|
|
6b124e2031 | ||
|
|
8da97103ad | ||
|
|
d5e252f8e0 | ||
|
|
78e07dc609 | ||
|
|
726f38967c | ||
|
|
1565cc3ebd | ||
|
|
df08b7960a | ||
|
|
30100b2a46 | ||
|
|
0f779159c5 | ||
|
|
fe626877c7 | ||
|
|
5430b1412f | ||
|
|
eaf0dbe50d | ||
|
|
c5e9aa0b59 | ||
|
|
fef4ca3def | ||
|
|
e743c4a88d | ||
|
|
b1e4fc13aa | ||
|
|
d26a1454c8 | ||
|
|
b560729873 | ||
|
|
41d516639d | ||
|
|
3328ac8206 | ||
|
|
e1fc1e9a13 | ||
|
|
6a8944a76e | ||
|
|
01395e3291 | ||
|
|
6c09bfa2a0 | ||
|
|
a678a464be | ||
|
|
f04c5d39f5 | ||
|
|
75f5cee757 | ||
|
|
554cca4604 | ||
|
|
95604c1355 | ||
|
|
1aea2dd159 | ||
|
|
e9ea783846 | ||
|
|
00477e356b | ||
|
|
d94d597d84 | ||
|
|
04f6c66e91 | ||
|
|
d3ce857c0e | ||
|
|
d486fa87ab | ||
|
|
c17383d40b | ||
|
|
80ac64c540 | ||
|
|
d8c0674865 | ||
|
|
1e4235c106 | ||
|
|
591cb82b90 | ||
|
|
de5b771270 | ||
|
|
2fb6deb115 | ||
|
|
035e271bbf | ||
|
|
e258f2e4e1 | ||
|
|
7db05f5d38 | ||
|
|
0f1651658b | ||
|
|
17ab162a11 | ||
|
|
4b0a5f022f | ||
|
|
b946bcad5b | ||
|
|
54d6cb7e96 | ||
|
|
1cca6538b7 | ||
|
|
3f596e8e8c | ||
|
|
335aa31bde | ||
|
|
f4a9aa1171 | ||
|
|
1d73820ac7 | ||
|
|
45e78b36bf | ||
|
|
af6316a8f6 | ||
|
|
27107326d5 | ||
|
|
e865301665 | ||
|
|
0b50a9bfe3 | ||
|
|
1d582410ab | ||
|
|
0a0e9f70cd | ||
|
|
9bbd9cf4ca | ||
|
|
e430baa819 | ||
|
|
1b43fc90d4 | ||
|
|
ab89de7e85 | ||
|
|
5d46a9ca18 | ||
|
|
32e7839cb8 | ||
|
|
7f48c3168b | ||
|
|
980352f073 | ||
|
|
595d967d60 | ||
|
|
b30b93df2c | ||
|
|
5c2b7e5c62 | ||
|
|
ee475ad250 | ||
|
|
b78ecddf56 | ||
|
|
b48e2102b3 | ||
|
|
303a80cdb5 | ||
|
|
b379816be6 | ||
|
|
391a24025f | ||
|
|
fbd2400e4a | ||
|
|
f5271952d0 | ||
|
|
90b9cefd4b | ||
|
|
2c3f9581cf | ||
|
|
4d40128896 | ||
|
|
23320f3cab | ||
|
|
9dcf8e650f | ||
|
|
fa8a096438 | ||
|
|
3171158e44 | ||
|
|
906490eeac | ||
|
|
f2333ae807 | ||
|
|
deec5361b7 | ||
|
|
1c79d8e0c0 | ||
|
|
dcec8aafb7 | ||
|
|
c0da5fd7a5 | ||
|
|
d308b47e97 | ||
|
|
676fd4c08e | ||
|
|
6263884192 | ||
|
|
14982f1095 | ||
|
|
e31e447c5e | ||
|
|
e74ffd5817 | ||
|
|
cc010b657a | ||
|
|
a8ef92b04c | ||
|
|
f30ffd85fb | ||
|
|
01d742fd88 | ||
|
|
ceb30ce23c | ||
|
|
ff860eb5d0 | ||
|
|
8290d41f4b | ||
|
|
09663d856d | ||
|
|
58d6e0b3d2 | ||
|
|
dadc81b0e9 | ||
|
|
deb12d4e94 | ||
|
|
a0c2fb1b8c | ||
|
|
fed9e2f361 | ||
|
|
e229eef365 | ||
|
|
272ca9a46b | ||
|
|
13e7099cc3 | ||
|
|
e3d8fca42a | ||
|
|
fedf3e2e6e | ||
|
|
2fbc070fd1 | ||
|
|
6e7ba7c593 | ||
|
|
f6ab4e1323 | ||
|
|
8e9fb37451 | ||
|
|
e52118c7d1 |
6089
.betterer.results
6089
.betterer.results
File diff suppressed because it is too large
Load Diff
15597
.betterer.results.json
15597
.betterer.results.json
File diff suppressed because it is too large
Load Diff
133
.betterer.ts
133
.betterer.ts
@@ -7,11 +7,10 @@ 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',
|
||||
'packages/grafana-e2e', // deprecated.
|
||||
'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 +21,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() {
|
||||
@@ -76,87 +76,68 @@ function regexp(pattern: RegExp, issueMessage: string) {
|
||||
|
||||
function countEslintErrors() {
|
||||
return new BettererFileTest(async (filePaths, fileTestResult, resolver) => {
|
||||
// Just bail early if there's no files to test. Prevents trying to get the base config from failing
|
||||
if (filePaths.length === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
const { baseDirectory } = resolver;
|
||||
const cli = new ESLint({ cwd: baseDirectory });
|
||||
|
||||
// Get the base config to set up parsing etc correctly
|
||||
// this is by far the slowest part of this code. It takes eslint about 2 seconds just to find the config
|
||||
const baseConfig = await cli.calculateConfigForFile(filePaths[0]);
|
||||
const eslintConfigFiles = await glob('**/.eslintrc');
|
||||
const eslintConfigMainPaths = eslintConfigFiles.map((file) => path.resolve(path.dirname(file)));
|
||||
|
||||
const baseRules: Partial<Linter.RulesRecord> = {
|
||||
'@emotion/syntax-preference': [2, 'object'],
|
||||
'@typescript-eslint/no-explicit-any': 'error',
|
||||
'@grafana/no-aria-label-selectors': 'error',
|
||||
'no-restricted-imports': [
|
||||
'error',
|
||||
{
|
||||
patterns: [
|
||||
{
|
||||
group: ['@grafana/ui*', '*/Layout/*'],
|
||||
importNames: ['Layout', 'HorizontalGroup', 'VerticalGroup'],
|
||||
message: 'Use Stack component instead.',
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
const config: Linter.Config = {
|
||||
...baseConfig,
|
||||
rules: baseRules,
|
||||
|
||||
// Be careful when specifying overrides for the same rules as in baseRules - it will... override
|
||||
// the same rule, not merge them with different configurations
|
||||
overrides: [
|
||||
{
|
||||
files: ['**/*.{ts,tsx}'],
|
||||
excludedFiles: ['*.{test,spec}.{ts,tsx}', '**/__mocks__/**', '**/public/test/**'],
|
||||
rules: {
|
||||
'@typescript-eslint/consistent-type-assertions': ['error', { assertionStyle: 'never' }],
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
files: ['public/app/**/*.{ts,tsx}'],
|
||||
rules: {
|
||||
'no-barrel-files/no-barrel-files': 'error',
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ['public/**/*.tsx', 'packages/grafana-ui/**/*.tsx'],
|
||||
excludedFiles: [
|
||||
'public/app/plugins/**',
|
||||
'*.story.tsx',
|
||||
'*.{test,spec}.{ts,tsx}',
|
||||
'**/__mocks__/**',
|
||||
'public/test/**',
|
||||
],
|
||||
rules: {
|
||||
'@grafana/no-untranslated-strings': 'error',
|
||||
},
|
||||
},
|
||||
],
|
||||
const nonTestFilesRules: Partial<Linter.RulesRecord> = {
|
||||
...baseRules,
|
||||
'@typescript-eslint/consistent-type-assertions': ['error', { assertionStyle: 'never' }],
|
||||
};
|
||||
|
||||
const runner = new ESLint({
|
||||
baseConfig: config,
|
||||
useEslintrc: false,
|
||||
cwd: baseDirectory,
|
||||
});
|
||||
// group files by eslint config file
|
||||
// this will create two file groups for each eslint config file
|
||||
// one for test files and one for non-test files
|
||||
const fileGroups: Record<string, string[]> = {};
|
||||
|
||||
const lintResults = await runner.lintFiles(Array.from(filePaths));
|
||||
lintResults
|
||||
.filter((lintResult) => lintResult.source)
|
||||
.forEach(({ messages, filePath }) => {
|
||||
const file = fileTestResult.addFile(filePath, '');
|
||||
messages.forEach((message, index) => {
|
||||
file.addIssue(0, 0, message.message, `${index}`);
|
||||
});
|
||||
for (const filePath of filePaths) {
|
||||
let configPath = eslintConfigMainPaths.find((configPath) => filePath.startsWith(configPath)) ?? '';
|
||||
const isTestFile =
|
||||
filePath.endsWith('.test.tsx') ||
|
||||
filePath.endsWith('.test.ts') ||
|
||||
filePath.includes('__mocks__') ||
|
||||
filePath.includes('public/test/');
|
||||
|
||||
if (isTestFile) {
|
||||
configPath += '-test';
|
||||
}
|
||||
if (!fileGroups[configPath]) {
|
||||
fileGroups[configPath] = [];
|
||||
}
|
||||
fileGroups[configPath].push(filePath);
|
||||
}
|
||||
|
||||
for (const configPath of Object.keys(fileGroups)) {
|
||||
const rules = configPath.endsWith('-test') ? baseRules : nonTestFilesRules;
|
||||
// this is by far the slowest part of this code. It takes eslint about 2 seconds just to find the config
|
||||
const linterOptions = (await cli.calculateConfigForFile(fileGroups[configPath][0])) as Linter.Config;
|
||||
const runner = new ESLint({
|
||||
baseConfig: {
|
||||
...linterOptions,
|
||||
rules: rules,
|
||||
},
|
||||
useEslintrc: false,
|
||||
cwd: baseDirectory,
|
||||
});
|
||||
const lintResults = await runner.lintFiles(fileGroups[configPath]);
|
||||
lintResults
|
||||
.filter((lintResult) => lintResult.source)
|
||||
.forEach((lintResult) => {
|
||||
const { messages } = lintResult;
|
||||
const filePath = lintResult.filePath;
|
||||
const file = fileTestResult.addFile(filePath, '');
|
||||
messages.forEach((message, index) => {
|
||||
file.addIssue(0, 0, message.message, `${index}`);
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -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.60.1
|
||||
GOLANGCI_LINT := $(GOBIN)/golangci-lint-v1.59.1
|
||||
$(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.60.1"
|
||||
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=golangci-lint.mod -o=$(GOBIN)/golangci-lint-v1.60.1 "github.com/golangci/golangci-lint/cmd/golangci-lint"
|
||||
@echo "(re)installing $(GOBIN)/golangci-lint-v1.59.1"
|
||||
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=golangci-lint.mod -o=$(GOBIN)/golangci-lint-v1.59.1 "github.com/golangci/golangci-lint/cmd/golangci-lint"
|
||||
|
||||
JB := $(GOBIN)/jb-v0.5.1
|
||||
$(JB): $(BINGO_DIR)/jb.mod
|
||||
@@ -59,3 +59,9 @@ $(SWAGGER): $(BINGO_DIR)/swagger.mod
|
||||
@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"
|
||||
|
||||
WIRE := $(GOBIN)/wire-v0.6.0
|
||||
$(WIRE): $(BINGO_DIR)/wire.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)/wire-v0.6.0"
|
||||
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=wire.mod -o=$(GOBIN)/wire-v0.6.0 "github.com/google/wire/cmd/wire"
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
|
||||
|
||||
go 1.22.1
|
||||
go 1.22
|
||||
|
||||
toolchain go1.23.0
|
||||
toolchain go1.22.4
|
||||
|
||||
require github.com/golangci/golangci-lint v1.60.1 // cmd/golangci-lint
|
||||
require github.com/golangci/golangci-lint v1.59.1 // cmd/golangci-lint
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -168,8 +168,6 @@ github.com/go-swagger/go-swagger v0.30.2 h1:23odPUyQZdkNFZZSBJ3mqYYcdh+LnuReEbdW
|
||||
github.com/go-swagger/go-swagger v0.30.2/go.mod h1:neDPes8r8PCz2JPvHRDj8BTULLh4VJUt7n6MpQqxhHM=
|
||||
github.com/go-swagger/go-swagger v0.30.6-0.20240310114303-db51e79a0e37 h1:KFcZmKdZmapAog2+eL1buervAYrYolBZk7fMecPPDmo=
|
||||
github.com/go-swagger/go-swagger v0.30.6-0.20240310114303-db51e79a0e37/go.mod h1:i1/E+d8iPNReSE7y04FaVu5OPKB3il5cn+T1Egogg3I=
|
||||
github.com/go-swagger/go-swagger v0.30.6-0.20240418033037-c46c303aaa02 h1:J6YiT/eg3gAfKMdVCkWXe6khsO+nxa8W4URZ4AUqzbA=
|
||||
github.com/go-swagger/go-swagger v0.30.6-0.20240418033037-c46c303aaa02/go.mod h1:i1/E+d8iPNReSE7y04FaVu5OPKB3il5cn+T1Egogg3I=
|
||||
github.com/gobuffalo/attrs v0.0.0-20190224210810-a9411de4debd/go.mod h1:4duuawTqi2wkkpB4ePgWMaai6/Kc6WEz83bhFwpHzj0=
|
||||
github.com/gobuffalo/depgen v0.0.0-20190329151759-d478694a28d3/go.mod h1:3STtPUQYuzV0gBVOY3vy6CfMm/ljR4pABfrTeHNLHUY=
|
||||
github.com/gobuffalo/depgen v0.1.0/go.mod h1:+ifsuy7fhi15RWncXQQKjWS9JPkdah5sZvtHc2RXGlg=
|
||||
|
||||
@@ -14,7 +14,7 @@ CUE="${GOBIN}/cue-v0.5.0"
|
||||
|
||||
DRONE="${GOBIN}/drone-v1.5.0"
|
||||
|
||||
GOLANGCI_LINT="${GOBIN}/golangci-lint-v1.60.1"
|
||||
GOLANGCI_LINT="${GOBIN}/golangci-lint-v1.59.1"
|
||||
|
||||
JB="${GOBIN}/jb-v0.5.1"
|
||||
|
||||
@@ -22,3 +22,5 @@ LEFTHOOK="${GOBIN}/lefthook-v1.4.8"
|
||||
|
||||
SWAGGER="${GOBIN}/swagger-v0.30.6-0.20240310114303-db51e79a0e37"
|
||||
|
||||
WIRE="${GOBIN}/wire-v0.6.0"
|
||||
|
||||
|
||||
5
.bingo/wire.mod
Normal file
5
.bingo/wire.mod
Normal file
@@ -0,0 +1,5 @@
|
||||
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
|
||||
|
||||
go 1.16
|
||||
|
||||
require github.com/google/wire v0.6.0 // cmd/wire
|
||||
66
.bingo/wire.sum
Normal file
66
.bingo/wire.sum
Normal file
@@ -0,0 +1,66 @@
|
||||
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
|
||||
github.com/google/subcommands v1.0.1 h1:/eqq+otEXm5vhfBrbREPCSVQbvofip6kIz+mX5TUH7k=
|
||||
github.com/google/subcommands v1.0.1/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk=
|
||||
github.com/google/subcommands v1.2.0 h1:vWQspBTo2nEqTUFita5/KeEWlUL8kQObDFbub/EN9oE=
|
||||
github.com/google/subcommands v1.2.0/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk=
|
||||
github.com/google/wire v0.5.0 h1:I7ELFeVBr3yfPIcc8+MWvrjk+3VjbcSzoXm3JVa+jD8=
|
||||
github.com/google/wire v0.5.0/go.mod h1:ngWDr9Qvq3yZA10YrxfyGELY/AFWGVpy9c1LTRi1EoU=
|
||||
github.com/google/wire v0.6.0 h1:HBkoIh4BdSxoyo9PveV8giw7ZsaBOvzWKfcg/6MrVwI=
|
||||
github.com/google/wire v0.6.0/go.mod h1:F4QhpQ9EDIdJ1Mbop/NZBRB+5yrR6qg3BnctaoUk6NA=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc=
|
||||
golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg=
|
||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
|
||||
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
||||
golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
||||
golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0=
|
||||
golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
|
||||
golang.org/x/net v0.0.0-20190311183353-d8887717615a/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-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
||||
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
|
||||
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
|
||||
golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk=
|
||||
golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY=
|
||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y=
|
||||
golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
|
||||
golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
|
||||
golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU=
|
||||
golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY=
|
||||
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.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
|
||||
golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
|
||||
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20190422233926-fe54fb35175b h1:NVD8gBK33xpdqCaZVVtd6OFJp+3dxkXuz7+U7KaVN6s=
|
||||
golang.org/x/tools v0.0.0-20190422233926-fe54fb35175b/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
||||
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
|
||||
golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58=
|
||||
golang.org/x/tools v0.17.0 h1:FvmRgNOcs3kOa+T20R1uhfP9F6HgG2mfxDv1vrx1Htc=
|
||||
golang.org/x/tools v0.17.0/go.mod h1:xsh6VxdV005rRVaS6SSAf9oiAqljS7UZUacMZ8Bnsps=
|
||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
@@ -1,8 +1,9 @@
|
||||
[run]
|
||||
init_cmds = [
|
||||
["GO_BUILD_DEV=1", "make", "gen-go"],
|
||||
["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
|
||||
@@ -16,7 +17,8 @@ watch_exts = [".go", ".ini", ".toml", ".template.html"]
|
||||
ignore_files = [".*_gen.go"]
|
||||
build_delay = 1500
|
||||
cmds = [
|
||||
["GO_BUILD_DEV=1", "make", "gen-go"],
|
||||
["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"]
|
||||
]
|
||||
|
||||
@@ -105,7 +105,7 @@
|
||||
- Notice to makers/users of custom data sources, there is a minor breaking change in 2.2 that
|
||||
require an update to custom data sources for them to work in 2.2. [Read this doc](https://github.com/grafana/grafana/tree/master/docs/sources/datasources/plugin_api.md) for more on the
|
||||
data source api change.
|
||||
- Data source api changes, [PLUGIN_CHANGES.md](https://github.com/grafana/grafana/blob/main/public/app/plugins/PLUGIN_CHANGES.md)
|
||||
- Data source api changes, [PLUGIN_CHANGES.md](https://github.com/grafana/grafana/blob/master/public/app/plugins/PLUGIN_CHANGES.md)
|
||||
- The duplicate query function used in data source editors is changed, and moveMetricQuery function was renamed
|
||||
|
||||
**Tech (Note for devs)**
|
||||
|
||||
@@ -198,7 +198,7 @@ slack channel (link to slack channel in readme).
|
||||
|
||||
### Breaking changes
|
||||
|
||||
- **Plugin API**: Both data source and panel plugin api (and plugin.json schema) have been updated, requiring an update to plugins. See [plugin api](https://github.com/grafana/grafana/blob/main/public/app/plugins/plugin_api.md) for more info.
|
||||
- **Plugin API**: Both data source and panel plugin api (and plugin.json schema) have been updated, requiring an update to plugins. See [plugin api](https://github.com/grafana/grafana/blob/master/public/app/plugins/plugin_api.md) for more info.
|
||||
- **InfluxDB 0.8.x** The data source for the old version of influxdb (0.8.x) is no longer included in default builds, but can easily be installed via improved plugin system, closes [#3523](https://github.com/grafana/grafana/issues/3523)
|
||||
- **KairosDB** The data source is no longer included in default builds, but can easily be installed via improved plugin system, closes [#3524](https://github.com/grafana/grafana/issues/3524)
|
||||
- **Templating**: Templating value formats (glob/regex/pipe etc) are now handled automatically and not specified by the user, this makes variable values possible to reuse in many contexts. It can in some edge cases break existing dashboards that have template variables that do not reload on dashboard load. To fix any issue just go into template variable options and update the variable (so it's values are reloaded.).
|
||||
|
||||
@@ -100,7 +100,7 @@ See [security announcement](https://community.grafana.com/t/grafana-5-2-3-and-4-
|
||||
## Tech
|
||||
|
||||
- **Go**: Grafana is now built using golang 1.9
|
||||
- **Webpack**: Changed from systemjs to webpack (see readme or building from source guide for new build instructions). Systemjs is still used to load plugins but now plugins can only import a limited set of dependencies. See [PLUGIN_DEV.md](https://github.com/grafana/grafana/blob/main/PLUGIN_DEV.md) for more details on how this can effect some plugins.
|
||||
- **Webpack**: Changed from systemjs to webpack (see readme or building from source guide for new build instructions). Systemjs is still used to load plugins but now plugins can only import a limited set of dependencies. See [PLUGIN_DEV.md](https://github.com/grafana/grafana/blob/master/PLUGIN_DEV.md) for more details on how this can effect some plugins.
|
||||
|
||||
# 4.5.2 (2017-09-22)
|
||||
|
||||
|
||||
@@ -1291,4 +1291,4 @@ repo on July 1st. Make sure you have switched to the new repo by then. The new r
|
||||
- **Text Panel**: The text panel does no longer by default allow unsanitized HTML. [#4117](https://github.com/grafana/grafana/issues/4117). This means that if you have text panels with scripts tags they will no longer work as before. To enable unsafe javascript execution in text panels enable the settings `disable_sanitize_html` under the section `[panels]` in your Grafana ini file, or set env variable `GF_PANELS_DISABLE_SANITIZE_HTML=true`.
|
||||
- **Dashboard**: Panel property `minSpan` replaced by `maxPerRow`. Dashboard migration will automatically migrate all dashboard panels using the `minSpan` property to the new `maxPerRow` property [#12991](https://github.com/grafana/grafana/pull/12991)
|
||||
|
||||
For older release notes, refer to the [CHANGELOG_ARCHIVE.md](https://github.com/grafana/grafana/blob/main/CHANGELOG_ARCHIVE.md)
|
||||
For older release notes, refer to the [CHANGELOG_ARCHIVE.md](https://github.com/grafana/grafana/blob/master/CHANGELOG_ARCHIVE.md)
|
||||
|
||||
@@ -544,7 +544,7 @@ Issue [#29407](https://github.com/grafana/grafana/issues/29407)
|
||||
|
||||
We have upgraded AngularJS from version 1.6.6 to 1.8.2. Due to this upgrade some old angular plugins might stop working and will require a small update. This is due to the deprecation and removal of pre-assigned bindings. So if your custom angular controllers expect component bindings in the controller constructor you need to move this code to an `$onInit` function. For more details on how to migrate AngularJS code open the [migration guide](https://docs.angularjs.org/guide/migration) and search for **pre-assigning bindings**.
|
||||
|
||||
In order not to break all angular panel plugins and data sources we have some custom [angular inject behavior](https://github.com/grafana/grafana/blob/main/public/app/core/injectorMonkeyPatch.ts) that makes sure that bindings for these controllers are still set before constructor is called so many old angular panels and data source plugins will still work. Issue [#28736](https://github.com/grafana/grafana/issues/28736)
|
||||
In order not to break all angular panel plugins and data sources we have some custom [angular inject behavior](https://github.com/grafana/grafana/blob/master/public/app/core/injectorMonkeyPatch.ts) that makes sure that bindings for these controllers are still set before constructor is called so many old angular panels and data source plugins will still work. Issue [#28736](https://github.com/grafana/grafana/issues/28736)
|
||||
|
||||
### Deprecations
|
||||
|
||||
@@ -1288,8 +1288,8 @@ This option to group query variable values into groups by tags has been an exper
|
||||
- **Datasource/Loki**: Support for [deprecated Loki endpoints](https://github.com/grafana/loki/blob/master/docs/api.md#lokis-http-api) has been removed.
|
||||
- **Backend plugins**: Grafana now requires backend plugins to be signed, otherwise Grafana will not load/start them. This is an additional security measure to make sure backend plugin binaries and files haven't been tampered with. Refer to [Upgrade Grafana](https://grafana.com/docs/grafana/latest/installation/upgrading/#upgrading-to-v7-0) for more information.
|
||||
- **Docker**: Our Ubuntu based images have been upgraded to Ubuntu [20.04 LTS](https://releases.ubuntu.com/20.04/).
|
||||
- **@grafana/ui**: Forms migration notice, see [@grafana/ui changelog](https://github.com/grafana/grafana/blob/main/packages/grafana-ui/CHANGELOG.md)
|
||||
- **@grafana/ui**: Select API change for creating custom values, see [@grafana/ui changelog](https://github.com/grafana/grafana/blob/main/packages/grafana-ui/CHANGELOG.md)
|
||||
- **@grafana/ui**: Forms migration notice, see [@grafana/ui changelog](https://github.com/grafana/grafana/blob/master/packages/grafana-ui/CHANGELOG.md)
|
||||
- **@grafana/ui**: Select API change for creating custom values, see [@grafana/ui changelog](https://github.com/grafana/grafana/blob/master/packages/grafana-ui/CHANGELOG.md)
|
||||
|
||||
**Deprecation warnings**
|
||||
|
||||
@@ -1304,7 +1304,7 @@ Not just visualizing data from anywhere, in Grafana 7 you can transform it too.
|
||||
|
||||
Data transformations will provide a common set of data operations that were previously duplicated as custom features in many panels or data sources but are now an integral part of the Grafana data processing pipeline and something all data sources and panels can take advantage of.
|
||||
|
||||
In Grafana 7.0 we have a shared data model for both time series and table data that we call [DataFrame](https://github.com/grafana/grafana/blob/main/docs/sources/plugins/developing/dataframe.md). A DataFrame is like a table with columns but we refer to columns as fields. A time series is simply a DataFrame with two fields (time & value).
|
||||
In Grafana 7.0 we have a shared data model for both time series and table data that we call [DataFrame](https://github.com/grafana/grafana/blob/master/docs/sources/plugins/developing/dataframe.md). A DataFrame is like a table with columns but we refer to columns as fields. A time series is simply a DataFrame with two fields (time & value).
|
||||
|
||||
**Transformations shipping in 7.0**
|
||||
|
||||
@@ -1414,7 +1414,7 @@ We have also extended the time zone options so you can select any of the standar
|
||||
### Features / Enhancements
|
||||
|
||||
- **Docker**: Upgrade to Alpine 3.11. [#24056](https://github.com/grafana/grafana/pull/24056), [@aknuds1](https://github.com/aknuds1)
|
||||
- **Forms**: Remove Forms namespace [BREAKING]. Will cause all `Forms` imports to stop working. See migration guide in [@grafana/ui changelog](https://github.com/grafana/grafana/blob/main/packages/grafana-ui/CHANGELOG.md)[#24378](https://github.com/grafana/grafana/pull/24378), [@tskarhed](https://github.com/tskarhed)
|
||||
- **Forms**: Remove Forms namespace [BREAKING]. Will cause all `Forms` imports to stop working. See migration guide in [@grafana/ui changelog](https://github.com/grafana/grafana/blob/master/packages/grafana-ui/CHANGELOG.md)[#24378](https://github.com/grafana/grafana/pull/24378), [@tskarhed](https://github.com/tskarhed)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
@@ -1429,7 +1429,7 @@ We have also extended the time zone options so you can select any of the standar
|
||||
- **Removed PhantomJS**: PhantomJS was deprecated in [Grafana v6.4](https://grafana.com/docs/grafana/latest/guides/whats-new-in-v6-4/#phantomjs-deprecation) and starting from Grafana v7.0.0, all PhantomJS support has been removed. This means that Grafana no longer ships with a built-in image renderer, and we advise you to install the [Grafana Image Renderer plugin](https://grafana.com/grafana/plugins/grafana-image-renderer).
|
||||
- **Docker**: Our Ubuntu based images have been upgraded to Ubuntu [20.04 LTS](https://releases.ubuntu.com/20.04/).
|
||||
- **Dashboard**: A global minimum dashboard refresh interval is now enforced and defaults to 5 seconds.
|
||||
- **@grafana/ui**: Forms migration notice, see [@grafana/ui changelog](https://github.com/grafana/grafana/blob/main/packages/grafana-ui/CHANGELOG.md)
|
||||
- **@grafana/ui**: Forms migration notice, see [@grafana/ui changelog](https://github.com/grafana/grafana/blob/master/packages/grafana-ui/CHANGELOG.md)
|
||||
- **Interval calculation**: There is now a new option `Max data points` that controls the auto interval `$__interval` calculation. Interval was previously calculated by dividing the panel width by the time range. With the new max data points option it is now easy to set `$__interval` to a dynamic value that is time range agnostic. For example if you set `Max data points` to 10 Grafana will dynamically set `$__interval` by dividing the current time range by 10.
|
||||
- **Datasource/Loki**: Support for [deprecated Loki endpoints](https://github.com/grafana/loki/blob/master/docs/api.md#lokis-http-api) has been removed.
|
||||
|
||||
@@ -1484,8 +1484,8 @@ We have also extended the time zone options so you can select any of the standar
|
||||
- **Removed PhantomJS**: PhantomJS was deprecated in [Grafana v6.4](https://grafana.com/docs/grafana/latest/guides/whats-new-in-v6-4/#phantomjs-deprecation) and starting from Grafana v7.0.0, all PhantomJS support has been removed. This means that Grafana no longer ships with a built-in image renderer, and we advise you to install the [Grafana Image Renderer plugin](https://grafana.com/grafana/plugins/grafana-image-renderer).
|
||||
- **Docker**: Our Ubuntu based images have been upgraded to Ubuntu [20.04 LTS](https://releases.ubuntu.com/20.04/).
|
||||
- **Dashboard**: A global minimum dashboard refresh interval is now enforced and defaults to 5 seconds.
|
||||
- **@grafana/ui**: Forms migration notice, see [@grafana/ui changelog](https://github.com/grafana/grafana/blob/main/packages/grafana-ui/CHANGELOG.md)
|
||||
- **@grafana/ui**: Select API change for creating custom values, see [@grafana/ui changelog](https://github.com/grafana/grafana/blob/main/packages/grafana-ui/CHANGELOG.md)
|
||||
- **@grafana/ui**: Forms migration notice, see [@grafana/ui changelog](https://github.com/grafana/grafana/blob/master/packages/grafana-ui/CHANGELOG.md)
|
||||
- **@grafana/ui**: Select API change for creating custom values, see [@grafana/ui changelog](https://github.com/grafana/grafana/blob/master/packages/grafana-ui/CHANGELOG.md)
|
||||
- **Interval calculation**: There is now a new option `Max data points` that controls the auto interval `$__interval` calculation. Interval was previously calculated by dividing the panel width by the time range. With the new max data points option it is now easy to set `$__interval` to a dynamic value that is time range agnostic. For example if you set `Max data points` to 10 Grafana will dynamically set `$__interval` by dividing the current time range by 10.
|
||||
- **Datasource/Loki**: Support for [deprecated Loki endpoints](https://github.com/grafana/loki/blob/master/docs/api.md#lokis-http-api) has been removed.
|
||||
|
||||
|
||||
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()
|
||||
)
|
||||
|
||||
2393
.drone.yml
2393
.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
|
||||
|
||||
102
.eslintrc
102
.eslintrc
@@ -1,25 +1,13 @@
|
||||
{
|
||||
"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"],
|
||||
"settings": {
|
||||
"import/internal-regex": "^(app/)|(@grafana)",
|
||||
"import/external-module-folders": ["node_modules", ".yarn"],
|
||||
"import/external-module-folders": ["node_modules", ".yarn"]
|
||||
},
|
||||
"rules": {
|
||||
"@grafana/no-border-radius-literal": "error",
|
||||
"@grafana/no-unreduced-motion": "error",
|
||||
"react/prop-types": "off",
|
||||
// need to ignore emotion's `css` prop, see https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-unknown-property.md#rule-options
|
||||
"react/no-unknown-property": ["error", { "ignore": ["css"] }],
|
||||
@@ -31,8 +19,8 @@
|
||||
{
|
||||
"groups": [["builtin", "external"], "internal", "parent", "sibling", "index"],
|
||||
"newlines-between": "always",
|
||||
"alphabetize": { "order": "asc" },
|
||||
},
|
||||
"alphabetize": { "order": "asc" }
|
||||
}
|
||||
],
|
||||
"no-restricted-imports": [
|
||||
"error",
|
||||
@@ -41,43 +29,47 @@
|
||||
{
|
||||
"name": "react-redux",
|
||||
"importNames": ["useDispatch", "useSelector"],
|
||||
"message": "Please import from app/types instead.",
|
||||
"message": "Please import from app/types instead."
|
||||
},
|
||||
{
|
||||
"name": "react-i18next",
|
||||
"importNames": ["Trans", "t"],
|
||||
"message": "Please import from app/core/internationalization instead",
|
||||
"message": "Please import from app/core/internationalization instead"
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
"name": "@grafana/e2e",
|
||||
"message": "@grafana/e2e is deprecated. Please import from ./e2e/utils instead"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
// Use typescript's no-redeclare for compatibility with overrides
|
||||
"no-redeclare": "off",
|
||||
"@typescript-eslint/no-redeclare": ["error"],
|
||||
"@typescript-eslint/no-redeclare": ["error"]
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
"files": ["packages/grafana-ui/src/components/uPlot/**/*.{ts,tsx}"],
|
||||
"rules": {
|
||||
"react-hooks/rules-of-hooks": "off",
|
||||
"react-hooks/exhaustive-deps": "off",
|
||||
},
|
||||
"react-hooks/exhaustive-deps": "off"
|
||||
}
|
||||
},
|
||||
{
|
||||
"files": ["packages/grafana-ui/src/components/ThemeDemos/**/*.{ts,tsx}"],
|
||||
"rules": {
|
||||
"@emotion/jsx-import": "off",
|
||||
"react/jsx-uses-react": "off",
|
||||
"react/react-in-jsx-scope": "off",
|
||||
},
|
||||
"react/react-in-jsx-scope": "off"
|
||||
}
|
||||
},
|
||||
{
|
||||
"files": ["public/dashboards/scripted*.js"],
|
||||
"rules": {
|
||||
"no-redeclare": "error",
|
||||
"@typescript-eslint/no-redeclare": "off",
|
||||
},
|
||||
"@typescript-eslint/no-redeclare": "off"
|
||||
}
|
||||
},
|
||||
{
|
||||
"extends": ["plugin:jsx-a11y/recommended"],
|
||||
@@ -90,36 +82,30 @@
|
||||
"jsx-a11y/no-autofocus": [
|
||||
"error",
|
||||
{
|
||||
"ignoreNonDOM": true,
|
||||
},
|
||||
"ignoreNonDOM": true
|
||||
}
|
||||
],
|
||||
"jsx-a11y/label-has-associated-control": [
|
||||
"error",
|
||||
{
|
||||
"controlComponents": ["NumberInput"],
|
||||
"depth": 2,
|
||||
},
|
||||
],
|
||||
},
|
||||
"depth": 2
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"files": [
|
||||
"public/app/plugins/datasource/azuremonitor/*.{ts,tsx}",
|
||||
"public/app/plugins/datasource/azuremonitor/**/*.{ts,tsx}",
|
||||
"public/app/plugins/datasource/cloud-monitoring/*.{ts,tsx}",
|
||||
"public/app/plugins/datasource/cloud-monitoring/**/*.{ts,tsx}",
|
||||
"public/app/plugins/datasource/elasticsearch/*.{ts,tsx}",
|
||||
"public/app/plugins/datasource/elasticsearch/**/*.{ts,tsx}",
|
||||
"public/app/plugins/datasource/grafana-postgresql-datasource/*.{ts,tsx}",
|
||||
"public/app/plugins/datasource/grafana-postgresql-datasource/**/*.{ts,tsx}",
|
||||
"public/app/plugins/datasource/grafana-pyroscope-datasource/*.{ts,tsx}",
|
||||
"public/app/plugins/datasource/grafana-pyroscope-datasource/**/*.{ts,tsx}",
|
||||
"public/app/plugins/datasource/grafana-testdata-datasource/*.{ts,tsx}",
|
||||
"public/app/plugins/datasource/grafana-testdata-datasource/**/*.{ts,tsx}",
|
||||
"public/app/plugins/datasource/jaeger/*.{ts,tsx}",
|
||||
"public/app/plugins/datasource/jaeger/**/*.{ts,tsx}",
|
||||
"public/app/plugins/datasource/loki/*.{ts,tsx}",
|
||||
"public/app/plugins/datasource/loki/**/*.{ts,tsx}",
|
||||
"public/app/plugins/datasource/azuremonitor/*.{ts,tsx}",
|
||||
"public/app/plugins/datasource/azuremonitor/**/*.{ts,tsx}",
|
||||
"public/app/plugins/datasource/cloud-monitoring/*.{ts,tsx}",
|
||||
"public/app/plugins/datasource/cloud-monitoring/**/*.{ts,tsx}",
|
||||
"public/app/plugins/datasource/mysql/*.{ts,tsx}",
|
||||
"public/app/plugins/datasource/mysql/**/*.{ts,tsx}",
|
||||
"public/app/plugins/datasource/parca/*.{ts,tsx}",
|
||||
@@ -129,18 +115,14 @@
|
||||
"public/app/plugins/datasource/loki/*.{ts,tsx}",
|
||||
"public/app/plugins/datasource/loki/**/*.{ts,tsx}",
|
||||
"public/app/plugins/datasource/elasticsearch/*.{ts,tsx}",
|
||||
"public/app/plugins/datasource/elasticsearch/**/*.{ts,tsx}",
|
||||
"public/app/plugins/datasource/cloudwatch/*.{ts,tsx}",
|
||||
"public/app/plugins/datasource/cloudwatch/**/*.{ts,tsx}",
|
||||
"public/app/plugins/datasource/zipkin/*.{ts,tsx}",
|
||||
"public/app/plugins/datasource/zipkin/**/*.{ts,tsx}",
|
||||
"public/app/plugins/datasource/elasticsearch/**/*.{ts,tsx}"
|
||||
],
|
||||
"settings": {
|
||||
"import/resolver": {
|
||||
"node": {
|
||||
"extensions": [".ts", ".tsx"],
|
||||
},
|
||||
},
|
||||
"extensions": [".ts", ".tsx"]
|
||||
}
|
||||
}
|
||||
},
|
||||
"rules": {
|
||||
"import/no-restricted-paths": [
|
||||
@@ -151,12 +133,12 @@
|
||||
"target": "./public/app/plugins",
|
||||
"from": "./public",
|
||||
"except": ["./app/plugins"],
|
||||
"message": "Core plugins are not allowed to depend on Grafana core packages",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
"message": "Core plugins are not allowed to depend on Grafana core packages"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
504
.github/CODEOWNERS
vendored
504
.github/CODEOWNERS
vendored
@@ -13,11 +13,13 @@
|
||||
|
||||
# Documentation
|
||||
/.changelog-archive @grafana/grafana-release-guild
|
||||
/.codespellignore @grafana/docs-tooling
|
||||
/CHANGELOG.md @grafana/grafana-release-guild
|
||||
/CODE_OF_CONDUCT.md @grafana/grafana-community-support
|
||||
/CONTRIBUTING.md @grafana/grafana-community-support
|
||||
/GOVERNANCE.md @RichiH
|
||||
/HALL_OF_FAME.md @grafana/grafana-community-support
|
||||
/ISSUE_TRIAGE.md @grafana/grafana-community-support
|
||||
/LICENSE @torkelo
|
||||
/LICENSING.md @torkelo
|
||||
/MAINTAINERS.md @RichiH
|
||||
@@ -26,148 +28,132 @@
|
||||
/ROADMAP.md @torkelo
|
||||
/SECURITY.md @grafana/security-team
|
||||
/SUPPORT.md @torkelo
|
||||
/UPGRADING_DEPENDENCIES.md @grafana/docs-grafana
|
||||
/WORKFLOW.md @torkelo
|
||||
/contribute/ @grafana/grafana-community-support
|
||||
/contribute/UPGRADING_DEPENDENCIES.md @grafana/docs-grafana
|
||||
/devenv/README.md @grafana/docs-grafana
|
||||
|
||||
# START Technical documentation
|
||||
# Technical documentation
|
||||
# `make docs` procedure and related workflows are owned @grafana/docs-tooling. Slack #docs.
|
||||
/docs/ @grafana/docs-tooling
|
||||
|
||||
/docs/.codespellignore @grafana/docs-tooling
|
||||
/docs/sources/ @irenerl24
|
||||
|
||||
/docs/sources/alerting/ @brendamuir
|
||||
/docs/sources/dashboards/ @imatwawana
|
||||
/docs/sources/explore/ @grafana/explore-squad @lwandz13
|
||||
/docs/sources/panels-visualizations/ @imatwawana
|
||||
/docs/sources/release-notes/ @irenerl24 @GrafanaWriter
|
||||
/docs/sources/upgrade-guide/ @imatwawana
|
||||
/docs/sources/whatsnew/ @imatwawana
|
||||
|
||||
/docs/sources/developers/plugins/ @grafana/plugins-platform-frontend @grafana/plugins-platform-backend
|
||||
|
||||
# Documentation sources might have different owners.
|
||||
/docs/ @grafana/docs-tooling
|
||||
/docs/sources/ @Eve832
|
||||
/docs/sources/administration/ @jdbaldry
|
||||
/docs/sources/alerting/ @brendamuir
|
||||
/docs/sources/dashboards/ @imatwawana
|
||||
/docs/sources/datasources/ @lwandz13
|
||||
/docs/sources/explore/ @grafana/explore-squad
|
||||
/docs/sources/fundamentals @chri2547
|
||||
/docs/sources/getting-started/ @chri2547
|
||||
/docs/sources/introduction/ @chri2547
|
||||
/docs/sources/old-alerting/ @brendamuir
|
||||
/docs/sources/panels-visualizations/ @imatwawana
|
||||
/docs/sources/panels-visualizations/query-transform-data/transform-data/index.md @imatwawana @baldm0mma
|
||||
# END Technical documentation
|
||||
/docs/sources/release-notes/ @Eve832 @GrafanaWriter
|
||||
/docs/sources/setup-grafana/ @chri2547
|
||||
/docs/sources/upgrade-guide/ @imatwawana
|
||||
/docs/sources/whatsnew/ @imatwawana
|
||||
/docs/sources/developers/plugins/ @Eve832 @josmperez @grafana/plugins-platform-frontend @grafana/plugins-platform-backend
|
||||
|
||||
# Backend code
|
||||
/go.mod @grafana/grafana-backend-group
|
||||
/go.sum @grafana/grafana-backend-group
|
||||
/go.mod @grafana/backend-platform
|
||||
/go.sum @grafana/backend-platform
|
||||
/go.work @grafana/grafana-app-platform-squad
|
||||
/go.work.sum @grafana/grafana-app-platform-squad
|
||||
/.bingo/ @grafana/grafana-backend-group
|
||||
/pkg/README.md @grafana/grafana-backend-group
|
||||
/pkg/ruleguard.rules.go @grafana/grafana-backend-group
|
||||
/.bra.toml @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
|
||||
/.bingo/ @grafana/backend-platform
|
||||
/pkg/README.md @grafana/backend-platform
|
||||
/pkg/ruleguard.rules.go @grafana/backend-platform
|
||||
/.bra.toml @grafana/backend-platform
|
||||
/.golangci.toml @grafana/backend-platform
|
||||
/build.go @grafana/backend-platform
|
||||
/scripts/modowners/ @grafana/backend-platform
|
||||
/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/api/ @grafana/backend-platform
|
||||
/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/components/dashdiffs/ @grafana/grafana-app-platform-squad
|
||||
/pkg/components/imguploader/ @grafana/alerting-backend
|
||||
/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/db/ @grafana/grafana-backend-group
|
||||
/pkg/infra/localcache/ @grafana/grafana-backend-group
|
||||
/pkg/infra/log/ @grafana/grafana-backend-group
|
||||
/pkg/infra/metrics/ @grafana/grafana-backend-group
|
||||
/pkg/infra/network/ @grafana/grafana-backend-group
|
||||
/pkg/infra/process/ @grafana/grafana-backend-group
|
||||
/pkg/infra/remotecache/ @grafana/grafana-backend-group
|
||||
/pkg/infra/serverlock/ @grafana/grafana-backend-group
|
||||
/pkg/infra/slugify/ @grafana/grafana-backend-group
|
||||
/pkg/infra/tracing/ @grafana/grafana-backend-group
|
||||
/pkg/infra/usagestats/ @grafana/grafana-backend-group
|
||||
/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/cleanup/ @grafana/grafana-backend-group
|
||||
/pkg/services/contexthandler/ @grafana/grafana-backend-group @grafana/grafana-app-platform-squad
|
||||
/pkg/bus/ @grafana/backend-platform
|
||||
/pkg/cmd/ @grafana/backend-platform
|
||||
/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/backend-platform
|
||||
/pkg/components/imguploader/ @grafana/backend-platform
|
||||
/pkg/components/loki/ @grafana/backend-platform
|
||||
/pkg/components/null/ @grafana/backend-platform
|
||||
/pkg/components/simplejson/ @grafana/backend-platform
|
||||
/pkg/events/ @grafana/backend-platform
|
||||
/pkg/extensions/ @grafana/backend-platform
|
||||
/pkg/ifaces/ @grafana/backend-platform
|
||||
/pkg/infra/appcontext/ @grafana/backend-platform
|
||||
/pkg/infra/db/ @grafana/backend-platform
|
||||
/pkg/infra/localcache/ @grafana/backend-platform
|
||||
/pkg/infra/log/ @grafana/backend-platform
|
||||
/pkg/infra/metrics/ @grafana/backend-platform
|
||||
/pkg/infra/network/ @grafana/backend-platform
|
||||
/pkg/infra/process/ @grafana/backend-platform
|
||||
/pkg/infra/remotecache/ @grafana/backend-platform
|
||||
/pkg/infra/serverlock/ @grafana/backend-platform
|
||||
/pkg/infra/slugify/ @grafana/backend-platform
|
||||
/pkg/infra/tracing/ @grafana/backend-platform
|
||||
/pkg/infra/usagestats/ @grafana/backend-platform
|
||||
/pkg/middleware/ @grafana/backend-platform
|
||||
/pkg/mocks/ @grafana/backend-platform
|
||||
/pkg/models/ @grafana/backend-platform
|
||||
/pkg/server/ @grafana/backend-platform
|
||||
/pkg/services/annotations/ @grafana/backend-platform
|
||||
/pkg/services/apikey/ @grafana/identity-access-team
|
||||
/pkg/services/cleanup/ @grafana/backend-platform
|
||||
/pkg/services/contexthandler/ @grafana/backend-platform
|
||||
/pkg/services/correlations/ @grafana/explore-squad
|
||||
/pkg/services/dashboardimport/ @grafana/grafana-backend-group
|
||||
/pkg/services/dashboards/ @grafana/grafana-app-platform-squad
|
||||
/pkg/services/dashboardversion/ @grafana/grafana-backend-group
|
||||
/pkg/services/encryption/ @grafana/grafana-operator-experience-squad
|
||||
/pkg/services/folder/ @grafana/grafana-search-and-storage
|
||||
/pkg/services/dashboardimport/ @grafana/backend-platform
|
||||
/pkg/services/dashboards/ @grafana/backend-platform
|
||||
/pkg/services/dashboardversion/ @grafana/backend-platform
|
||||
/pkg/services/encryption/ @grafana/backend-platform
|
||||
/pkg/services/folder/ @grafana/backend-platform
|
||||
/pkg/services/apiserver @grafana/grafana-app-platform-squad
|
||||
/pkg/services/hooks/ @grafana/grafana-backend-group
|
||||
/pkg/services/kmsproviders/ @grafana/grafana-operator-experience-squad
|
||||
/pkg/services/licensing/ @grafana/grafana-operator-experience-squad
|
||||
/pkg/services/navtree/ @grafana/grafana-backend-group
|
||||
/pkg/services/notifications/ @grafana/grafana-backend-group
|
||||
/pkg/services/org/ @grafana/grafana-backend-group
|
||||
/pkg/services/hooks/ @grafana/backend-platform
|
||||
/pkg/services/kmsproviders/ @grafana/backend-platform
|
||||
/pkg/services/licensing/ @grafana/backend-platform
|
||||
/pkg/services/navtree/ @grafana/backend-platform
|
||||
/pkg/services/notifications/ @grafana/backend-platform
|
||||
/pkg/services/org/ @grafana/backend-platform
|
||||
/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/quota/ @grafana/grafana-search-and-storage
|
||||
/pkg/services/screenshot/ @grafana/grafana-backend-group
|
||||
/pkg/services/search/ @grafana/grafana-search-and-storage
|
||||
/pkg/services/searchusers/ @grafana/grafana-search-and-storage
|
||||
/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/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/temp_user/ @grafana/grafana-backend-group
|
||||
/pkg/services/updatechecker/ @grafana/grafana-backend-group
|
||||
/pkg/services/user/ @grafana/access-squad
|
||||
/pkg/services/validations/ @grafana/grafana-backend-group
|
||||
/pkg/setting/ @grafana/grafana-backend-services-squad
|
||||
/pkg/tests/ @grafana/grafana-backend-services-squad
|
||||
/pkg/services/preference/ @grafana/backend-platform
|
||||
/pkg/services/provisioning/ @grafana/backend-platform
|
||||
/pkg/services/query/ @grafana/backend-platform
|
||||
/pkg/services/queryhistory/ @grafana/backend-platform
|
||||
/pkg/services/quota/ @grafana/backend-platform
|
||||
/pkg/services/rendering/ @grafana/backend-platform
|
||||
/pkg/services/screenshot/ @grafana/backend-platform
|
||||
/pkg/services/search/ @grafana/backend-platform
|
||||
/pkg/services/searchusers/ @grafana/backend-platform
|
||||
/pkg/services/secrets/ @grafana/backend-platform
|
||||
/pkg/services/shorturls/ @grafana/backend-platform
|
||||
/pkg/services/sqlstore/ @grafana/backend-platform
|
||||
/pkg/services/ssosettings/ @grafana/identity-access-team
|
||||
/pkg/services/star/ @grafana/backend-platform
|
||||
/pkg/services/stats/ @grafana/backend-platform
|
||||
/pkg/services/tag/ @grafana/backend-platform
|
||||
/pkg/services/team/ @grafana/identity-access-team
|
||||
/pkg/services/temp_user/ @grafana/backend-platform
|
||||
/pkg/services/updatechecker/ @grafana/backend-platform
|
||||
/pkg/services/user/ @grafana/identity-access-team
|
||||
/pkg/services/validations/ @grafana/backend-platform
|
||||
/pkg/setting/ @grafana/backend-platform
|
||||
/pkg/tests/ @grafana/backend-platform
|
||||
/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/util/ @grafana/grafana-backend-group
|
||||
/pkg/web/ @grafana/grafana-backend-group
|
||||
/pkg/tsdb/grafanads/ @grafana/backend-platform
|
||||
/pkg/tsdb/legacydata/ @grafana/backend-platform
|
||||
/pkg/tsdb/opentsdb/ @grafana/backend-platform
|
||||
/pkg/tsdb/sqleng/ @grafana/partner-datasources @grafana/oss-big-tent
|
||||
/pkg/util/ @grafana/backend-platform
|
||||
/pkg/web/ @grafana/backend-platform
|
||||
|
||||
/pkg/infra/kvstore/ @grafana/backend-platform
|
||||
/pkg/infra/fs/ @grafana/backend-platform
|
||||
/pkg/infra/x/ @grafana/backend-platform
|
||||
|
||||
/pkg/infra/kvstore/ @grafana/grafana-backend-group
|
||||
/pkg/infra/fs/ @grafana/grafana-backend-group
|
||||
|
||||
# devenv
|
||||
# Backend code, developers environment
|
||||
@@ -175,34 +161,33 @@
|
||||
|
||||
# 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
|
||||
/devenv/bulk-folders/ @grafana/grafana-frontend-platform
|
||||
/devenv/create_docker_compose.sh @grafana/grafana-backend-services-squad
|
||||
/devenv/alert_rules.yaml @grafana/alerting-backend
|
||||
/devenv/bulk_alerting_dashboards/ @grafana/alerting-backend-product
|
||||
/devenv/create_docker_compose.sh @grafana/backend-platform
|
||||
/devenv/dashboards.yaml @grafana/dashboards-squad
|
||||
/devenv/datasources.yaml @grafana/grafana-backend-group
|
||||
/devenv/datasources_docker.yaml @grafana/grafana-backend-group
|
||||
/devenv/datasources.yaml @grafana/backend-platform
|
||||
/devenv/datasources_docker.yaml @grafana/backend-platform
|
||||
/devenv/dev-dashboards-without-uid/ @grafana/dashboards-squad
|
||||
/devenv/dev-dashboards/ @grafana/dashboards-squad
|
||||
/devenv/docker/blocks/alert_webhook_listener/ @grafana/alerting-backend
|
||||
/devenv/docker/blocks/alert_webhook_listener/ @grafana/alerting-backend-product
|
||||
/devenv/docker/blocks/clickhouse/ @grafana/partner-datasources
|
||||
/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/memcached/ @grafana/backend-platform
|
||||
/devenv/docker/blocks/mimir_backend/ @grafana/alerting-backend-product
|
||||
/devenv/docker/blocks/mssql/ @grafana/partner-datasources
|
||||
/devenv/docker/blocks/mssql_arm64/ @grafana/partner-datasources
|
||||
/devenv/docker/blocks/mssql_tests/ @grafana/partner-datasources
|
||||
@@ -211,33 +196,31 @@
|
||||
/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
|
||||
/devenv/docker/blocks/sensugo/ @grafana/backend-platform
|
||||
/devenv/docker/blocks/slow_proxy/ @bergquist
|
||||
/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/webdav/ @grafana/alerting-backend
|
||||
/devenv/docker/blocks/zipkin/ @grafana/observability-traces-and-profiling
|
||||
/devenv/docker/blocks/webdav/ @grafana/alerting-backend-product
|
||||
/devenv/docker/buildcontainer/ @bergquist
|
||||
/devenv/docker/compose_header.yml @grafana/grafana-backend-services-squad
|
||||
/devenv/docker/compose_header.yml @grafana/backend-platform
|
||||
/devenv/docker/debtest/ @bergquist
|
||||
/devenv/docker/ha-test-unified-alerting/ @grafana/alerting-backend
|
||||
/devenv/docker/ha_test/ @grafana/grafana-backend-services-squad
|
||||
/devenv/docker/loadtest/ @grafana/grafana-backend-services-squad
|
||||
/devenv/docker/rpmtest/ @grafana/grafana-backend-services-squad
|
||||
/devenv/docker/ha-test-unified-alerting/ @grafana/alerting-backend-product
|
||||
/devenv/docker/ha_test/ @grafana/backend-platform
|
||||
/devenv/docker/loadtest/ @grafana/backend-platform
|
||||
/devenv/docker/rpmtest/ @grafana/backend-platform
|
||||
/devenv/jsonnet/ @grafana/dataviz-squad
|
||||
/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
|
||||
/devenv/setup.sh @grafana/backend-platform
|
||||
|
||||
# Emails
|
||||
/emails/ @grafana/alerting-frontend
|
||||
@@ -256,7 +239,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 +247,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,12 +261,10 @@
|
||||
|
||||
# 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
|
||||
*_mig.go @grafana/grafana-search-and-storage
|
||||
/pkg/services/sqlstore/migrations/ @grafana/backend-platform @grafana/hosted-grafana-team
|
||||
*_mig.go @grafana/backend-platform @grafana/hosted-grafana-team
|
||||
|
||||
# Grafana app platform
|
||||
/pkg/services/live/ @grafana/grafana-app-platform-squad
|
||||
@@ -290,20 +272,20 @@
|
||||
/pkg/services/store/ @grafana/grafana-app-platform-squad
|
||||
/pkg/infra/filestorage/ @grafana/grafana-app-platform-squad
|
||||
/pkg/modules/ @grafana/grafana-app-platform-squad
|
||||
/pkg/services/grpcserver/ @grafana/grafana-search-and-storage
|
||||
/pkg/kindsysreport/ @grafana/grafana-app-platform-squad
|
||||
/pkg/services/grpcserver/ @grafana/grafana-app-platform-squad
|
||||
/pkg/generated @grafana/grafana-app-platform-squad
|
||||
/pkg/services/unifiedSearch/ @grafana/grafana-search-and-storage
|
||||
|
||||
# Alerting
|
||||
/pkg/services/ngalert/ @grafana/alerting-backend
|
||||
/pkg/services/sqlstore/migrations/ualert/ @grafana/alerting-backend
|
||||
/pkg/tests/api/alerting/ @grafana/alerting-backend
|
||||
/pkg/services/ngalert/ @grafana/alerting-backend-product
|
||||
/pkg/services/sqlstore/migrations/ualert/ @grafana/alerting-backend-product
|
||||
/pkg/services/alerting/ @grafana/alerting-backend-product
|
||||
/pkg/tests/api/alerting/ @grafana/alerting-backend-product
|
||||
/public/app/features/alerting/ @grafana/alerting-frontend
|
||||
/public/app/features/gops/ @grafana/alerting-frontend
|
||||
|
||||
# Library Services
|
||||
/pkg/services/libraryelements/ @grafana/dashboards-squad
|
||||
/pkg/services/librarypanels/ @grafana/dashboards-squad
|
||||
/pkg/services/libraryelements/ @grafana/grafana-frontend-platform
|
||||
/pkg/services/librarypanels/ @grafana/grafana-frontend-platform
|
||||
|
||||
# Plugins
|
||||
/pkg/api/pluginproxy/ @grafana/plugins-platform-backend
|
||||
@@ -319,7 +301,7 @@
|
||||
/pkg/services/plugindashboards/ @grafana/plugins-platform-backend
|
||||
|
||||
# Backend code docs
|
||||
/contribute/backend/ @grafana/grafana-backend-group
|
||||
/contribute/backend/ @grafana/backend-platform
|
||||
|
||||
|
||||
/crowdin.yml @grafana/grafana-frontend-platform
|
||||
@@ -327,57 +309,42 @@
|
||||
/public/app/core/internationalization/ @grafana/grafana-frontend-platform
|
||||
/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-e2e/ @grafana/grafana-frontend-platform
|
||||
/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
|
||||
@@ -394,6 +361,7 @@
|
||||
/.vim @zoltanbedi
|
||||
/jest.config.js @grafana/frontend-ops
|
||||
/latest.json @grafana/frontend-ops
|
||||
/metadata.md @grafana/plugins-platform
|
||||
/stylelint.config.js @grafana/frontend-ops
|
||||
/tools/ @grafana/frontend-ops
|
||||
/lefthook.yml @grafana/frontend-ops
|
||||
@@ -401,7 +369,7 @@
|
||||
/.husky/pre-commit @grafana/frontend-ops
|
||||
/cypress.config.js @grafana/grafana-frontend-platform
|
||||
/.levignore.js @grafana/plugins-platform-frontend
|
||||
playwright.config.ts @grafana/plugins-platform-frontend
|
||||
|
||||
|
||||
# public folder
|
||||
/public/app/core/ @grafana/grafana-frontend-platform
|
||||
@@ -410,31 +378,21 @@ playwright.config.ts @grafana/plugins-platform-frontend
|
||||
/public/app/core/components/GraphNG/ @grafana/dataviz-squad
|
||||
/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
|
||||
@@ -442,10 +400,9 @@ playwright.config.ts @grafana/plugins-platform-frontend
|
||||
/public/app/features/folders/ @grafana/grafana-frontend-platform
|
||||
/public/app/features/inspector/ @grafana/dashboards-squad
|
||||
/public/app/features/invites/ @grafana/grafana-frontend-platform
|
||||
/public/app/features/library-panels/ @grafana/dashboards-squad
|
||||
/public/app/features/library-panels/ @grafana/grafana-frontend-platform
|
||||
/public/app/features/logs/ @grafana/observability-logs
|
||||
/public/app/features/live/ @grafana/dashboards-squad
|
||||
/public/app/features/apiserver/ @grafana/grafana-app-platform-squad
|
||||
/public/app/features/live/ @grafana/grafana-app-platform-squad
|
||||
/public/app/features/manage-dashboards/ @grafana/dashboards-squad
|
||||
/public/app/features/notifications/ @grafana/grafana-frontend-platform
|
||||
/public/app/features/org/ @grafana/grafana-frontend-platform
|
||||
@@ -453,22 +410,21 @@ playwright.config.ts @grafana/plugins-platform-frontend
|
||||
/public/app/features/playlist/ @grafana/dashboards-squad
|
||||
/public/app/features/plugins/ @grafana/plugins-platform-frontend
|
||||
/public/app/features/profile/ @grafana/grafana-frontend-platform
|
||||
/public/app/features/query-library/ @grafana/explore-squad
|
||||
/public/app/features/runtime/ @ryantxu
|
||||
/public/app/features/query/ @grafana/dashboards-squad
|
||||
/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/alertGroups/ @grafana/alerting-frontend
|
||||
/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 +452,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
|
||||
@@ -507,7 +463,6 @@ playwright.config.ts @grafana/plugins-platform-frontend
|
||||
/public/app/store/ @grafana/grafana-frontend-platform
|
||||
/public/app/types/ @grafana/grafana-frontend-platform
|
||||
/public/app/types/alerting.ts @grafana/alerting-frontend
|
||||
/public/app/types/unified-alerting-dto.ts @grafana/alerting-frontend
|
||||
/public/dashboards/ @grafana/dashboards-squad
|
||||
/public/gazetteer/ @ryantxu
|
||||
/public/img/ @grafana/grafana-frontend-platform
|
||||
@@ -520,8 +475,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/backend-platform
|
||||
|
||||
/public/app/features/explore/Logs/ @grafana/observability-logs
|
||||
|
||||
@@ -531,9 +485,9 @@ playwright.config.ts @grafana/plugins-platform-frontend
|
||||
/public/app/features/explore/FlameGraph/ @grafana/observability-traces-and-profiling
|
||||
/public/app/features/explore/TraceView/ @grafana/observability-traces-and-profiling
|
||||
|
||||
/public/api-merged.json @grafana/grafana-backend-group
|
||||
/public/api-enterprise-spec.json @grafana/grafana-backend-group
|
||||
/public/openapi3.json @grafana/grafana-backend-group
|
||||
/public/api-merged.json @grafana/backend-platform
|
||||
/public/api-enterprise-spec.json @grafana/backend-platform
|
||||
/public/openapi3.json @grafana/backend-platform
|
||||
/public/app/angular/ @torkelo
|
||||
/public/app/app.ts @grafana/frontend-ops
|
||||
/public/app/dev.ts @grafana/frontend-ops
|
||||
@@ -545,7 +499,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
|
||||
@@ -569,13 +523,9 @@ playwright.config.ts @grafana/plugins-platform-frontend
|
||||
/scripts/cleanup-husky.sh @grafana/frontend-ops
|
||||
/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
|
||||
/scripts/docs/generate-transformations.ts @grafana/dataviz-squad
|
||||
/scripts/webpack/ @grafana/frontend-ops
|
||||
/scripts/generate-a11y-report.sh @grafana/grafana-frontend-platform
|
||||
.pa11yci.conf.js @grafana/grafana-frontend-platform
|
||||
@@ -593,75 +543,68 @@ 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
|
||||
/public/app/features/manage-dashboards/components/SnapshotListTable.tsx @grafana/sharing-squad
|
||||
/pkg/api/render.go @grafana/sharing-squad
|
||||
/pkg/services/dashboardsnapshots/ @grafana/sharing-squad
|
||||
/pkg/services/publicdashboards/ @grafana/sharing-squad
|
||||
/pkg/services/rendering/ @grafana/sharing-squad
|
||||
|
||||
# SSE - Server Side Expressions
|
||||
/pkg/expr/ @grafana/observability-metrics
|
||||
|
||||
# Cloud middleware
|
||||
/grafana-mixin/ @grafana/grafana-backend-services-squad
|
||||
/grafana-mixin/ @grafana/hosted-grafana-team
|
||||
|
||||
# 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
|
||||
|
||||
# Support bundles
|
||||
/public/app/features/support-bundles/ @grafana/identity-access-team
|
||||
/pkg/services/supportbundles/ @grafana/identity-access-team
|
||||
|
||||
# Grafana Operator Experience Team
|
||||
/pkg/infra/httpclient/httpclientprovider/sigv4_middleware.go @grafana/grafana-operator-experience-squad
|
||||
/pkg/infra/httpclient/httpclientprovider/sigv4_middleware_test.go @grafana/grafana-operator-experience-squad
|
||||
/pkg/services/caching/ @grafana/grafana-operator-experience-squad
|
||||
/pkg/services/cloudmigration/ @grafana/grafana-operator-experience-squad
|
||||
/pkg/services/gcom/ @grafana/grafana-operator-experience-squad
|
||||
|
||||
# Feature toggles
|
||||
/pkg/services/featuremgmt/ @grafana/grafana-backend-services-squad
|
||||
|
||||
/pkg/services/featuremgmt/ @grafana/grafana-operator-experience-squad
|
||||
/pkg/services/cloudmigrations/ @grafana/grafana-operator-experience-squad
|
||||
|
||||
# Kind definitions
|
||||
/kinds/dashboard @grafana/dashboards-squad
|
||||
@@ -670,20 +613,18 @@ playwright.config.ts @grafana/plugins-platform-frontend
|
||||
# Kind system and code generation
|
||||
embed.go @grafana/grafana-as-code
|
||||
/pkg/kinds/ @grafana/grafana-as-code
|
||||
/pkg/cuectx/ @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
|
||||
/pkg/registry/schemas/ @grafana/grafana-as-code
|
||||
/pkg/registry/corekind/ @grafana/grafana-as-code
|
||||
/public/app/plugins/*gen.go @grafana/grafana-as-code
|
||||
/cue.mod/ @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
|
||||
@@ -694,7 +635,7 @@ embed.go @grafana/grafana-as-code
|
||||
/.github/pr-commands.json @marefr
|
||||
/.github/renovate.json5 @grafana/frontend-ops
|
||||
/.github/teams.yml @armandgrillet
|
||||
/.github/workflows/alerting-swagger-gen.yml @grafana/alerting-backend
|
||||
/.github/workflows/alerting-swagger-gen.yml @grafana/alerting-backend-product
|
||||
/.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
|
||||
@@ -729,22 +670,20 @@ 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/feature-toggle-cleanup.yml @tolzhabayev
|
||||
/.github/workflows/scripts/feature-toggle-cleanup/feature-toggle-cleanup.js @tolzhabayev
|
||||
|
||||
# Generated files not requiring owner approval
|
||||
/packages/grafana-data/src/types/featureToggles.gen.ts @grafanabot
|
||||
@@ -756,10 +695,11 @@ 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/provisioning/alerting/ @grafana/alerting-backend
|
||||
/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-product
|
||||
/conf/provisioning/dashboards/ @grafana/dashboards-squad
|
||||
/conf/provisioning/datasources/ @grafana/plugins-platform-backend
|
||||
/conf/provisioning/notifiers/ @bergquist
|
||||
/conf/provisioning/plugins/ @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.
|
||||
|
||||
4
.github/bot.md
vendored
4
.github/bot.md
vendored
@@ -4,8 +4,8 @@ The bot is configured via [commands.json](https://github.com/grafana/grafana/blo
|
||||
|
||||
Comment commands:
|
||||
|
||||
* Write the word `/duplicate #<number>` anywhere in a comment and the bot will add the correct label and standard message.
|
||||
* Write the word `/needsMoreInfo` anywhere in a comment and the bot will add the correct label and standard message.
|
||||
* Write the word `/duplicate #<number>` anywhere in a comment and the bot will add the correct label and standard message.
|
||||
* Write the word `/needsMoreInfo` anywhere in a comment and the bot will add the correct label and standard message.
|
||||
|
||||
Label commands:
|
||||
|
||||
|
||||
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"
|
||||
}
|
||||
]
|
||||
]
|
||||
|
||||
409
.github/pr-commands.json
vendored
409
.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,378 @@
|
||||
},
|
||||
{
|
||||
"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/**/*"
|
||||
],
|
||||
"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"
|
||||
}
|
||||
}
|
||||
]
|
||||
]
|
||||
|
||||
8
.github/renovate.json5
vendored
8
.github/renovate.json5
vendored
@@ -4,20 +4,14 @@
|
||||
],
|
||||
"enabledManagers": ["npm"],
|
||||
"ignoreDeps": [
|
||||
"@types/history", // this can be removed entirely when we upgrade history since v5 exposes types directly
|
||||
"history", // we should bump this together with react-router-dom (see https://github.com/grafana/grafana/issues/76744)
|
||||
"react-router-dom", // we should bump this together with history (see https://github.com/grafana/grafana/issues/76744)
|
||||
"loader-utils", // v3 requires upstream changes in ngtemplate-loader. ignore, and remove when we remove angular.
|
||||
"monaco-editor", // due to us exposing this via @grafana/ui/CodeEditor's props bumping can break plugins
|
||||
"@fingerprintjs/fingerprintjs", // we don't want to bump to v4 due to licensing changes
|
||||
"@swc/core", // versions ~1.4.5 contain multiple bugs related to baseUrl resolution breaking builds.
|
||||
"slate", // we don't want to continue using this on the long run, use Monaco editor instead of Slate
|
||||
"slate-react", // we don't want to continue using this on the long run, use Monaco editor instead of Slate
|
||||
"@types/slate-react", // we don't want to continue using this on the long run, use Monaco editor instead of Slate
|
||||
"@types/slate" // we don't want to continue using this on the long run, use Monaco editor instead of Slate
|
||||
],
|
||||
"includePaths": ["package.json", "packages/**", "public/app/plugins/**"],
|
||||
"ignorePaths": ["emails/**", "plugins-bundled/**", "**/mocks/**"],
|
||||
"ignorePaths": ["emails/**", "plugins-bundled/**", "**/mocks/**", "packages/grafana-e2e/**"],
|
||||
"labels": ["area/frontend", "dependencies", "no-changelog"],
|
||||
"postUpdateOptions": ["yarnDedupeHighest"],
|
||||
"packageRules": [
|
||||
|
||||
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"
|
||||
}
|
||||
4
.github/workflows/alerting-swagger-gen.yml
vendored
4
.github/workflows/alerting-swagger-gen.yml
vendored
@@ -16,7 +16,7 @@ jobs:
|
||||
- name: Set go version
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
go-version: '1.21.10'
|
||||
- name: Build swagger
|
||||
run: |
|
||||
make -C pkg/services/ngalert/api/tooling post.json api.json
|
||||
@@ -32,6 +32,6 @@ jobs:
|
||||
branch: update-alerting-swagger-spec
|
||||
delete-branch: true
|
||||
labels: 'area/alerting,type/docs,no-changelog'
|
||||
team-reviewers: 'grafana/alerting-backend'
|
||||
team-reviewers: 'grafana/alerting-backend-product'
|
||||
draft: false
|
||||
|
||||
|
||||
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 }}
|
||||
|
||||
87
.github/workflows/bump-version.yml
vendored
87
.github/workflows/bump-version.yml
vendored
@@ -5,39 +5,74 @@ on:
|
||||
version:
|
||||
description: 'Needs to match, exactly, the name of a milestone. The version to be released please respect: major.minor.patch, major.minor.patch-preview or major.minor.patch-preview<number> format. example: 7.4.3, 7.4.3-preview or 7.4.3-preview1'
|
||||
required: true
|
||||
push:
|
||||
default: true
|
||||
required: false
|
||||
dry_run:
|
||||
default: false
|
||||
required: false
|
||||
env:
|
||||
YARN_ENABLE_IMMUTABLE_INSTALLS: false
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Grafana
|
||||
uses: actions/checkout@v4
|
||||
- name: Update package.json versions
|
||||
uses: ./pkg/build/actions/bump-version
|
||||
# This is a basic workflow to help you get started with Actions
|
||||
- uses: actions-ecosystem/action-regex-match@v2.0.2
|
||||
if: ${{ github.event.inputs.version != '' }}
|
||||
id: regex-match
|
||||
with:
|
||||
version: ${{ inputs.version }}
|
||||
- if: ${{ inputs.push }}
|
||||
name: Generate token
|
||||
text: ${{ github.event.inputs.version }}
|
||||
regex: '^(\d+.\d+).\d+(?:-(?:(preview\d?)|(pre)))?$'
|
||||
- uses: actions-ecosystem/action-regex-match@v2.0.2
|
||||
if: ${{ inputs.version_call != '' }}
|
||||
id: regex-match-version-call
|
||||
with:
|
||||
text: ${{ inputs.version_call }}
|
||||
regex: '^(\d+.\d+).\d+(?:-(?:(preview\d?)|(pre)))?$'
|
||||
- name: Validate input version
|
||||
if: ${{ steps.regex-match.outputs.match == '' && github.event.inputs.version != '' }}
|
||||
run: |
|
||||
echo "The input version format is not correct, please respect:\
|
||||
major.minor.patch, major.minor.patch-preview or major.minor.patch-preview<number> format. \
|
||||
example: 7.4.3, 7.4.3-preview or 7.4.3-preview1"
|
||||
exit 1
|
||||
- name: Validate input version call
|
||||
if: ${{ inputs.version_call != '' && steps.regex-match-version-call.outputs.match == '' }}
|
||||
run: |
|
||||
echo "The input version format is not correct, please respect:\
|
||||
major.minor.patch, major.minor.patch-preview or major.minor.patch-preview<number> format. \
|
||||
example: 7.4.3, 7.4.3-preview or 7.4.3-preview1"
|
||||
exit 1
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set intermedia variables
|
||||
id: intermedia
|
||||
run: |
|
||||
echo "short_ref=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
|
||||
echo "check_passed=false" >> $GITHUB_OUTPUT
|
||||
echo "branch_name=v${{steps.regex-match.outputs.group1}}" >> $GITHUB_OUTPUT
|
||||
echo "branch_exist=$(git ls-remote --heads https://github.com/grafana/grafana.git v${{ steps.regex-match.outputs.group1 }}.x | wc -l)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Checkout Actions
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: "grafana/grafana-github-actions"
|
||||
path: ./actions
|
||||
ref: main
|
||||
# Go is required for also updating the schema versions as part of the precommit hook:
|
||||
- uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: '1.21'
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '18'
|
||||
- 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 }}
|
||||
- if: ${{ inputs.push }}
|
||||
name: Push & Create PR
|
||||
run: |
|
||||
git config --local user.name "github-actions[bot]"
|
||||
git config --local user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git config --local --add --bool push.autoSetupRemote true
|
||||
git checkout -b "bump-version/${{ github.run_id }}/${{ inputs.version }}"
|
||||
git add .
|
||||
git commit -m "bump version ${{ inputs.version }}"
|
||||
git push
|
||||
gh pr create --dry-run=${{ inputs.dry_run }} -l "type/ci" -l "no-changelog" -B "${{ github.ref_name }}" --title "Release: Bump version to ${{ inputs.version }}" --body "Updated version to ${{ inputs.version }}"
|
||||
env:
|
||||
GH_TOKEN: ${{ steps.generate_token.outputs.token }}
|
||||
- name: Run bump version (manually invoked)
|
||||
uses: ./actions/bump-version
|
||||
with:
|
||||
token: ${{ steps.generate_token.outputs.token }}
|
||||
metricsWriteAPIKey: ${{ secrets.GRAFANA_MISC_STATS_API_KEY }}
|
||||
precommit_make_target: gen-cue
|
||||
|
||||
25
.github/workflows/changelog.yml
vendored
25
.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
|
||||
@@ -70,19 +62,11 @@ jobs:
|
||||
- name: "Checkout Grafana repo"
|
||||
uses: "actions/checkout@v4"
|
||||
with:
|
||||
ref: main
|
||||
sparse-checkout: |
|
||||
.github/workflows
|
||||
CHANGELOG.md
|
||||
.nvmrc
|
||||
.prettierignore
|
||||
.prettierrc.js
|
||||
fetch-depth: 0
|
||||
fetch-tags: true
|
||||
- name: Setup nodejs environment
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version-file: .nvmrc
|
||||
- name: "Configure git user"
|
||||
run: |
|
||||
git config --local user.name "github-actions[bot]"
|
||||
@@ -94,7 +78,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
|
||||
@@ -127,11 +110,9 @@ jobs:
|
||||
fi
|
||||
|
||||
git diff CHANGELOG.md
|
||||
|
||||
- name: "Prettify CHANGELOG.md"
|
||||
run: npx prettier --write CHANGELOG.md
|
||||
git add CHANGELOG.md
|
||||
- name: "Commit changelog changes"
|
||||
run: git add CHANGELOG.md && git commit --allow-empty -m "Update changelog" CHANGELOG.md
|
||||
run: git commit --allow-empty -m "Update changelog" CHANGELOG.md
|
||||
- name: "git push"
|
||||
if: ${{ inputs.dry_run }} != true
|
||||
run: git push
|
||||
@@ -142,7 +123,7 @@ jobs:
|
||||
--label "no-backport" \
|
||||
--label "no-changelog" \
|
||||
-B "${{ inputs.target }}" \
|
||||
--title "Release: update changelog for ${{ inputs.version }}" \
|
||||
--title "Release: ${{ inputs.version }}" \
|
||||
--body "Changelog changes for release ${{ inputs.version }}"
|
||||
env:
|
||||
GH_TOKEN: ${{ steps.generate_token.outputs.token }}
|
||||
|
||||
3
.github/workflows/codeql-analysis.yml
vendored
3
.github/workflows/codeql-analysis.yml
vendored
@@ -25,7 +25,6 @@ jobs:
|
||||
analyze:
|
||||
name: Analyze
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'grafana/grafana'
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
@@ -48,7 +47,7 @@ jobs:
|
||||
name: Set go version
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
go-version: '1.21.10'
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
|
||||
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
|
||||
|
||||
@@ -11,11 +11,9 @@ on:
|
||||
- grafana-azure-monitor-datasource
|
||||
- grafana-pyroscope-datasource
|
||||
- grafana-testdata-datasource
|
||||
- jaeger
|
||||
- parca
|
||||
- stackdriver
|
||||
- tempo
|
||||
- zipkin
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}-${{ inputs.plugin_id }}
|
||||
@@ -186,7 +184,7 @@ jobs:
|
||||
exit 1
|
||||
fi
|
||||
- name: store build artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: build-artifacts
|
||||
path: ${{ steps.get_dir.outputs.dir }}/ci/packages/*.zip
|
||||
|
||||
@@ -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)
|
||||
@@ -275,7 +253,7 @@ jobs:
|
||||
- name: Post to Slack
|
||||
id: slack
|
||||
if: steps.levitate-run.outputs.exit_code == 1 && steps.does-label-exist.outputs.result == 0 && env.HAS_SECRETS
|
||||
uses: slackapi/slack-github-action@v1.26.0
|
||||
uses: slackapi/slack-github-action@v1.24.0
|
||||
with:
|
||||
payload: |
|
||||
{
|
||||
@@ -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,9 +1,7 @@
|
||||
name: 'Ephemeral instances'
|
||||
name: 'Ephemeral instances: PR comment'
|
||||
on:
|
||||
issue_comment:
|
||||
types: [created]
|
||||
pull_request:
|
||||
types: [closed]
|
||||
jobs:
|
||||
config:
|
||||
runs-on: "ubuntu-latest"
|
||||
@@ -28,11 +26,18 @@ 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
|
||||
steps:
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: '>=1.20'
|
||||
|
||||
- name: Generate a GitHub app installation token
|
||||
id: generate_token
|
||||
uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92
|
||||
@@ -48,14 +53,21 @@ jobs:
|
||||
ref: main
|
||||
path: ephemeral
|
||||
|
||||
- name: build and deploy ephemeral instance
|
||||
uses: ./ephemeral
|
||||
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
|
||||
- name: Run action
|
||||
env:
|
||||
GITHUB_EVENT: ${{ toJson(github.event)}}
|
||||
run: |
|
||||
GRAFANA_VERSION=10.1.0
|
||||
|
||||
cd $GITHUB_WORKSPACE/ephemeral/src
|
||||
go run . \
|
||||
-GITHUB_TOKEN="${{ steps.generate_token.outputs.token }}" \
|
||||
-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
|
||||
|
||||
69
.github/workflows/ephemeral-instances-pr-opened-closed.yml
vendored
Normal file
69
.github/workflows/ephemeral-instances-pr-opened-closed.yml
vendored
Normal file
@@ -0,0 +1,69 @@
|
||||
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: Setup Go
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: '>=1.20'
|
||||
|
||||
- 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: Run action
|
||||
env:
|
||||
GITHUB_EVENT: ${{ toJson(github.event)}}
|
||||
run: |
|
||||
GRAFANA_VERSION=10.1.0
|
||||
|
||||
cd $GITHUB_WORKSPACE/ephemeral/src
|
||||
go run . \
|
||||
-GITHUB_TOKEN="${{ steps.generate_token.outputs.token }}" \
|
||||
-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
|
||||
28
.github/workflows/feature-toggle-cleanup.yml
vendored
Normal file
28
.github/workflows/feature-toggle-cleanup.yml
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
name: Feature Toggle Cleanup
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
# * is a special character in YAML so you have to quote this string
|
||||
- cron: '30 10 * * *'
|
||||
jobs:
|
||||
feature-toggle-cleanup:
|
||||
runs-on: ubuntu-latest
|
||||
# This check is here to prevent this workflow from running on forks.
|
||||
if: github.repository == 'grafana/grafana'
|
||||
steps:
|
||||
- name: Check out the code
|
||||
uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "20.x"
|
||||
- run: npm install csv-parse
|
||||
- name: Parse CVS file to see which Feature Toggles should be notified about
|
||||
id: parse-csv-file
|
||||
uses: actions/github-script@v7
|
||||
env:
|
||||
FEATURE_TOGGLES_CSV_FILE_PATH: "pkg/services/featuremgmt/toggles_gen.csv"
|
||||
with:
|
||||
script: |
|
||||
const { default: cleanupFeatureFlags } = await import('${{ github.workspace }}/.github/workflows/scripts/feature-toggle-cleanup/feature-toggle-cleanup.mjs')
|
||||
await cleanupFeatureFlags({github, context, core})
|
||||
32
.github/workflows/go_lint.yml
vendored
32
.github/workflows/go_lint.yml
vendored
@@ -1,32 +0,0 @@
|
||||
name: golangci-lint
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- pkg/**
|
||||
- .github/workflows/go_lint.yml
|
||||
- go.*
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
lint-go:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- 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
|
||||
with:
|
||||
version: v1.60.1
|
||||
args: |
|
||||
--config .golangci.toml --max-same-issues=0 --max-issues-per-linter=0 --verbose $(./scripts/go-workspace/golangci-lint-includes.sh)
|
||||
skip-cache: true
|
||||
install-mode: binary
|
||||
30
.github/workflows/i18n-crowdin-download.yml
vendored
30
.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,12 +110,6 @@ jobs:
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
|
||||
|
||||
- name: Run auto-milestone
|
||||
uses: grafana/grafana-github-actions-go/auto-milestone@main
|
||||
if: steps.crowdin-download.outputs.pull_request_url
|
||||
with:
|
||||
pr: ${{ steps.crowdin-download.outputs.pull_request_number }}
|
||||
token: ${{ steps.generate_token.outputs.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'
|
||||
|
||||
20
.github/workflows/issue-labeled.yml
vendored
20
.github/workflows/issue-labeled.yml
vendored
@@ -49,11 +49,11 @@ 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
|
||||
uses: frabert/replace-string-action@v2.0
|
||||
id: preparePayload
|
||||
with:
|
||||
# replace double quotes with single quotes to avoid breaking the JSON payload sent to Slack
|
||||
@@ -64,29 +64,29 @@ jobs:
|
||||
|
||||
- name: Get Token
|
||||
id: get_workflow_token
|
||||
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a
|
||||
uses: peter-murray/workflow-application-token-action@v2
|
||||
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 }}
|
||||
|
||||
- name: "Send Slack notification"
|
||||
if: ${{ (env.CHANNEL != 'null') && ((env.USER_FOUND == 'false') || (env.TEAM != 'null')) }}
|
||||
uses: slackapi/slack-github-action@v1.26.0
|
||||
uses: slackapi/slack-github-action@v1.24.0
|
||||
with:
|
||||
payload: >
|
||||
{
|
||||
|
||||
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 }}
|
||||
|
||||
1
.github/workflows/pr-checks.yml
vendored
1
.github/workflows/pr-checks.yml
vendored
@@ -9,7 +9,6 @@ on:
|
||||
- labeled
|
||||
- unlabeled
|
||||
- edited
|
||||
- auto_merge_enabled
|
||||
issues:
|
||||
types:
|
||||
- milestoned
|
||||
|
||||
3
.github/workflows/pr-codeql-analysis-go.yml
vendored
3
.github/workflows/pr-codeql-analysis-go.yml
vendored
@@ -14,7 +14,6 @@ jobs:
|
||||
analyze:
|
||||
name: Analyze
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'grafana/grafana'
|
||||
|
||||
steps:
|
||||
- name: "Generate token"
|
||||
@@ -36,7 +35,7 @@ jobs:
|
||||
- name: Set go version
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
go-version: '1.21.10'
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
|
||||
@@ -16,7 +16,6 @@ jobs:
|
||||
analyze:
|
||||
name: Analyze
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'grafana/grafana'
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
|
||||
@@ -14,7 +14,6 @@ jobs:
|
||||
analyze:
|
||||
name: Analyze
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'grafana/grafana'
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
|
||||
35
.github/workflows/pr-go-workspace-check.yml
vendored
35
.github/workflows/pr-go-workspace-check.yml
vendored
@@ -1,35 +0,0 @@
|
||||
name: "Go Workspace Check"
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
pull_request:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
check:
|
||||
name: Go Workspace 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 workspace
|
||||
run: make update-workspace
|
||||
|
||||
- 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 "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
|
||||
49
.github/workflows/pr-patch-check-event.yml
vendored
49
.github/workflows/pr-patch-check-event.yml
vendored
@@ -1,49 +0,0 @@
|
||||
# Owned by grafana-delivery-squad
|
||||
# Intended to be dropped into the base repo Ex: grafana/grafana
|
||||
name: Dispatch check for patch conflicts
|
||||
run-name: dispatch-check-patch-conflicts-${{ github.base_ref }}-${{ github.head_ref }}
|
||||
on:
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
- reopened
|
||||
- synchronize
|
||||
branches:
|
||||
- "main"
|
||||
- "v*.*.*"
|
||||
- "release-*"
|
||||
|
||||
# Since this is run on a pull request, we want to apply the patches intended for the
|
||||
# target branch onto the source branch, to verify compatibility before merging.
|
||||
jobs:
|
||||
dispatch-job:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: "Generate token"
|
||||
id: generate_token
|
||||
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a
|
||||
with:
|
||||
# App needs Actions: Read/Write for the grafana/security-patch-actions repo
|
||||
app_id: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_ID }}
|
||||
private_key: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_PEM }}
|
||||
|
||||
- name: "Dispatch job"
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
github-token: ${{ steps.generate_token.outputs.token }}
|
||||
script: |
|
||||
await github.rest.actions.createWorkflowDispatch({
|
||||
owner: 'grafana',
|
||||
repo: 'security-patch-actions',
|
||||
workflow_id: 'test-patches-event.yml',
|
||||
ref: 'main',
|
||||
inputs: {
|
||||
src_repo: "${{ github.repository }}",
|
||||
src_ref: "${{ github.head_ref }}",
|
||||
src_merge_sha: "${{ github.sha }}",
|
||||
src_pr_commit_sha: "${{ github.event.pull_request.head.sha }}",
|
||||
patch_repo: "${{ github.repository }}-security-patches",
|
||||
patch_ref: "${{ github.base_ref }}",
|
||||
triggering_github_handle: "${{ github.event.sender.login }}"
|
||||
}
|
||||
})
|
||||
26
.github/workflows/pr-patch-check.yml
vendored
Normal file
26
.github/workflows/pr-patch-check.yml
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
# Owned by grafana-release-guild
|
||||
# Intended to be dropped into the base repo Ex: grafana/grafana
|
||||
name: Check for patch conflicts
|
||||
run-name: check-patch-conflicts-${{ github.base_ref }}-${{ github.head_ref }}
|
||||
on:
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
- reopened
|
||||
- synchronize
|
||||
branches:
|
||||
- "main"
|
||||
- "v*.*.*"
|
||||
- "release-*"
|
||||
|
||||
# Since this is run on a pull request, we want to apply the patches intended for the
|
||||
# target branch onto the source branch, to verify compatibility before merging.
|
||||
jobs:
|
||||
trigger_downstream_patch_check:
|
||||
uses: grafana/security-patch-actions/.github/workflows/test-patches.yml@main
|
||||
with:
|
||||
src_repo: "${{ github.repository }}"
|
||||
src_ref: "${{ github.head_ref }}" # this is the source branch name, Ex: "feature/newthing"
|
||||
patch_repo: "${{ github.repository }}-security-patches"
|
||||
patch_ref: "${{ github.base_ref }}" # this is the target branch name, Ex: "main"
|
||||
secrets: inherit
|
||||
2
.github/workflows/publish-kinds-next.yml
vendored
2
.github/workflows/publish-kinds-next.yml
vendored
@@ -36,7 +36,7 @@ jobs:
|
||||
- name: "Setup Go"
|
||||
uses: "actions/setup-go@v4"
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
go-version: '1.21.10'
|
||||
|
||||
- name: "Verify kinds"
|
||||
run: go run .github/workflows/scripts/kinds/verify-kinds.go
|
||||
|
||||
2
.github/workflows/publish-kinds-release.yml
vendored
2
.github/workflows/publish-kinds-release.yml
vendored
@@ -39,7 +39,7 @@ jobs:
|
||||
- name: "Setup Go"
|
||||
uses: "actions/setup-go@v4"
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
go-version: '1.21.10'
|
||||
|
||||
- name: "Verify kinds"
|
||||
run: go run .github/workflows/scripts/kinds/verify-kinds.go
|
||||
|
||||
@@ -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,4 +1,4 @@
|
||||
name: publish-technical-documentation-release
|
||||
name: "publish-technical-documentation-release"
|
||||
|
||||
on:
|
||||
push:
|
||||
@@ -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/v1
|
||||
|
||||
- name: "Checkout Actions library"
|
||||
uses: "actions/checkout@v4"
|
||||
with:
|
||||
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$"
|
||||
release_branch_with_patch_regexp: "^v(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)$"
|
||||
website_directory: content/docs/grafana
|
||||
version_suffix: ""
|
||||
|
||||
- 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 }}"
|
||||
|
||||
36
.github/workflows/release-pr.yml
vendored
36
.github/workflows/release-pr.yml
vendored
@@ -8,10 +8,6 @@ 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
|
||||
@@ -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 }}
|
||||
@@ -64,20 +59,9 @@ jobs:
|
||||
- name: Checkout Grafana
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ inputs.target }}
|
||||
fetch-depth: 0
|
||||
fetch-tags: true
|
||||
- name: Checkout Grafana (main)
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: main
|
||||
fetch-depth: '0'
|
||||
fetch-tags: 'false'
|
||||
path: .grafana-main
|
||||
- name: Setup nodejs environment
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version-file: .nvmrc
|
||||
|
||||
- name: Configure git user
|
||||
run: |
|
||||
git config --local user.name "github-actions[bot]"
|
||||
@@ -86,13 +70,15 @@ jobs:
|
||||
|
||||
- name: Create branch
|
||||
run: git checkout -b "release/${{ github.run_id }}/${{ inputs.version }}"
|
||||
|
||||
- name: Generate changelog
|
||||
id: changelog
|
||||
uses: ./.grafana-main/.github/workflows/actions/changelog
|
||||
uses: ./.github/workflows/actions/changelog
|
||||
with:
|
||||
github_token: ${{ steps.generate_token.outputs.token }}
|
||||
target: v${{ inputs.version }}
|
||||
output_file: changelog_items.md
|
||||
|
||||
- name: Patch CHANGELOG.md
|
||||
run: |
|
||||
# Prepare CHANGELOG.md content with version delimiters
|
||||
@@ -124,20 +110,18 @@ 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
|
||||
run: git add CHANGELOG.md && git commit --allow-empty -m "Update changelog" CHANGELOG.md
|
||||
run: git commit --allow-empty -m "Update changelog placeholder" CHANGELOG.md
|
||||
|
||||
- name: Update package.json versions
|
||||
uses: ./.grafana-main/pkg/build/actions/bump-version
|
||||
uses: ./pkg/build/actions/bump-version
|
||||
with:
|
||||
version: 'patch'
|
||||
version: ${{ inputs.version }}
|
||||
|
||||
- name: Add package.json changes
|
||||
run: |
|
||||
git add package.json lerna.json yarn.lock packages public
|
||||
git add .
|
||||
git commit -m "Update version to ${{ inputs.version }}"
|
||||
|
||||
- name: Git push
|
||||
@@ -149,7 +133,6 @@ jobs:
|
||||
run: >
|
||||
gh pr create \
|
||||
$( [ "x${{ inputs.latest }}" == "xtrue" ] && printf %s '-l "release/latest"') \
|
||||
-l "no-changelog" \
|
||||
--dry-run=${{ inputs.dry_run }} \
|
||||
-B "${{ inputs.target }}" \
|
||||
--title "Release: ${{ inputs.version }}" \
|
||||
@@ -163,7 +146,6 @@ jobs:
|
||||
gh pr create \
|
||||
$( [ "x${{ inputs.latest }}" == "xtrue" ] && printf %s '-l "release/latest"') \
|
||||
-l "product-approved" \
|
||||
-l "no-changelog" \
|
||||
--dry-run=${{ inputs.dry_run }} \
|
||||
-B "${{ inputs.target }}" \
|
||||
--title "Release: ${{ inputs.version }}" \
|
||||
|
||||
38
.github/workflows/scripts/feature-toggle-cleanup/feature-toggle-cleanup.js
vendored
Normal file
38
.github/workflows/scripts/feature-toggle-cleanup/feature-toggle-cleanup.js
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
import { parse } from 'csv-parse/sync';
|
||||
import fs from 'fs';
|
||||
|
||||
/***
|
||||
* Feauture Flag Structure example
|
||||
* Name: 'disableEnvelopeEncryption',
|
||||
Stage: 'GA',
|
||||
Owner: '@grafana/grafana-as-code',
|
||||
Created: '2022-05-24',
|
||||
requiresDevMode: 'false',
|
||||
RequiresLicense: 'false',
|
||||
RequiresRestart: 'false',
|
||||
FrontendOnly: 'false'
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
export default function cleanupFeatureFlags() {
|
||||
const today = new Date();
|
||||
const sixMonthAgo = today.setMonth(today.getMonth() - 6);
|
||||
const inputFileContents = fs.readFileSync(process.env.FEATURE_TOGGLES_CSV_FILE_PATH);
|
||||
const parsedFeatureFlags = parse(inputFileContents, {
|
||||
columns: true,
|
||||
skip_empty_lines: true,
|
||||
cast: true,
|
||||
cast_date: true,
|
||||
});
|
||||
|
||||
// Here we can have the custom logic of how to handle what type of feature flag - e.g. GA can be treated differently than experimental and so on.
|
||||
for (const flag of parsedFeatureFlags) {
|
||||
if (flag.Created < sixMonthAgo) {
|
||||
console.log(`The flag ${flag.Name} was created more than 6 months ago. It should be checked.`);
|
||||
console.log(flag);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
421
.github/workflows/scripts/kinds/verify-kinds.go
vendored
421
.github/workflows/scripts/kinds/verify-kinds.go
vendored
@@ -1,53 +1,116 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"archive/zip"
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"golang.org/x/text/cases"
|
||||
"golang.org/x/text/language"
|
||||
"io"
|
||||
"net/http"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"regexp"
|
||||
"strconv"
|
||||
"strings"
|
||||
"testing/fstest"
|
||||
|
||||
"cuelang.org/go/cue"
|
||||
cueformat "cuelang.org/go/cue/format"
|
||||
"github.com/google/go-github/github"
|
||||
"github.com/grafana/codejen"
|
||||
"github.com/grafana/grafana/pkg/registry/schemas"
|
||||
"github.com/grafana/grafana/pkg/codegen"
|
||||
"github.com/grafana/grafana/pkg/cuectx"
|
||||
"github.com/grafana/grafana/pkg/plugins/pfs"
|
||||
"github.com/grafana/grafana/pkg/plugins/pfs/corelist"
|
||||
"github.com/grafana/grafana/pkg/registry/corekind"
|
||||
"github.com/grafana/kindsys"
|
||||
"github.com/grafana/thema"
|
||||
"golang.org/x/oauth2"
|
||||
)
|
||||
|
||||
var nonAlphaNumRegex = regexp.MustCompile("[^a-zA-Z0-9 ]+")
|
||||
const (
|
||||
GITHUB_OWNER = "grafana"
|
||||
GITHUB_REPO = "kind-registry"
|
||||
)
|
||||
|
||||
// main This script verifies that stable kinds are not updated once published (new schemas
|
||||
// can be added but existing ones cannot be updated).
|
||||
// It generates kind files into a local "next" folder, ready to be published in the kind-registry repo.
|
||||
// If the env variable CODEGEN_VERIFY is not present, this also generates kind files into a
|
||||
// local "next" folder, ready to be published in the kind-registry repo.
|
||||
// If kind names are given as parameters, the script will make the above actions only for the
|
||||
// given kinds.
|
||||
func main() {
|
||||
var corek []kindsys.Kind
|
||||
var compok []kindsys.Composable
|
||||
|
||||
kindRegistry, err := NewKindRegistry()
|
||||
defer kindRegistry.cleanUp()
|
||||
if err != nil {
|
||||
die(err)
|
||||
}
|
||||
|
||||
// Search for the latest version directory present in the kind-registry repo
|
||||
latestRegistryDir, err := kindRegistry.findLatestDir()
|
||||
if err != nil {
|
||||
die(fmt.Errorf("failed to get latest directory for published kinds: %s", err))
|
||||
}
|
||||
|
||||
errs := make([]error, 0)
|
||||
|
||||
// Kind verification
|
||||
for _, kind := range corekind.NewBase(nil).All() {
|
||||
name := kind.Props().Common().MachineName
|
||||
err := verifyKind(kindRegistry, kind, name, "core", latestRegistryDir)
|
||||
if err != nil {
|
||||
errs = append(errs, err)
|
||||
continue
|
||||
}
|
||||
|
||||
corek = append(corek, kind)
|
||||
}
|
||||
|
||||
for _, pp := range corelist.New(nil) {
|
||||
for _, kind := range pp.ComposableKinds {
|
||||
si, err := kindsys.FindSchemaInterface(kind.Def().Properties.SchemaInterface)
|
||||
if err != nil {
|
||||
errs = append(errs, err)
|
||||
continue
|
||||
}
|
||||
|
||||
name := strings.ToLower(fmt.Sprintf("%s/%s", strings.TrimSuffix(kind.Lineage().Name(), si.Name()), si.Name()))
|
||||
err = verifyKind(kindRegistry, kind, name, "composable", latestRegistryDir)
|
||||
if err != nil {
|
||||
errs = append(errs, err)
|
||||
continue
|
||||
}
|
||||
|
||||
compok = append(compok, kind)
|
||||
}
|
||||
}
|
||||
|
||||
die(errs...)
|
||||
|
||||
if _, set := os.LookupEnv("CODEGEN_VERIFY"); set {
|
||||
os.Exit(0)
|
||||
}
|
||||
|
||||
// File generation
|
||||
jfs := codejen.NewFS()
|
||||
outputPath := filepath.Join(".github", "workflows", "scripts", "kinds")
|
||||
|
||||
corekinds, err := schemas.GetCoreKinds()
|
||||
die(err)
|
||||
|
||||
composableKinds, err := schemas.GetComposableKinds()
|
||||
die(err)
|
||||
|
||||
coreJennies := codejen.JennyList[schemas.CoreKind]{}
|
||||
coreJennies := codejen.JennyList[kindsys.Kind]{}
|
||||
coreJennies.Append(
|
||||
CoreKindRegistryJenny(outputPath),
|
||||
KindRegistryJenny(outputPath),
|
||||
)
|
||||
corefs, err := coreJennies.GenerateFS(corekinds...)
|
||||
corefs, err := coreJennies.GenerateFS(corek...)
|
||||
die(err)
|
||||
die(jfs.Merge(corefs))
|
||||
|
||||
composableJennies := codejen.JennyList[schemas.ComposableKind]{}
|
||||
composableJennies := codejen.JennyList[kindsys.Composable]{}
|
||||
composableJennies.Append(
|
||||
ComposableKindRegistryJenny(outputPath),
|
||||
)
|
||||
composablefs, err := composableJennies.GenerateFS(composableKinds...)
|
||||
composablefs, err := composableJennies.GenerateFS(compok...)
|
||||
die(err)
|
||||
die(jfs.Merge(composablefs))
|
||||
|
||||
@@ -117,8 +180,101 @@ func die(errs ...error) {
|
||||
}
|
||||
}
|
||||
|
||||
// CoreKindRegistryJenny generates kind files into the "next" folder of the local kind registry.
|
||||
func CoreKindRegistryJenny(path string) codejen.OneToOne[schemas.CoreKind] {
|
||||
// verifyKind verifies that stable kinds are not updated once published (new schemas
|
||||
// can be added but existing ones cannot be updated)
|
||||
func verifyKind(registry *kindRegistry, kind kindsys.Kind, name string, category string, latestRegistryDir string) error {
|
||||
oldKindString, err := registry.getPublishedKind(name, category, latestRegistryDir)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
var oldKind kindsys.Kind
|
||||
if oldKindString != "" {
|
||||
switch category {
|
||||
case "core":
|
||||
oldKind, err = loadCoreKind(name, oldKindString)
|
||||
case "composable":
|
||||
oldKind, err = loadComposableKind(name, oldKindString)
|
||||
default:
|
||||
return fmt.Errorf("kind can only be core or composable")
|
||||
}
|
||||
}
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// Kind is new - no need to compare it
|
||||
if oldKind == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Check that maturity isn't downgraded
|
||||
if kind.Maturity().Less(oldKind.Maturity()) {
|
||||
return fmt.Errorf("kind maturity can't be downgraded once a kind is published")
|
||||
}
|
||||
|
||||
if oldKind.Maturity().Less(kindsys.MaturityStable) {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Check that old schemas do not contain updates
|
||||
err = thema.IsAppendOnly(oldKind.Lineage(), kind.Lineage())
|
||||
if err != nil {
|
||||
return fmt.Errorf("existing schemas in lineage %s cannot be modified: %w", name, err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func isLess(v1 []uint64, v2 []uint64) bool {
|
||||
if len(v1) == 1 || len(v2) == 1 {
|
||||
return v1[0] < v2[0]
|
||||
}
|
||||
|
||||
return v1[0] < v2[0] || (v1[0] == v2[0] && isLess(v1[2:], v2[2:]))
|
||||
}
|
||||
|
||||
func loadCoreKind(name string, kind string) (kindsys.Kind, error) {
|
||||
fs := fstest.MapFS{
|
||||
fmt.Sprintf("%s.cue", name): &fstest.MapFile{
|
||||
Data: []byte(kind),
|
||||
},
|
||||
}
|
||||
|
||||
rt := cuectx.GrafanaThemaRuntime()
|
||||
|
||||
def, err := cuectx.LoadCoreKindDef(fmt.Sprintf("%s.cue", name), rt.Context(), fs)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("%s is not a valid kind: %w", name, err)
|
||||
}
|
||||
|
||||
return kindsys.BindCore(rt, def)
|
||||
}
|
||||
|
||||
func loadComposableKind(name string, kind string) (kindsys.Kind, error) {
|
||||
parts := strings.Split(name, "/")
|
||||
if len(parts) > 1 {
|
||||
name = parts[1]
|
||||
}
|
||||
|
||||
fs := fstest.MapFS{
|
||||
fmt.Sprintf("%s.cue", name): &fstest.MapFile{
|
||||
Data: []byte(kind),
|
||||
},
|
||||
}
|
||||
|
||||
rt := cuectx.GrafanaThemaRuntime()
|
||||
|
||||
def, err := pfs.LoadComposableKindDef(fs, rt, fmt.Sprintf("%s.cue", name))
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("%s is not a valid kind: %w", name, err)
|
||||
}
|
||||
|
||||
return kindsys.BindComposable(rt, def)
|
||||
}
|
||||
|
||||
// KindRegistryJenny generates kind files into the "next" folder of the local kind registry.
|
||||
func KindRegistryJenny(path string) codegen.OneToOne {
|
||||
return &kindregjenny{
|
||||
path: path,
|
||||
}
|
||||
@@ -132,46 +288,22 @@ func (j *kindregjenny) JennyName() string {
|
||||
return "KindRegistryJenny"
|
||||
}
|
||||
|
||||
func (j *kindregjenny) Generate(kind schemas.CoreKind) (*codejen.File, error) {
|
||||
newKindBytes, err := kindToBytes(kind.CueFile)
|
||||
func (j *kindregjenny) Generate(kind kindsys.Kind) (*codejen.File, error) {
|
||||
name := kind.Props().Common().MachineName
|
||||
core, ok := kind.(kindsys.Core)
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("kind sent to KindRegistryJenny must be a core kind")
|
||||
}
|
||||
|
||||
newKindBytes, err := kindToBytes(core.Def().V)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
path := filepath.Join(j.path, "next", "core", kind.Name, kind.Name+".cue")
|
||||
path := filepath.Join(j.path, "next", "core", name, name+".cue")
|
||||
return codejen.NewFile(path, newKindBytes, j), nil
|
||||
}
|
||||
|
||||
// ComposableKindRegistryJenny generates kind files into the "next" folder of the local kind registry.
|
||||
func ComposableKindRegistryJenny(path string) codejen.OneToOne[schemas.ComposableKind] {
|
||||
return &ckrJenny{
|
||||
path: path,
|
||||
}
|
||||
}
|
||||
|
||||
type ckrJenny struct {
|
||||
path string
|
||||
}
|
||||
|
||||
func (j *ckrJenny) JennyName() string {
|
||||
return "ComposableKindRegistryJenny"
|
||||
}
|
||||
|
||||
func (j *ckrJenny) Generate(k schemas.ComposableKind) (*codejen.File, error) {
|
||||
name := strings.ToLower(fmt.Sprintf("%s/%s", k.Name, k.Filename))
|
||||
|
||||
v := fixComposableKindFormat(k)
|
||||
|
||||
newKindBytes, err := kindToBytes(v)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
newKindBytes = []byte(fmt.Sprintf("package grafanaplugin\n\n%s", newKindBytes))
|
||||
|
||||
return codejen.NewFile(filepath.Join(j.path, "next", "composable", name), newKindBytes, j), nil
|
||||
}
|
||||
|
||||
// kindToBytes converts a kind cue value to a .cue file content
|
||||
func kindToBytes(kind cue.Value) ([]byte, error) {
|
||||
node := kind.Syntax(
|
||||
@@ -183,47 +315,164 @@ func kindToBytes(kind cue.Value) ([]byte, error) {
|
||||
return cueformat.Node(node)
|
||||
}
|
||||
|
||||
func fixComposableKindFormat(schema schemas.ComposableKind) cue.Value {
|
||||
variant := "PanelCfg"
|
||||
if schema.CueFile.LookupPath(cue.ParsePath("composableKinds.DataQuery")).Exists() {
|
||||
variant = "DataQuery"
|
||||
// ComposableKindRegistryJenny generates kind files into the "next" folder of the local kind registry.
|
||||
func ComposableKindRegistryJenny(path string) codejen.OneToOne[kindsys.Composable] {
|
||||
return &ckrJenny{
|
||||
path: path,
|
||||
}
|
||||
|
||||
newCue := schema.CueFile.Context().CompileString(
|
||||
fmt.Sprintf("schemaInterface: %q\n", variant) +
|
||||
fmt.Sprintf("name: %q + %q\n\n", UpperCamelCase(schema.Name), variant) +
|
||||
"lineage: _",
|
||||
)
|
||||
|
||||
lineagePath := cue.MakePath(cue.Str("composableKinds"), cue.Str(variant), cue.Str("lineage"))
|
||||
return newCue.FillPath(cue.MakePath(cue.Str("lineage")), schema.CueFile.LookupPath(lineagePath))
|
||||
}
|
||||
|
||||
func UpperCamelCase(s string) string {
|
||||
s = LowerCamelCase(s)
|
||||
|
||||
// Uppercase the first letter
|
||||
if len(s) > 0 {
|
||||
s = strings.ToUpper(s[:1]) + s[1:]
|
||||
}
|
||||
|
||||
return s
|
||||
type ckrJenny struct {
|
||||
path string
|
||||
}
|
||||
|
||||
func LowerCamelCase(s string) string {
|
||||
// Replace all non-alphanumeric characters by spaces
|
||||
s = nonAlphaNumRegex.ReplaceAllString(s, " ")
|
||||
func (j *ckrJenny) JennyName() string {
|
||||
return "ComposableKindRegistryJenny"
|
||||
}
|
||||
|
||||
// Title case s
|
||||
s = cases.Title(language.AmericanEnglish, cases.NoLower).String(s)
|
||||
|
||||
// Remove all spaces
|
||||
s = strings.ReplaceAll(s, " ", "")
|
||||
|
||||
// Lowercase the first letter
|
||||
if len(s) > 0 {
|
||||
s = strings.ToLower(s[:1]) + s[1:]
|
||||
func (j *ckrJenny) Generate(k kindsys.Composable) (*codejen.File, error) {
|
||||
si, err := kindsys.FindSchemaInterface(k.Def().Properties.SchemaInterface)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
return s
|
||||
name := strings.ToLower(fmt.Sprintf("%s/%s", strings.TrimSuffix(k.Lineage().Name(), si.Name()), si.Name()))
|
||||
|
||||
newKindBytes, err := kindToBytes(k.Def().V)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
newKindBytes = []byte(fmt.Sprintf("package grafanaplugin\n\n%s", newKindBytes))
|
||||
|
||||
return codejen.NewFile(filepath.Join(j.path, "next", "composable", name+".cue"), newKindBytes, j), nil
|
||||
}
|
||||
|
||||
type kindRegistry struct {
|
||||
zipDir string
|
||||
zipFile *zip.ReadCloser
|
||||
}
|
||||
|
||||
// NewKindRegistry downloads the archive of the kind-registry GH repository and open it
|
||||
func NewKindRegistry() (*kindRegistry, error) {
|
||||
ctx := context.Background()
|
||||
tc := oauth2.NewClient(ctx, nil)
|
||||
client := github.NewClient(tc)
|
||||
|
||||
// Create a temporary file to store the downloaded archive
|
||||
file, err := os.CreateTemp("", "*.zip")
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to create temporary file: %w", err)
|
||||
}
|
||||
defer file.Close()
|
||||
|
||||
// Get the repository archive URL
|
||||
archiveURL, _, err := client.Repositories.GetArchiveLink(ctx, GITHUB_OWNER, GITHUB_REPO, github.Zipball, &github.RepositoryContentGetOptions{})
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to get archive URL: %w", err)
|
||||
}
|
||||
|
||||
// Download the archive file
|
||||
httpClient := http.DefaultClient
|
||||
resp, err := httpClient.Get(archiveURL.String())
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to download archive: %w", err)
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
|
||||
// Save the downloaded archive to the temporary file
|
||||
_, err = io.Copy(file, resp.Body)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to save archive: %w", err)
|
||||
}
|
||||
|
||||
// Open the zip file for reading
|
||||
zipDir := file.Name()
|
||||
zipFile, err := zip.OpenReader(zipDir)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to open zip file %s: %w", zipDir, err)
|
||||
}
|
||||
|
||||
return &kindRegistry{
|
||||
zipDir: zipDir,
|
||||
zipFile: zipFile,
|
||||
}, nil
|
||||
}
|
||||
|
||||
// cleanUp removes the archive from the temporary files and closes the zip reader
|
||||
func (registry *kindRegistry) cleanUp() {
|
||||
if registry.zipDir != "" {
|
||||
err := os.Remove(registry.zipDir)
|
||||
if err != nil {
|
||||
fmt.Fprint(os.Stderr, fmt.Errorf("failed to remove zip archive: %w", err))
|
||||
}
|
||||
}
|
||||
|
||||
if registry.zipFile != nil {
|
||||
err := registry.zipFile.Close()
|
||||
if err != nil {
|
||||
fmt.Fprint(os.Stderr, fmt.Errorf("failed to close zip file reader: %w", err))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// findLatestDir get the latest version directory published in the kind registry
|
||||
func (registry *kindRegistry) findLatestDir() (string, error) {
|
||||
re := regexp.MustCompile(`([0-9]+)\.([0-9]+)\.([0-9]+)`)
|
||||
latestVersion := []uint64{0, 0, 0}
|
||||
latestDir := ""
|
||||
|
||||
for _, file := range registry.zipFile.File {
|
||||
if !file.FileInfo().IsDir() {
|
||||
continue
|
||||
}
|
||||
|
||||
parts := re.FindStringSubmatch(file.Name)
|
||||
if parts == nil || len(parts) < 4 {
|
||||
continue
|
||||
}
|
||||
|
||||
version := make([]uint64, len(parts)-1)
|
||||
for i := 1; i < len(parts); i++ {
|
||||
version[i-1], _ = strconv.ParseUint(parts[i], 10, 32)
|
||||
}
|
||||
|
||||
if isLess(latestVersion, version) {
|
||||
latestVersion = version
|
||||
latestDir = file.Name
|
||||
}
|
||||
}
|
||||
|
||||
return latestDir, nil
|
||||
}
|
||||
|
||||
// getPublishedKind retrieves the latest published kind from the kind registry
|
||||
func (registry *kindRegistry) getPublishedKind(name string, category string, latestRegistryDir string) (string, error) {
|
||||
if latestRegistryDir == "" {
|
||||
return "", nil
|
||||
}
|
||||
|
||||
var cueFilePath string
|
||||
switch category {
|
||||
case "core":
|
||||
cueFilePath = fmt.Sprintf("%s/%s.cue", name, name)
|
||||
case "composable":
|
||||
cueFilePath = fmt.Sprintf("%s.cue", name)
|
||||
default:
|
||||
return "", fmt.Errorf("kind can only be core or composable")
|
||||
}
|
||||
|
||||
kindPath := filepath.Join(latestRegistryDir, category, cueFilePath)
|
||||
file, err := registry.zipFile.Open(kindPath)
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("failed to open file: %w", err)
|
||||
}
|
||||
defer file.Close()
|
||||
|
||||
data, err := io.ReadAll(file)
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("failed to read file: %w", err)
|
||||
}
|
||||
|
||||
return string(data), nil
|
||||
}
|
||||
|
||||
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 }}
|
||||
43
.github/workflows/sync-mirror-event.yml
vendored
43
.github/workflows/sync-mirror-event.yml
vendored
@@ -1,43 +0,0 @@
|
||||
# Owned by grafana-delivery-squad
|
||||
# Intended to be dropped into the base repo, Ex: grafana/grafana
|
||||
name: Dispatch sync to mirror
|
||||
run-name: dispatch-sync-to-mirror-${{ github.ref_name }}
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- "main"
|
||||
- "v*.*.*"
|
||||
- "release-*"
|
||||
|
||||
# This is run after the pull request has been merged, so we'll run against the target branch
|
||||
jobs:
|
||||
dispatch-job:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: "Generate token"
|
||||
id: generate_token
|
||||
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a
|
||||
with:
|
||||
# App needs Actions: Read/Write for the grafana/security-patch-actions repo
|
||||
app_id: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_ID }}
|
||||
private_key: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_PEM }}
|
||||
|
||||
- uses: actions/github-script@v7
|
||||
if: github.repository == 'grafana/grafana'
|
||||
with:
|
||||
github-token: ${{ steps.generate_token.outputs.token }}
|
||||
script: |
|
||||
await github.rest.actions.createWorkflowDispatch({
|
||||
owner: 'grafana',
|
||||
repo: 'security-patch-actions',
|
||||
workflow_id: 'mirror-branch-and-apply-patches-event.yml',
|
||||
ref: 'main',
|
||||
inputs: {
|
||||
src_ref: "${{ github.ref_name }}",
|
||||
src_repo: "${{ github.repository }}",
|
||||
src_sha: "${{ github.sha }}",
|
||||
dest_repo: "${{ github.repository }}-security-mirror",
|
||||
patch_repo: "${{ github.repository }}-security-patches"
|
||||
}
|
||||
})
|
||||
25
.github/workflows/sync-mirror.yml
vendored
Normal file
25
.github/workflows/sync-mirror.yml
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
# Owned by grafana-release-guild
|
||||
# Intended to be dropped into the base repo, Ex: grafana/grafana
|
||||
name: Sync to mirror
|
||||
run-name: sync-to-mirror-${{ github.ref_name }}
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- "main"
|
||||
- "v*.*.*"
|
||||
- "release-*"
|
||||
|
||||
# This is run after the pull request has been merged, so we'll run against the target branch
|
||||
jobs:
|
||||
trigger_downstream_patch_mirror:
|
||||
concurrency: patch-mirror-${{ github.ref_name }}
|
||||
uses: grafana/security-patch-actions/.github/workflows/mirror-branch-and-apply-patches.yml@main
|
||||
if: github.repository == 'grafana/grafana'
|
||||
with:
|
||||
ref: "${{ github.ref_name }}" # this is the target branch name, Ex: "main"
|
||||
src_repo: "${{ github.repository }}"
|
||||
dest_repo: "${{ github.repository }}-security-mirror"
|
||||
patch_repo: "${{ github.repository }}-security-patches"
|
||||
secrets: inherit
|
||||
|
||||
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'
|
||||
5
.github/workflows/verify-kinds.yml
vendored
5
.github/workflows/verify-kinds.yml
vendored
@@ -4,7 +4,7 @@ on:
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
paths:
|
||||
- '**/*.cue'
|
||||
- '**/*.cue'
|
||||
|
||||
jobs:
|
||||
main:
|
||||
@@ -18,9 +18,10 @@ jobs:
|
||||
- name: "Setup Go"
|
||||
uses: "actions/setup-go@v4"
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
go-version: '1.21.10'
|
||||
|
||||
- name: "Verify kinds"
|
||||
run: go run .github/workflows/scripts/kinds/verify-kinds.go
|
||||
env:
|
||||
CODEGEN_VERIFY: 1
|
||||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
||||
|
||||
21
.gitignore
vendored
21
.gitignore
vendored
@@ -24,6 +24,9 @@ __debug_bin*
|
||||
!.yarn/plugins
|
||||
!.yarn/sdks
|
||||
!.yarn/versions
|
||||
# we temporarily commit this file because yarn downloading it
|
||||
# somehow produces different checksum values
|
||||
!.yarn/cache/pa11y-ci-https-1e9675e9e1-668c9119bd.zip
|
||||
.pnp.*
|
||||
|
||||
# Enterprise emails
|
||||
@@ -87,7 +90,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
|
||||
|
||||
@@ -132,7 +134,9 @@ pkg/services/quota/quotaimpl/storage/storage.json
|
||||
|
||||
/devenv/bulk-dashboards/*.json
|
||||
/devenv/bulk-folders/*/*.json
|
||||
/devenv/bulk_alerting_dashboards/*.json
|
||||
/devenv/datasources_bulk.yaml
|
||||
/devenv/bulk_alerting_dashboards/bulk_alerting_datasources.yaml
|
||||
|
||||
/scripts/build/release_publisher/release_publisher
|
||||
*.patch
|
||||
@@ -170,11 +174,6 @@ compilation-stats.json
|
||||
/e2e/build_results.zip
|
||||
/e2e/extensions
|
||||
/e2e/extensions-suite
|
||||
/test-results/
|
||||
/playwright-report/
|
||||
/blob-report/
|
||||
/playwright/.cache/
|
||||
/playwright/.auth/
|
||||
|
||||
# grafana server
|
||||
/scripts/grafana-server/server.log
|
||||
@@ -203,7 +202,6 @@ public/api-spec.json
|
||||
deployment_tools_config.json
|
||||
|
||||
.betterer.cache
|
||||
.nx
|
||||
|
||||
# Temporary file for backporting PRs
|
||||
.pr-body.txt
|
||||
@@ -214,12 +212,3 @@ public/app/plugins/**/dist/
|
||||
# Ignore transpiled JavaScript resulting from the generate-transformations.ts script.
|
||||
/public/app/features/transformers/docs/*.js
|
||||
/scripts/docs/generate-transformations.js
|
||||
|
||||
# Go coverage files created with go test -cover -coverprogile=something.out ...
|
||||
*.out
|
||||
|
||||
# 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
|
||||
|
||||
172
.golangci.toml
172
.golangci.toml
@@ -1,7 +1,9 @@
|
||||
[run]
|
||||
timeout = "20m"
|
||||
concurrency = 10
|
||||
allow-parallel-runners = true
|
||||
timeout = "10m"
|
||||
|
||||
[linters-settings.goconst]
|
||||
min-len = 5
|
||||
min-occurrences = 5
|
||||
|
||||
[linters-settings.exhaustive]
|
||||
default-signifies-exhaustive = true
|
||||
@@ -19,7 +21,6 @@ deny = [
|
||||
{ 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]
|
||||
@@ -62,107 +63,10 @@ files = [
|
||||
"**/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",
|
||||
]
|
||||
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.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/**/*"
|
||||
]
|
||||
|
||||
[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/**/*"
|
||||
]
|
||||
|
||||
[linters-settings.depguard.rules.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/**/*"
|
||||
]
|
||||
|
||||
[linters-settings.depguard.rules.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/**/*"
|
||||
]
|
||||
|
||||
[linters-settings.depguard.rules.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/**/*"
|
||||
]
|
||||
|
||||
[linters-settings.gocritic]
|
||||
@@ -170,28 +74,19 @@ 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
|
||||
# try to keep this list sorted, please
|
||||
enable = [
|
||||
"asciicheck",
|
||||
"bodyclose",
|
||||
"depguard",
|
||||
"dogsled",
|
||||
"errcheck",
|
||||
"errorlint",
|
||||
"exhaustive",
|
||||
"exportloopref",
|
||||
# "gochecknoinits",
|
||||
# "goconst",
|
||||
"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?"
|
||||
"gocyclo",
|
||||
"goimports",
|
||||
"goprintffuncname",
|
||||
"gosec",
|
||||
@@ -200,13 +95,19 @@ enable = [
|
||||
"ineffassign",
|
||||
"misspell",
|
||||
"nakedret",
|
||||
"prealloc",
|
||||
"revive",
|
||||
"exportloopref",
|
||||
"staticcheck",
|
||||
"stylecheck",
|
||||
"typecheck",
|
||||
"unconvert",
|
||||
"unused",
|
||||
"whitespace",
|
||||
"gocyclo",
|
||||
"exhaustive",
|
||||
"typecheck",
|
||||
"asciicheck",
|
||||
"errorlint",
|
||||
"revive",
|
||||
]
|
||||
|
||||
# Disabled linters (might want them later)
|
||||
@@ -215,7 +116,6 @@ enable = [
|
||||
|
||||
[issues]
|
||||
exclude-use-default = false
|
||||
max-same-issues = 0
|
||||
|
||||
# Enable when appropriate
|
||||
# Poorly chosen identifier
|
||||
@@ -241,13 +141,6 @@ text = "SA1019: http.CloseNotifier"
|
||||
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"
|
||||
@@ -288,6 +181,10 @@ text = "501"
|
||||
linters = ["gosec"]
|
||||
text = "404"
|
||||
|
||||
[[issues.exclude-rules]]
|
||||
linters = ["misspell"]
|
||||
text = "Unknwon` is a misspelling of `Unknown"
|
||||
|
||||
[[issues.exclude-rules]]
|
||||
linters = ["errorlint"]
|
||||
text = "non-wrapping format verb for fmt.Errorf"
|
||||
@@ -307,9 +204,34 @@ text = "ST1020"
|
||||
linters = ["stylecheck"]
|
||||
text = "ST1021"
|
||||
|
||||
# Remove this when we have go v1.22 in place
|
||||
# https://stackoverflow.com/a/68247837/767660
|
||||
[[issues.exclude-rules]]
|
||||
linters = ["staticcheck"]
|
||||
text = "SA1019"
|
||||
|
||||
[[issues.exclude-rules]]
|
||||
linters = ["staticcheck"]
|
||||
text = "SA1019"
|
||||
|
||||
[[issues.exclude-rules]]
|
||||
linters = ["misspell"]
|
||||
text = "`Creater` is a misspelling of `Creature`"
|
||||
|
||||
[[issues.exclude-rules]]
|
||||
linters = ["gosec"]
|
||||
path = '(.+)_test\.go'
|
||||
text = "G601"
|
||||
text = "G103"
|
||||
|
||||
[[issues.exclude-rules]]
|
||||
linters = ["gosec"]
|
||||
text = "G303"
|
||||
|
||||
[[issues.exclude-rules]]
|
||||
linters = ["gosec"]
|
||||
text = "G301"
|
||||
|
||||
[[issues.exclude-rules]]
|
||||
linters = ["gosec"]
|
||||
text = "G101"
|
||||
|
||||
[[issues.exclude-rules]]
|
||||
linters = ["errcheck"]
|
||||
text = "fmt.Fprint"
|
||||
|
||||
@@ -34,7 +34,7 @@ var dashboardSettings = [
|
||||
wait: 500,
|
||||
rootElement: '.main-view',
|
||||
// TODO: improve the accessibility of the permission tab https://github.com/grafana/grafana/issues/77203
|
||||
threshold: 5,
|
||||
threshold: 11,
|
||||
},
|
||||
{
|
||||
url: '${HOST}/d/O6f11TZWk/panel-tests-bar-gauge?orgId=1&editview=dashboard_json',
|
||||
@@ -64,7 +64,7 @@ var config = {
|
||||
url: '${HOST}/login',
|
||||
wait: 500,
|
||||
rootElement: '.main-view',
|
||||
threshold: 0,
|
||||
threshold: 13,
|
||||
},
|
||||
{
|
||||
url: '${HOST}/login',
|
||||
@@ -76,13 +76,13 @@ var config = {
|
||||
"click element button[data-testid='data-testid Login button']",
|
||||
"wait for element button[data-testid='data-testid Skip change password button'] to be visible",
|
||||
],
|
||||
threshold: 2,
|
||||
threshold: 15,
|
||||
rootElement: '.main-view',
|
||||
},
|
||||
{
|
||||
url: '${HOST}/?orgId=1',
|
||||
wait: 500,
|
||||
threshold: 0,
|
||||
threshold: 3,
|
||||
},
|
||||
{
|
||||
url: '${HOST}/d/O6f11TZWk/panel-tests-bar-gauge',
|
||||
@@ -95,7 +95,7 @@ var config = {
|
||||
url: '${HOST}/?orgId=1&search=open',
|
||||
wait: 500,
|
||||
rootElement: '.main-view',
|
||||
threshold: 0,
|
||||
threshold: 3,
|
||||
},
|
||||
{
|
||||
url: '${HOST}/alerting/list',
|
||||
@@ -103,49 +103,49 @@ var config = {
|
||||
rootElement: '.main-view',
|
||||
// the unified alerting promotion alert's content contrast is too low
|
||||
// see https://github.com/grafana/grafana/pull/41829
|
||||
threshold: 7,
|
||||
threshold: 6,
|
||||
},
|
||||
{
|
||||
url: '${HOST}/datasources',
|
||||
wait: 500,
|
||||
rootElement: '.main-view',
|
||||
threshold: 0,
|
||||
threshold: 3,
|
||||
},
|
||||
{
|
||||
url: '${HOST}/org/users',
|
||||
wait: 500,
|
||||
rootElement: '.main-view',
|
||||
threshold: 0,
|
||||
threshold: 1,
|
||||
},
|
||||
{
|
||||
url: '${HOST}/org/teams',
|
||||
wait: 500,
|
||||
rootElement: '.main-view',
|
||||
threshold: 0,
|
||||
threshold: 1,
|
||||
},
|
||||
{
|
||||
url: '${HOST}/plugins',
|
||||
wait: 500,
|
||||
rootElement: '.main-view',
|
||||
threshold: 0,
|
||||
threshold: 3,
|
||||
},
|
||||
{
|
||||
url: '${HOST}/org',
|
||||
wait: 500,
|
||||
rootElement: '.main-view',
|
||||
threshold: 0,
|
||||
threshold: 1,
|
||||
},
|
||||
{
|
||||
url: '${HOST}/org/apikeys',
|
||||
wait: 500,
|
||||
rootElement: '.main-view',
|
||||
threshold: 2,
|
||||
threshold: 4,
|
||||
},
|
||||
{
|
||||
url: '${HOST}/dashboards',
|
||||
wait: 500,
|
||||
rootElement: '.main-view',
|
||||
threshold: 0,
|
||||
threshold: 1,
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
@@ -19,6 +19,10 @@ vendor
|
||||
# TS generate from cue by cuetsy
|
||||
**/*.gen.ts
|
||||
|
||||
# Auto-generated internationalization files
|
||||
public/locales/_build/
|
||||
public/locales/**/*.js
|
||||
|
||||
# Auto-generated theme files
|
||||
theme.light.generated.json
|
||||
theme.dark.generated.json
|
||||
@@ -28,8 +32,11 @@ public/api-merged.json
|
||||
public/api-enterprise-spec.json
|
||||
public/openapi3.json
|
||||
|
||||
# Generated mock service worker
|
||||
public/mockServiceWorker.js
|
||||
# Generated Kinds report
|
||||
kinds/report.json
|
||||
|
||||
# Generated schema docs
|
||||
docs/sources/developers/kinds/
|
||||
|
||||
# Crowdin files
|
||||
public/locales/**/*.json
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
# See https://aquasecurity.github.io/trivy/v0.48/docs/configuration/filtering/#trivyignore
|
||||
49
.vscode/launch.json
vendored
49
.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)",
|
||||
@@ -19,44 +19,9 @@
|
||||
"program": "${workspaceFolder}/pkg/cmd/grafana/",
|
||||
"env": {},
|
||||
"cwd": "${workspaceFolder}",
|
||||
"args": ["apiserver", "--secure-port=8443", "--runtime-config=testdata.datasource.grafana.app/v0alpha1=true"]
|
||||
},
|
||||
{
|
||||
"name": "Run API Server (query-localhost)",
|
||||
"type": "go",
|
||||
"request": "launch",
|
||||
"mode": "auto",
|
||||
"program": "${workspaceFolder}/pkg/cmd/grafana/",
|
||||
"env": {},
|
||||
"cwd": "${workspaceFolder}",
|
||||
"args": [
|
||||
"apiserver",
|
||||
"--secure-port=8443",
|
||||
"--runtime-config=query.grafana.app/v0alpha1=true",
|
||||
"--grafana.authn.signing-keys-url=http://localhost:3000/api/signing-keys/keys",
|
||||
"--hg-url=http://localhost:3000",
|
||||
"--hg-key=$HGAPIKEY"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Run Server (query GRPC Storage Server)",
|
||||
"type": "go",
|
||||
"request": "launch",
|
||||
"mode": "auto",
|
||||
"program": "${workspaceFolder}/pkg/cmd/grafana/",
|
||||
"env": { "GF_GRAFANA_APISERVER_STORAGE_TYPE": "unified-grpc" },
|
||||
"cwd": "${workspaceFolder}",
|
||||
"args": ["server", "--homepath", "${workspaceFolder}", "--packaging", "dev"]
|
||||
},
|
||||
{
|
||||
"name": "Run Storage Server",
|
||||
"type": "go",
|
||||
"request": "launch",
|
||||
"mode": "auto",
|
||||
"program": "${workspaceFolder}/pkg/cmd/grafana/",
|
||||
"env": { "GF_DEFAULT_TARGET": "storage-server", "GF_SERVER_HTTP_PORT": "3001" },
|
||||
"cwd": "${workspaceFolder}",
|
||||
"args": ["server", "target", "--homepath", "${workspaceFolder}", "--packaging", "dev"]
|
||||
"args": ["apiserver",
|
||||
"--secure-port=8443",
|
||||
"--runtime-config=testdata.datasource.grafana.app/v0alpha1=true"]
|
||||
},
|
||||
{
|
||||
"name": "Attach to Chrome",
|
||||
@@ -66,16 +31,14 @@
|
||||
"webRoot": "${workspaceFolder}"
|
||||
},
|
||||
{
|
||||
"name": "Debug UI test",
|
||||
"name": "Debug Jest test",
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"runtimeExecutable": "yarn",
|
||||
"runtimeArgs": ["run", "jest", "--runInBand", "${file}"],
|
||||
"console": "integratedTerminal",
|
||||
"internalConsoleOptions": "neverOpen",
|
||||
"env": {
|
||||
"NODE_ENV": "test"
|
||||
}
|
||||
"port": 9229
|
||||
},
|
||||
{
|
||||
"name": "Debug Go test",
|
||||
|
||||
BIN
.yarn/cache/tether-drop-https-3382d2649f-178c3afb88.zip
vendored
Normal file
BIN
.yarn/cache/tether-drop-https-3382d2649f-178c3afb88.zip
vendored
Normal file
Binary file not shown.
253
.yarn/patches/@storybook-blocks-npm-7.4.5-5a2374564a.patch
Normal file
253
.yarn/patches/@storybook-blocks-npm-7.4.5-5a2374564a.patch
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,121 +0,0 @@
|
||||
diff --git a/build/GridItem.js b/build/GridItem.js
|
||||
index 0a700da9f1180ca532e32e04dc7ea50f2e67b96c..a2e4673fa1133aeaa4018cc01312ca386c3395f5 100644
|
||||
--- a/build/GridItem.js
|
||||
+++ b/build/GridItem.js
|
||||
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
||||
});
|
||||
exports.default = void 0;
|
||||
var _react = _interopRequireDefault(require("react"));
|
||||
+var _reactDOM = require("react-dom");
|
||||
var _propTypes = _interopRequireDefault(require("prop-types"));
|
||||
var _reactDraggable = require("react-draggable");
|
||||
var _reactResizable = require("react-resizable");
|
||||
@@ -147,8 +148,10 @@ class GridItem extends _react.default.Component /*:: <Props, State>*/{
|
||||
const pTop = parentRect.top / transformScale;
|
||||
newPosition.left = cLeft - pLeft + offsetParent.scrollLeft;
|
||||
newPosition.top = cTop - pTop + offsetParent.scrollTop;
|
||||
- this.setState({
|
||||
- dragging: newPosition
|
||||
+ _reactDOM.flushSync(() => {
|
||||
+ this.setState({
|
||||
+ dragging: newPosition
|
||||
+ });
|
||||
});
|
||||
|
||||
// Call callback with this data
|
||||
@@ -213,8 +216,10 @@ class GridItem extends _react.default.Component /*:: <Props, State>*/{
|
||||
top,
|
||||
left
|
||||
};
|
||||
- this.setState({
|
||||
- dragging: newPosition
|
||||
+ _reactDOM.flushSync(() => {
|
||||
+ this.setState({
|
||||
+ dragging: newPosition
|
||||
+ });
|
||||
});
|
||||
|
||||
// Call callback with this data
|
||||
@@ -261,8 +266,10 @@ class GridItem extends _react.default.Component /*:: <Props, State>*/{
|
||||
top,
|
||||
left
|
||||
};
|
||||
- this.setState({
|
||||
- dragging: null
|
||||
+ _reactDOM.flushSync(() => {
|
||||
+ this.setState({
|
||||
+ dragging: null
|
||||
+ });
|
||||
});
|
||||
const {
|
||||
x,
|
||||
@@ -485,8 +492,10 @@ class GridItem extends _react.default.Component /*:: <Props, State>*/{
|
||||
let updatedSize = size;
|
||||
if (node) {
|
||||
updatedSize = (0, _utils.resizeItemInDirection)(handle, position, size, containerWidth);
|
||||
- this.setState({
|
||||
- resizing: handlerName === "onResizeStop" ? null : updatedSize
|
||||
+ _reactDOM.flushSync(() => {
|
||||
+ this.setState({
|
||||
+ resizing: handlerName === "onResizeStop" ? null : updatedSize
|
||||
+ });
|
||||
});
|
||||
}
|
||||
|
||||
diff --git a/lib/GridItem.jsx b/lib/GridItem.jsx
|
||||
index dbe41f92388f19d3e476690fa0ee5584ab9d5bb4..1e4713667cd7dadd6618fe06176804a02ee3ccc2 100644
|
||||
--- a/lib/GridItem.jsx
|
||||
+++ b/lib/GridItem.jsx
|
||||
@@ -1,5 +1,6 @@
|
||||
// @flow
|
||||
import React from "react";
|
||||
+import { flushSync } from "react-dom";
|
||||
import PropTypes from "prop-types";
|
||||
import { DraggableCore } from "react-draggable";
|
||||
import { Resizable } from "react-resizable";
|
||||
@@ -459,7 +460,9 @@ export default class GridItem extends React.Component<Props, State> {
|
||||
const pTop = parentRect.top / transformScale;
|
||||
newPosition.left = cLeft - pLeft + offsetParent.scrollLeft;
|
||||
newPosition.top = cTop - pTop + offsetParent.scrollTop;
|
||||
- this.setState({ dragging: newPosition });
|
||||
+ flushSync(() => {
|
||||
+ this.setState({ dragging: newPosition });
|
||||
+ });
|
||||
|
||||
// Call callback with this data
|
||||
const { x, y } = calcXY(
|
||||
@@ -516,7 +519,9 @@ export default class GridItem extends React.Component<Props, State> {
|
||||
}
|
||||
|
||||
const newPosition: PartialPosition = { top, left };
|
||||
- this.setState({ dragging: newPosition });
|
||||
+ flushSync(() => {
|
||||
+ this.setState({ dragging: newPosition });
|
||||
+ });
|
||||
|
||||
// Call callback with this data
|
||||
const { containerPadding } = this.props;
|
||||
@@ -549,7 +554,9 @@ export default class GridItem extends React.Component<Props, State> {
|
||||
const { w, h, i, containerPadding } = this.props;
|
||||
const { left, top } = this.state.dragging;
|
||||
const newPosition: PartialPosition = { top, left };
|
||||
- this.setState({ dragging: null });
|
||||
+ flushSync(() => {
|
||||
+ this.setState({ dragging: null });
|
||||
+ });
|
||||
|
||||
const { x, y } = calcXY(
|
||||
this.getPositionParams(),
|
||||
@@ -605,8 +612,10 @@ export default class GridItem extends React.Component<Props, State> {
|
||||
size,
|
||||
containerWidth
|
||||
);
|
||||
- this.setState({
|
||||
- resizing: handlerName === "onResizeStop" ? null : updatedSize
|
||||
+ flushSync(() => {
|
||||
+ this.setState({
|
||||
+ resizing: handlerName === "onResizeStop" ? null : updatedSize
|
||||
+ });
|
||||
});
|
||||
}
|
||||
|
||||
893
.yarn/releases/yarn-4.1.0.cjs
vendored
Executable file
893
.yarn/releases/yarn-4.1.0.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
30
.yarnrc.yml
30
.yarnrc.yml
@@ -7,6 +7,9 @@ enableTelemetry: false
|
||||
nodeLinker: node-modules
|
||||
|
||||
packageExtensions:
|
||||
'@storybook/core-common@7.4.5':
|
||||
dependencies:
|
||||
'@storybook/react-webpack5': 7.4.5
|
||||
'croact-css-styled@1.1.9':
|
||||
dependencies:
|
||||
croact: 1.0.4
|
||||
@@ -21,16 +24,29 @@ packageExtensions:
|
||||
peerDependencies:
|
||||
react: 17.0.1
|
||||
react-dom: 17.0.1
|
||||
react-compat-css-styled@1.0.8:
|
||||
dependencies:
|
||||
react-simple-compat: 1.2.2
|
||||
react-icons@2.2.7:
|
||||
peerDependencies:
|
||||
prop-types: '*'
|
||||
react-resizable@3.0.4:
|
||||
peerDependencies:
|
||||
react-dom: 17.0.1
|
||||
'@msagl/drawing@*':
|
||||
dependencies:
|
||||
queue-typescript: "^1.0.1"
|
||||
"@esfx/collections-sortedmap": "^1.0.0"
|
||||
|
||||
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.1.0.cjs
|
||||
# Uncomment the following lines if you want to use Verdaccio local npm registry. Read more at packages/README.md
|
||||
#npmScopes:
|
||||
# grafana:
|
||||
# npmRegistryServer: http://localhost:4873
|
||||
#
|
||||
#unsafeHttpWhitelist:
|
||||
# - 'localhost'
|
||||
# npmScopes:
|
||||
# grafana:
|
||||
# npmRegistryServer: http://localhost:4873
|
||||
|
||||
# unsafeHttpWhitelist:
|
||||
# - 'localhost'
|
||||
|
||||
1127
CHANGELOG.md
1127
CHANGELOG.md
File diff suppressed because it is too large
Load Diff
28
Dockerfile
28
Dockerfile
@@ -3,7 +3,7 @@
|
||||
ARG BASE_IMAGE=alpine:3.19.1
|
||||
ARG JS_IMAGE=node:20-alpine
|
||||
ARG JS_PLATFORM=linux/amd64
|
||||
ARG GO_IMAGE=golang:1.23.1-alpine
|
||||
ARG GO_IMAGE=golang:1.22.7-alpine
|
||||
|
||||
ARG GO_SRC=go-builder
|
||||
ARG JS_SRC=js-builder
|
||||
@@ -14,19 +14,18 @@ ENV NODE_OPTIONS=--max_old_space_size=8000
|
||||
|
||||
WORKDIR /tmp/grafana
|
||||
|
||||
COPY package.json project.json nx.json yarn.lock .yarnrc.yml ./
|
||||
COPY package.json yarn.lock .yarnrc.yml ./
|
||||
COPY .yarn .yarn
|
||||
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
|
||||
|
||||
RUN yarn install --immutable
|
||||
|
||||
COPY tsconfig.json .eslintrc .editorconfig .browserslistrc .prettierrc.js ./
|
||||
COPY public public
|
||||
COPY scripts scripts
|
||||
COPY emails emails
|
||||
|
||||
@@ -41,13 +40,9 @@ ARG GO_BUILD_TAGS="oss"
|
||||
ARG WIRE_TAGS="oss"
|
||||
ARG BINGO="true"
|
||||
|
||||
# Install build dependencies
|
||||
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; \
|
||||
apk add --no-cache gcc g++ make git; \
|
||||
fi
|
||||
|
||||
WORKDIR /tmp/grafana
|
||||
@@ -57,16 +52,6 @@ COPY .bingo .bingo
|
||||
|
||||
# Include vendored dependencies
|
||||
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 \
|
||||
@@ -85,6 +70,7 @@ COPY pkg pkg
|
||||
COPY scripts scripts
|
||||
COPY conf conf
|
||||
COPY .github .github
|
||||
COPY LICENSE ./
|
||||
|
||||
ENV COMMIT_SHA=${COMMIT_SHA}
|
||||
ENV BUILD_BRANCH=${BUILD_BRANCH}
|
||||
@@ -186,7 +172,7 @@ RUN if [ ! $(getent group "$GF_GID") ]; then \
|
||||
|
||||
COPY --from=go-src /tmp/grafana/bin/grafana* /tmp/grafana/bin/*/grafana* ./bin/
|
||||
COPY --from=js-src /tmp/grafana/public ./public
|
||||
COPY --from=js-src /tmp/grafana/LICENSE ./
|
||||
COPY --from=go-src /tmp/grafana/LICENSE ./
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
|
||||
@@ -173,7 +173,7 @@ Supermajority votes must be called explicitly in a separate thread on the approp
|
||||
|
||||
Votes may take the form of a single proposal, with the option to vote yes or no, or the form of multiple alternatives.
|
||||
|
||||
A vote on a single proposal is considered successful if at least two thirds of those eligible to vote in favor.
|
||||
A vote on a single proposal is considered successful if at least two thirds of those eligible to vote vote in favor.
|
||||
|
||||
If there are multiple alternatives, members may vote for one or more alternatives, or vote “no” to object to all alternatives. A vote on multiple alternatives is considered decided in favor of one alternative if it has received the most votes in favor, and a vote from at least two thirds of those eligible to vote. Should no alternative reach this quorum, another vote on a reduced number of options may be called separately.
|
||||
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
|
||||
List of previous team members that have had a big impact on the company or the product and contributed during a long period of time.
|
||||
|
||||
- Hugo Häggmark ([Björn Lundén](https://www.bjornlunden.se/))
|
||||
- Hugo Häggmark ([School of applied technology](https://salt.study))
|
||||
|
||||
364
ISSUE_TRIAGE.md
Normal file
364
ISSUE_TRIAGE.md
Normal file
@@ -0,0 +1,364 @@
|
||||
# Triage issues
|
||||
|
||||
The main goal of issue triage is to categorize all incoming Grafana issues and make sure each issue has all basic information needed for anyone else to understand and be able to start working on it.
|
||||
|
||||
> **Note:** This information is for Grafana project Maintainers, Owners, and Admins. If you are a Contributor, then you will not be able to perform most of the tasks in this topic.
|
||||
|
||||
The core maintainers of the Grafana project are responsible for categorizing all incoming issues and delegating any critical or important issue to other maintainers. Currently one maintainer each week is responsible. Besides that part, triage provides an important way to contribute to an open source project.
|
||||
|
||||
Triage helps ensure issues resolve quickly by:
|
||||
|
||||
- Ensuring the issue's intent and purpose is conveyed precisely. This is necessary because it can be difficult for an issue to explain how an end user experiences a problem and what actions they took.
|
||||
- Giving a contributor the information they need before they commit to resolving an issue.
|
||||
- Lowering the issue count by preventing duplicate issues.
|
||||
- Streamlining the development process by preventing duplicate discussions.
|
||||
|
||||
If you don't have the knowledge or time to code, consider helping with triage. The community will thank you for saving them time by spending some of yours.
|
||||
|
||||
## Simplified flowchart diagram of the issue triage process
|
||||
|
||||
<!-- https://textik.com/#610afa78553def29 -->
|
||||
|
||||
```
|
||||
+-------------------+
|
||||
| |
|
||||
| new issue/ | +
|
||||
| more info added |
|
||||
| |
|
||||
+---------|---------+
|
||||
|
|
||||
+-------------|-----------+
|
||||
| |
|
||||
NO +------- all info needed to ------+ YES
|
||||
| | categorize the issue? | |
|
||||
| | | |
|
||||
| +-------------------------+ |
|
||||
+------|-----------+ +------------|----------+
|
||||
| | | |
|
||||
| label: | | label: type/* |
|
||||
| needs more info | | label: area/* |
|
||||
| | | label: datasource/* |
|
||||
+------------------+ | | |
|
||||
+------------|----------+
|
||||
|
|
||||
+--------|-------+
|
||||
| |
|
||||
NO +---------- is duplicate? --------------------+ YES
|
||||
| | | |
|
||||
| +----------------+ |
|
||||
| +----------------|---------------+
|
||||
+------|-----+ | |
|
||||
| | | add comment: |
|
||||
NO +------------ can repro? ------------+ YES | |
|
||||
| | | | | /duplicate of #<issue number> |
|
||||
| +------------+ | | |
|
||||
| | +--------------------------------+
|
||||
+-------------|-------------+ |
|
||||
| | +--------|---------+
|
||||
| label: | | |
|
||||
| triage/needs-confirmation | NO +-------- needs priority? ------+ YES
|
||||
| | | | | |
|
||||
+-------------|-------------+ | +------------------+ |
|
||||
| | |
|
||||
+-------------|------+ +-------|--------+ +----------|---------+
|
||||
| | | | | |
|
||||
| Assign to project ------ Done -------------- label: priority/* |
|
||||
| | | | | |
|
||||
+--------------------+ +----------------+ +--------------------+
|
||||
|
||||
```
|
||||
|
||||
## 1. Find uncategorized issues
|
||||
|
||||
To get started with issue triage and finding issues that haven't been triaged you have two alternatives.
|
||||
|
||||
### Browse unlabeled issues
|
||||
|
||||
The easiest and straight forward way of getting started and finding issues that haven't been triaged is to browse [unlabeled issues](https://github.com/grafana/grafana/issues?q=is%3Aopen+is%3Aissue+no%3Alabel) and starting from the bottom and working yourself to the top.
|
||||
|
||||
### Subscribe to all notifications
|
||||
|
||||
The more advanced, but recommended way is to subscribe to all notifications from this repository which means that all new issues, pull requests, comments and important status changes are sent to your configured email address. Read this [guide](https://help.github.com/en/articles/watching-and-unwatching-repositories#watching-a-single-repository) for help with setting this up.
|
||||
|
||||
It's highly recommended that you setup filters to automatically remove emails from the inbox and label/categorize them accordingly to make it easy for you to understand when you need to act upon a notification or where to look for finding issues that haven't been triaged etc.
|
||||
|
||||
Instructions for setting up filters in Gmail can be found [here](#setting-up-gmail-filters). Another alternative is to use [Trailer](https://github.com/ptsochantaris/trailer) or similar software.
|
||||
|
||||
## 2. Ensure the issue contains basic information
|
||||
|
||||
Before triaging an issue very far, make sure that the issue's author provided the standard issue information. This will help you make an educated recommendation on how to categorize the issue. The Grafana project utilizes [GitHub issue templates](https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/configuring-issue-templates-for-your-repository) to guide contributors to provide standard information that must be included for each type of template or type of issue.
|
||||
|
||||
### Standard issue information that must be included
|
||||
|
||||
Given a certain [issue template](https://github.com/grafana/grafana/issues/new/choose) have been used by the issue author or depending how the issue is perceived by the issue triage responsible, the following should help you understand what standard issue information that must be included.
|
||||
|
||||
#### Bug reports
|
||||
|
||||
Should explain what happened, what was expected and how to reproduce it together with any additional information that may help giving a complete picture of what happened such as screenshots, [query inspector](https://community.grafana.com/t/using-grafanas-query-inspector-to-troubleshoot-issues/2630) output and any environment related information that's applicable and/or maybe related to the reported problem:
|
||||
|
||||
- Grafana version:
|
||||
- Data source type & version:
|
||||
- OS Grafana is installed on:
|
||||
- User OS & Browser:
|
||||
- Grafana plugins:
|
||||
- Others:
|
||||
|
||||
#### Enhancement requests
|
||||
|
||||
Prior to August, 2023, community-submitted feature requests were submitted as [Github discussions](https://github.com/grafana/grafana/discussions). These are now submitted using the [feature request issue template](https://github.com/grafana/grafana/issues/new?assignees=&labels=type%2Ffeature-request&projects=&template=1-feature_requests.md).
|
||||
|
||||
When submitting an enhancement request we ask that users focus on the problem they'd like to solve and why it’s a problem rather than focusing on the solution itself. To facilitate this the feature requests template includes the following:
|
||||
|
||||
- What would you like to be added?:
|
||||
- Why is this needed (describe your use case and goals)\*\*?:
|
||||
|
||||
#### Accessibility issues
|
||||
|
||||
This is a mix between a bug report and enhancement request but focused on accessibility issues to help make Grafana improve keyboard navigation, screen-reader support and being accessible to everyone. The report should include relevant [WCAG criteria](https://www.w3.org/WAI/WCAG21/quickref/?versions=2.0), if applicable.
|
||||
|
||||
Grafana Labs is dedicated to improving our graphical user interfaces and overall experience so that our product becomes usable and accessible for people with disabilities as well as anyone else. Learn more about Grafana's commitment to [A11y](https://grafana.com/accessibility/) (accessibility).
|
||||
|
||||
#### Support requests
|
||||
|
||||
In general, if the issue description and title is perceived as a question no more information is needed. See how to categorize these requests [here](#support-requests-1).
|
||||
|
||||
### Good practices
|
||||
|
||||
To make it easier for everyone to understand and find issues they're searching for it's suggested as a general rule of thumbs to:
|
||||
|
||||
- Make sure that issue titles are named to explain the subject of the issue, has a correct spelling and doesn't include irrelevant information and/or sensitive information.
|
||||
- Make sure that issue descriptions doesn't include irrelevant information, information from template that haven't been filled out and/or sensitive information.
|
||||
- Do your best effort to change title and description or request suggested changes by adding a comment.
|
||||
|
||||
> **Note:** Above rules is applicable to both new and existing issues of the Grafana project.
|
||||
|
||||
### Do you have all the information needed to categorize an issue?
|
||||
|
||||
Depending on the issue, you might not feel all this information is needed. Use your best judgement. If you cannot triage an issue using what its author provided, explain kindly to the author that they must provide the above information to clarify the problem. Label issue with `needs more info` and add any related `area/*` or `datasource/*` labels. Alternatively, use `bot/needs more info` label and the Grafana bot will request it for you.
|
||||
|
||||
If the author provides the standard information but you are still unable to triage the issue, request additional information. Do this kindly and politely because you are asking for more of the author's time.
|
||||
|
||||
If the author does not respond to the requested information within the timespan of a week, close the issue with a kind note stating that the author can request for the issue to be reopened when the necessary information is provided.
|
||||
|
||||
When you feel you have all the information needed you're ready to [categorizing the issue](#3-categorizing-an-issue).
|
||||
|
||||
If you receive a notification with additional information provided but you are not anymore on issue triage and you feel you do not have time to handle it, you should delegate it to the current person on issue triage.
|
||||
|
||||
## 3. Categorizing an issue
|
||||
|
||||
An issue can have multiple of the following labels. Typically, a properly categorized issue should at least have:
|
||||
|
||||
- One label identifying its type (`type/*`).
|
||||
- One or multiple labels identifying the functional areas of interest or component (`area/*`) and/or data source (`datasource/*`), if applicable.
|
||||
|
||||
| Label | Description |
|
||||
| ------------------------ | ------------------------------------------------------------------------- |
|
||||
| `type/bug` | A feature isn't working as expected given design or documentation. |
|
||||
| `type/feature-request` | Request for a new feature or enhancement. |
|
||||
| `type/docs` | Documentation problem or enhancement. |
|
||||
| `type/accessibility` | Accessibility problem or enhancement. |
|
||||
| `type/question` | Issue is a question or is perceived as such. |
|
||||
| `type/duplicate` | An existing issue of the same subject/request have already been reported. |
|
||||
| `type/works-as-intended` | A reported bug works as intended/by design. |
|
||||
| `type/build-packaging` | Build or packaging problem or enhancement. |
|
||||
| `area/*` | Subject is related to a functional area of interest or component. |
|
||||
| `datasource/*` | Subject is related to a core data source plugin. |
|
||||
|
||||
### Duplicate issues
|
||||
|
||||
Make sure it's not a duplicate by searching existing issues using related terms from the issue title and description. If you think you know there is an existing issue, but can't find it, please reach out to one of the maintainers and ask for help. If you identify that the issue is a duplicate of an existing issue:
|
||||
|
||||
1. Add a comment `/duplicate of #<issue number>`. GitHub will recognize this and add some additional context to the issue activity.
|
||||
2. The Grafana bot will do the rest, adding the correct label and closing comment
|
||||
3. Add `type/duplicate` label. Optionally add any related `area/*` or `datasource/*` labels.
|
||||
|
||||
### Bug reports
|
||||
|
||||
If it's not perfectly clear that it's an actual bug, quickly try to reproduce it.
|
||||
|
||||
**It's a bug/it can be reproduced:**
|
||||
|
||||
1. Add a comment describing detailed steps for how to reproduce it, if applicable.
|
||||
2. Label the issue `type/bug` and at least one `area/*` or `datasource/*` label.
|
||||
3. If you know that maintainers wont be able to put any resources into it for some time then label the issue with `help wanted` and optionally `beginner friendly` together with pointers on which code to update to fix the bug. This should signal to the community that we would appreciate any help we can get to resolve this.
|
||||
4. Move on to [prioritizing the issue](#4-prioritization-of-issues).
|
||||
|
||||
**It can't be reproduced:**
|
||||
|
||||
1. Either [ask for more information](#2-ensure-the-issue-contains-basic-information) needed to investigate it more thoroughly.
|
||||
2. Either [delegate further investigations](#investigation-of-issues) to someone else.
|
||||
|
||||
**It works as intended/by design:**
|
||||
|
||||
1. Kindly and politely add a comment explaining briefly why we think it works as intended and close the issue.
|
||||
2. Label the issue `type/works-as-intended`.
|
||||
|
||||
### Enhancement/feature?
|
||||
|
||||
1. Label the issue `type/feature-request` and add at least one `area/*` or `datasource/*` label.
|
||||
2. Make sure the submitter has justified why this feature requests is important.
|
||||
|
||||
### Documentation issue?
|
||||
|
||||
First, evaluate if the documentation makes sense to be included in the Grafana project:
|
||||
|
||||
- Is this something we want/can maintain as a project?
|
||||
- Is this referring to usage of some specific integration/tool and in that case is that a popular use case in combination with Grafana?
|
||||
- If unsure, kindly and politely add a comment explaining that we would need [upvotes](https://github.blog/2016-03-10-add-reactions-to-pull-requests-issues-and-comments) to identify that lots of other users want/need this.
|
||||
|
||||
Second, label the issue `type/docs` and at least one `area/*` or `datasource/*` label.
|
||||
|
||||
**Minor typo/error/lack of information:**
|
||||
|
||||
There's a minor typo/error/lack of information that adds a lot of confusion for users and given the amount of work is a big win to make sure fixing it:
|
||||
|
||||
1. Either update the documentation yourself and open a pull request.
|
||||
2. Either delegate the work to someone else by assigning that person to the issue and add the issue to next major/minor milestone.
|
||||
|
||||
**Major error/lack of information:**
|
||||
|
||||
1. Label the issue with `help wanted` and `beginner friendly`, if applicable, to signal that we find this important to fix and we would appreciate any help we can get from the community.
|
||||
2. Move on to [prioritizing the issue](#4-prioritization-of-issues).
|
||||
|
||||
### Accessibility issues
|
||||
|
||||
1. Label the issue `type/accessibility` and at least one `area/*` or `datasource/*` label.
|
||||
|
||||
### Support requests
|
||||
|
||||
1. Kindly and politely direct the issue author to the [community site](https://community.grafana.com/) and explain that GitHub is mainly used for tracking bugs and feature requests. If possible, it's usually a good idea to add some pointers to the issue author's question.
|
||||
2. Label the issue with `bot/question`. The Grafana bot will automatically close the issue, and it will add the type/question label for you.
|
||||
|
||||
## 4. Prioritization of issues
|
||||
|
||||
In general bugs and enhancement issues should be labeled with a priority.
|
||||
|
||||
This is the most difficult thing with triaging issues since it requires a lot of knowledge, context and experience before being able to think of and start feel comfortable adding a certain priority label.
|
||||
|
||||
The key here is asking for help and discuss issues to understand how more experienced project members think and reason. By doing that you learn more and eventually be more and more comfortable with prioritizing issues.
|
||||
|
||||
In case there is an uncertainty around the prioritization of an issue, please ask the maintainers for help.
|
||||
|
||||
| Label | Description |
|
||||
| --------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `priority/critical` | Highest priority. Must be actively worked on as someone's top priority right now. |
|
||||
| `priority/support-subscription` | This is important for one or several customers having a paid Grafana support subscription. |
|
||||
| `priority/important-soon` | Must be staffed and worked on either currently, or very soon, ideally in time for the next release. |
|
||||
| `priority/important-longterm` | Important over the long term, but may not be staffed and/or may need multiple releases to complete. |
|
||||
| `priority/nice-to-have` | It's a good idea, but not scheduled for any release. |
|
||||
| `priority/awaiting-more-evidence` | Lowest priority. Possibly useful, but not yet enough interest in it. |
|
||||
| `priority/unscheduled` | Something to look into before and to be discussed during the planning of the next (upcoming) major/minor stable release. |
|
||||
|
||||
**Critical bugs**
|
||||
|
||||
1. If a bug has been categorized and any of the following criteria apply, the bug should be labeled as critical and must be actively worked on as someone's top priority right now.
|
||||
|
||||
- Results in any data loss
|
||||
- Critical security or performance issues
|
||||
- Problem that makes a feature unusable
|
||||
- Multiple users experience a severe problem affecting their business, users etc.
|
||||
|
||||
2. Label the issue `priority/critical`.
|
||||
3. If applicable, label the issue `priority/support-subscription`.
|
||||
4. Add the issue to the next upcoming patch release milestone. Create a new milestone if there are none.
|
||||
5. Escalate the problem to the maintainers.
|
||||
6. Assign or ask a maintainer for help assigning someone to make this issue their top priority right now.
|
||||
|
||||
**Important short-term**
|
||||
|
||||
1. Label the issue `priority/important-soon`.
|
||||
2. If applicable, label the issue `priority/support-subscription`.
|
||||
3. 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.
|
||||
4. 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.
|
||||
5. 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`.
|
||||
2. Consider requesting [help from the community](#5-requesting-help-from-the-community).
|
||||
|
||||
**Nice to have**
|
||||
|
||||
1. Label the issue `priority/nice-to-have`.
|
||||
2. Consider requesting [help from the community](#5-requesting-help-from-the-community).
|
||||
|
||||
**Not critical, but unsure?**
|
||||
|
||||
1. Label the issue `priority/unscheduled`.
|
||||
2. Consider requesting [help from the community](#5-requesting-help-from-the-community).
|
||||
|
||||
## 5. Requesting help from the community
|
||||
|
||||
Depending on the issue and/or priority, it's always a good idea to consider signalling to the community that help from community is appreciated and needed in case an issue is not prioritized to be worked on by maintainers. Use your best judgement. In general, requesting help from the community means that a contribution has a good chance of getting accepted and merged.
|
||||
|
||||
In many cases the issue author or community as a whole is more suitable to contribute changes since they're experts in their domain. It's also quite common that someone has tried to get something to work using the documentation without success and made an effort to get it to work and/or reached out to the [community site](https://community.grafana.com/) to get the missing information. Particularly in these areas it's more likely that there exist experts in their own domain and it is usually a good idea to request help from contributors:
|
||||
|
||||
- Database setups
|
||||
- Authentication like OAuth providers and LDAP setups
|
||||
- Platform specific things
|
||||
- Reverse proxy setups
|
||||
- Alert notifiers
|
||||
|
||||
1. Kindly and politely add a comment to signal to users subscribed to updates of the issue.
|
||||
- Explain that the issue would be nice to get resolved, but it isn't prioritized to work on by maintainers for an unforeseen future.
|
||||
- If possible or applicable, try to help contributors getting starting by adding pointers and references to what code/files need to be changed and/or ideas of a good way to solve/implement the issue.
|
||||
2. Label the issue with `help wanted`.
|
||||
3. If applicable, label the issue with `beginner friendly` to denote that the issue is suitable for a beginner to work on.
|
||||
4. If possible, try to estimate the amount of work by adding `effort/small`, `effort/medium` or `effort/large`.
|
||||
|
||||
## Investigation of issues
|
||||
|
||||
When an issue has all basic information provided, but the triage responsible haven't been able to reproduce the reported problem at a first glance, the issue is labeled [`triage/needs-confirmation`](https://github.com/grafana/grafana/labels/triage%2Fneeds-confirmation). Depending on the perceived severity and/or number of [upvotes](https://github.blog/2016-03-10-add-reactions-to-pull-requests-issues-and-comments), the investigation will either be delegated to another maintainer for further investigation or put on hold until someone else (maintainer or contributor) picks it up and eventually starts investigating it.
|
||||
|
||||
Investigating issues can be a very time consuming task, especially for the maintainers, given the huge number of combinations of plugins, data sources, platforms, databases, browsers, tools, hardware, integrations, versions and cloud services, etc that are being used with Grafana. There is a certain number of combinations that are more common than others, and these are in general easier for maintainers to investigate.
|
||||
|
||||
For some other combinations it may not be possible at all for a maintainer to setup a proper test environment to investigate the issue. In these cases we really appreciate any help we can get from the community. Otherwise the issue is highly likely to be closed.
|
||||
|
||||
Even if you don't have the time or knowledge to investigate an issue we highly recommend that you [upvote](https://github.blog/2016-03-10-add-reactions-to-pull-requests-issues-and-comments) the issue if you happen to have the same problem. If you have further details that may help investigating the issue please provide as much information as possible.
|
||||
|
||||
## Automation
|
||||
|
||||
We have some automation that triggers on comments or labels being added to issues. Many of these automated behaviors are defined in [commands.json](https://github.com/grafana/grafana/blob/main/.github/commands.json). Or in other [GitHub Actions](https://github.com/grafana/grafana/tree/main/.github/workflows)
|
||||
|
||||
[Read more on bot actions](https://github.com/grafana/grafana/blob/main/.github/bot.md)
|
||||
|
||||
## External PRs
|
||||
|
||||
Part of issue triage should also be triaging of external PRs. Main goal should be to make sure PRs from external contributors have an owner/reviewer and are not forgotten.
|
||||
|
||||
1. Check new external PRs which do not have a reviewer. You can easily search for pull requests made by external contributors by using the label: `pr/external` in your [query search](https://github.com/grafana/grafana/pulls?q=is%3Aopen+is%3Apr+label%3Apr%2Fexternal) Note: external PRs are automatically labeled with `pr/external` upon creation.
|
||||
2. Check if there is a link to an existing issue. The link to a existing issue should be in the description section, underneath “Which issue(s) does this PR fix?:”.
|
||||
3. If not and you know which issue it is solving, add the link yourself, otherwise ask the author to link the issue or create one.
|
||||
4. Assign a reviewer based on who was handling the linked issue or what code or feature does the PR touches (look at who was the last to make changes there if all else fails).
|
||||
|
||||
## Appendix
|
||||
|
||||
### Setting up Gmail filters
|
||||
|
||||
If you're using Gmail it's highly recommended that you setup filters to automatically remove email from the inbox and label them accordingly to make it easy for you to understand when you need to act upon a notification or process all incoming issues that haven't been triaged.
|
||||
|
||||
This may be setup by personal preference, but here's a working configuration for reference.
|
||||
|
||||
1. Follow instructions in [gist](https://gist.github.com/marefr/9167c2e31466f6316c1cba118874e74f)
|
||||
2. In Gmail, go to Settings -> Filters and Blocked Addresses
|
||||
3. Import filters -> select xml file -> Open file
|
||||
4. Review filters
|
||||
5. Optional, Check Apply new filters to existing email
|
||||
6. Create filters
|
||||
|
||||
This will give you a structure of labels in the sidebar similar to the following:
|
||||
|
||||
```
|
||||
- Inbox
|
||||
...
|
||||
- GitHub (mine)
|
||||
- activity
|
||||
- assigned
|
||||
- mentions
|
||||
- GitHub (other)
|
||||
- Grafana
|
||||
```
|
||||
|
||||
- All notifications you’ll need to read/take action on show up as unread in GitHub (mine) and its sub-labels.
|
||||
- All other notifications you don’t need to take action on show up as unread in GitHub (other) and its sub-labels
|
||||
- This is convenient for issue triage and to follow the activity in the Grafana project.
|
||||
@@ -10,6 +10,7 @@ The following directories and their subdirectories are licensed under Apache-2.0
|
||||
|
||||
```
|
||||
packages/grafana-data/
|
||||
packages/grafana-e2e/
|
||||
packages/grafana-e2e-selectors/
|
||||
packages/grafana-runtime/
|
||||
packages/grafana-ui/
|
||||
@@ -17,7 +18,7 @@ packaging/
|
||||
kinds/
|
||||
pkg/kinds/
|
||||
pkg/kindsys/
|
||||
pkg/registry/schemas/
|
||||
pkg/registry/corekind/
|
||||
grafana-mixin/
|
||||
public/app/plugins/datasource/tempo
|
||||
public/app/features/explore/TraceView/components
|
||||
|
||||
203
Makefile
203
Makefile
@@ -7,40 +7,29 @@ WIRE_TAGS = "oss"
|
||||
-include local/Makefile
|
||||
include .bingo/Variables.mk
|
||||
|
||||
.PHONY: all deps-go deps-js deps build-go build-backend build-server build-cli build-js build build-docker-full build-docker-full-ubuntu lint-go golangci-lint test-go test-js gen-ts test run run-frontend clean devenv devenv-down protobuf drone help gen-go gen-cue fix-cue
|
||||
|
||||
GO = go
|
||||
GO_VERSION = 1.23.1
|
||||
GO_LINT_FILES ?= $(shell ./scripts/go-workspace/golangci-lint-includes.sh)
|
||||
GO_TEST_FILES ?= $(shell ./scripts/go-workspace/test-includes.sh)
|
||||
GO_FILES ?= ./pkg/...
|
||||
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)
|
||||
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)
|
||||
|
||||
.PHONY: all
|
||||
all: deps build
|
||||
|
||||
##@ Dependencies
|
||||
|
||||
.PHONY: deps-go
|
||||
deps-go: ## Install backend dependencies.
|
||||
$(GO) run $(GO_RACE_FLAG) build.go setup
|
||||
$(GO) run build.go setup
|
||||
|
||||
.PHONY: deps-js
|
||||
deps-js: node_modules ## Install frontend dependencies.
|
||||
|
||||
.PHONY: deps
|
||||
deps: deps-js ## Install all dependencies.
|
||||
|
||||
.PHONY: node_modules
|
||||
node_modules: package.json yarn.lock ## Install node modules.
|
||||
@echo "install frontend dependencies"
|
||||
YARN_ENABLE_PROGRESS_BARS=false yarn install --immutable
|
||||
@@ -56,22 +45,19 @@ $(NGALERT_SPEC_TARGET):
|
||||
|
||||
$(MERGED_SPEC_TARGET): swagger-oss-gen swagger-enterprise-gen $(NGALERT_SPEC_TARGET) $(SWAGGER) ## Merge generated and ngalert API specs
|
||||
# known conflicts DsPermissionType, AddApiKeyCommand, Json, Duration (identical models referenced by both specs)
|
||||
$(SWAGGER) mixin -q $(SPEC_TARGET) $(ENTERPRISE_SPEC_TARGET) $(NGALERT_SPEC_TARGET) --ignore-conflicts -o $(MERGED_SPEC_TARGET)
|
||||
$(SWAGGER) mixin $(SPEC_TARGET) $(ENTERPRISE_SPEC_TARGET) $(NGALERT_SPEC_TARGET) --ignore-conflicts -o $(MERGED_SPEC_TARGET)
|
||||
|
||||
.PHONY: swagger-oss-gen
|
||||
swagger-oss-gen: $(SWAGGER) ## Generate API Swagger specification
|
||||
@echo "re-generating swagger for OSS"
|
||||
rm -f $(SPEC_TARGET)
|
||||
SWAGGER_GENERATE_EXTENSION=false $(SWAGGER) generate spec -q -m -w pkg/server -o $(SPEC_TARGET) \
|
||||
SWAGGER_GENERATE_EXTENSION=false $(SWAGGER) generate spec -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 \
|
||||
--exclude-tag=enterprise
|
||||
|
||||
# this file only exists if enterprise is enabled
|
||||
.PHONY: swagger-enterprise-gen
|
||||
ENTERPRISE_EXT_FILE = pkg/extensions/ext.go
|
||||
ifeq ("$(wildcard $(ENTERPRISE_EXT_FILE))","") ## if enterprise is not enabled
|
||||
swagger-enterprise-gen:
|
||||
@@ -80,23 +66,19 @@ else
|
||||
swagger-enterprise-gen: $(SWAGGER) ## Generate API Swagger specification
|
||||
@echo "re-generating swagger for enterprise"
|
||||
rm -f $(ENTERPRISE_SPEC_TARGET)
|
||||
SWAGGER_GENERATE_EXTENSION=false $(SWAGGER) generate spec -q -m -w pkg/server -o $(ENTERPRISE_SPEC_TARGET) \
|
||||
SWAGGER_GENERATE_EXTENSION=false $(SWAGGER) generate spec -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 \
|
||||
--include-tag=enterprise
|
||||
endif
|
||||
|
||||
.PHONY: swagger-gen
|
||||
swagger-gen: gen-go $(MERGED_SPEC_TARGET) swagger-validate
|
||||
|
||||
.PHONY: swagger-validate
|
||||
swagger-validate: $(MERGED_SPEC_TARGET) $(SWAGGER) ## Validate API spec
|
||||
$(SWAGGER) validate --skip-warnings $(<)
|
||||
$(SWAGGER) validate $(<)
|
||||
|
||||
.PHONY: swagger-clean
|
||||
swagger-clean:
|
||||
rm -f $(SPEC_TARGET) $(MERGED_SPEC_TARGET) $(OAPI_SPEC_TARGET)
|
||||
|
||||
@@ -115,89 +97,45 @@ lefthook-uninstall: $(LEFTHOOK)
|
||||
##@ OpenAPI 3
|
||||
OAPI_SPEC_TARGET = public/openapi3.json
|
||||
|
||||
.PHONY: openapi3-gen
|
||||
openapi3-gen: swagger-gen ## Generates OpenApi 3 specs from the Swagger 2 already generated
|
||||
$(GO) run $(GO_RACE_FLAG) scripts/openapi3/openapi3conv.go $(MERGED_SPEC_TARGET) $(OAPI_SPEC_TARGET)
|
||||
|
||||
##@ Internationalisation
|
||||
.PHONY: i18n-extract-enterprise
|
||||
ENTERPRISE_FE_EXT_FILE = public/app/extensions/index.ts
|
||||
ifeq ("$(wildcard $(ENTERPRISE_FE_EXT_FILE))","") ## if enterprise is not enabled
|
||||
i18n-extract-enterprise:
|
||||
@echo "Skipping i18n extract for Enterprise: not enabled"
|
||||
else
|
||||
i18n-extract-enterprise:
|
||||
@echo "Extracting i18n strings for Enterprise"
|
||||
yarn run i18next --config public/locales/i18next-parser-enterprise.config.cjs
|
||||
node ./public/locales/pseudo.mjs --mode enterprise
|
||||
endif
|
||||
|
||||
.PHONY: i18n-extract
|
||||
i18n-extract: i18n-extract-enterprise
|
||||
@echo "Extracting i18n strings for OSS"
|
||||
yarn run i18next --config public/locales/i18next-parser.config.cjs
|
||||
node ./public/locales/pseudo.mjs --mode oss
|
||||
$(GO) run scripts/openapi3/openapi3conv.go $(MERGED_SPEC_TARGET) $(OAPI_SPEC_TARGET)
|
||||
|
||||
##@ Building
|
||||
.PHONY: gen-cue
|
||||
gen-cue: ## Do all CUE/Thema code generation
|
||||
@echo "generate code from .cue files"
|
||||
go generate ./pkg/plugins/plugindef
|
||||
go generate ./kinds/gen.go
|
||||
go generate ./public/app/plugins/gen.go
|
||||
go generate ./pkg/kindsysreport/codegen/report.go
|
||||
|
||||
.PHONY: gen-feature-toggles
|
||||
gen-feature-toggles:
|
||||
## First go test run fails because it will re-generate the feature toggles.
|
||||
## Second go test run will compare the generated files and pass.
|
||||
@echo "generate feature toggles"
|
||||
go test -v ./pkg/services/featuremgmt/... > /dev/null 2>&1; \
|
||||
if [ $$? -eq 0 ]; then \
|
||||
echo "feature toggles already up-to-date"; \
|
||||
else \
|
||||
go test -v ./pkg/services/featuremgmt/...; \
|
||||
fi
|
||||
|
||||
.PHONY: gen-go
|
||||
gen-go:
|
||||
gen-go: $(WIRE)
|
||||
@echo "generate go files"
|
||||
$(GO) run $(GO_RACE_FLAG) ./pkg/build/wire/cmd/wire/main.go gen -tags $(WIRE_TAGS) ./pkg/server
|
||||
$(WIRE) gen -tags $(WIRE_TAGS) ./pkg/server
|
||||
|
||||
.PHONY: fix-cue
|
||||
fix-cue: $(CUE)
|
||||
@echo "formatting cue files"
|
||||
$(CUE) fix kinds/**/*.cue
|
||||
$(CUE) fix public/app/plugins/**/**/*.cue
|
||||
|
||||
.PHONY: gen-jsonnet
|
||||
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
|
||||
|
||||
.PHONY: build-backend
|
||||
build-backend: ## Build Grafana backend.
|
||||
@echo "build backend"
|
||||
$(GO) run build.go $(GO_BUILD_FLAGS) build-backend
|
||||
|
||||
.PHONY: build-server
|
||||
build-server: ## Build Grafana server.
|
||||
@echo "build server"
|
||||
$(GO) run build.go $(GO_BUILD_FLAGS) build-server
|
||||
|
||||
.PHONY: build-cli
|
||||
build-cli: ## Build Grafana CLI application.
|
||||
@echo "build grafana-cli"
|
||||
$(GO) run build.go $(GO_BUILD_FLAGS) build-cli
|
||||
|
||||
.PHONY: build-js
|
||||
build-js: ## Build frontend assets.
|
||||
@echo "build frontend"
|
||||
yarn run build
|
||||
@@ -205,7 +143,6 @@ build-js: ## Build frontend assets.
|
||||
|
||||
PLUGIN_ID ?=
|
||||
|
||||
.PHONY: build-plugin-go
|
||||
build-plugin-go: ## Build decoupled plugins
|
||||
@echo "build plugin $(PLUGIN_ID)"
|
||||
@cd pkg/tsdb; \
|
||||
@@ -215,19 +152,11 @@ build-plugin-go: ## Build decoupled plugins
|
||||
fi; \
|
||||
mage -v buildplugin $(PLUGIN_ID)
|
||||
|
||||
.PHONY: build
|
||||
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
|
||||
|
||||
.PHONY: run-frontend
|
||||
run-frontend: deps-js ## Fetch js dependencies and watch frontend for rebuild
|
||||
yarn start
|
||||
|
||||
@@ -239,84 +168,61 @@ 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) 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
|
||||
$(GO) test -short -covermode=atomic -timeout=30m ./pkg/...
|
||||
|
||||
.PHONY: test-go-integration
|
||||
test-go-integration: ## Run integration tests for backend with flags.
|
||||
@echo "test backend integration tests"
|
||||
$(GO) test $(GO_RACE_FLAG) -count=1 -run "^TestIntegration" -covermode=atomic -timeout=5m $(GO_INTEGRATION_TESTS)
|
||||
$(GO) test -count=1 -run "^TestIntegration" -covermode=atomic -timeout=5m $(GO_INTEGRATION_TESTS)
|
||||
|
||||
.PHONY: test-go-integration-alertmanager
|
||||
test-go-integration-alertmanager: ## Run integration tests for the remote alertmanager (config taken from the mimir_backend block).
|
||||
@echo "test remote alertmanager integration tests"
|
||||
$(GO) clean -testcache
|
||||
AM_URL=http://localhost:8080 AM_TENANT_ID=test \
|
||||
$(GO) test $(GO_RACE_FLAG) -count=1 -run "^TestIntegrationRemoteAlertmanager" -covermode=atomic -timeout=5m ./pkg/services/ngalert/...
|
||||
$(GO) test -count=1 -run "^TestIntegrationRemoteAlertmanager" -covermode=atomic -timeout=5m ./pkg/services/ngalert/...
|
||||
|
||||
.PHONY: test-go-integration-postgres
|
||||
test-go-integration-postgres: devenv-postgres ## Run integration tests for postgres backend with flags.
|
||||
@echo "test backend integration postgres tests"
|
||||
$(GO) clean -testcache
|
||||
GRAFANA_TEST_DB=postgres \
|
||||
$(GO) test $(GO_RACE_FLAG) -p=1 -count=1 -run "^TestIntegration" -covermode=atomic -timeout=10m $(GO_INTEGRATION_TESTS)
|
||||
$(GO) test -p=1 -count=1 -run "^TestIntegration" -covermode=atomic -timeout=10m $(GO_INTEGRATION_TESTS)
|
||||
|
||||
.PHONY: test-go-integration-mysql
|
||||
test-go-integration-mysql: devenv-mysql ## Run integration tests for mysql backend with flags.
|
||||
@echo "test backend integration mysql tests"
|
||||
GRAFANA_TEST_DB=mysql \
|
||||
$(GO) test $(GO_RACE_FLAG) -p=1 -count=1 -run "^TestIntegration" -covermode=atomic -timeout=10m $(GO_INTEGRATION_TESTS)
|
||||
$(GO) test -p=1 -count=1 -run "^TestIntegration" -covermode=atomic -timeout=10m $(GO_INTEGRATION_TESTS)
|
||||
|
||||
.PHONY: test-go-integration-redis
|
||||
test-go-integration-redis: ## Run integration tests for redis cache.
|
||||
@echo "test backend integration redis tests"
|
||||
$(GO) clean -testcache
|
||||
REDIS_URL=localhost:6379 $(GO) test $(GO_RACE_FLAG) -run IntegrationRedis -covermode=atomic -timeout=2m $(GO_INTEGRATION_TESTS)
|
||||
REDIS_URL=localhost:6379 $(GO) test -run IntegrationRedis -covermode=atomic -timeout=2m $(GO_INTEGRATION_TESTS)
|
||||
|
||||
.PHONY: test-go-integration-memcached
|
||||
test-go-integration-memcached: ## Run integration tests for memcached cache.
|
||||
@echo "test backend integration memcached tests"
|
||||
$(GO) clean -testcache
|
||||
MEMCACHED_HOSTS=localhost:11211 $(GO) test $(GO_RACE_FLAG) -run IntegrationMemcached -covermode=atomic -timeout=2m $(GO_INTEGRATION_TESTS)
|
||||
MEMCACHED_HOSTS=localhost:11211 $(GO) test -run IntegrationMemcached -covermode=atomic -timeout=2m $(GO_INTEGRATION_TESTS)
|
||||
|
||||
.PHONY: test-js
|
||||
test-js: ## Run tests for frontend.
|
||||
@echo "test frontend"
|
||||
yarn test
|
||||
|
||||
.PHONY: test
|
||||
test: test-go test-js ## Run all tests.
|
||||
|
||||
##@ Linting
|
||||
.PHONY: golangci-lint
|
||||
golangci-lint: $(GOLANGCI_LINT)
|
||||
@echo "lint via golangci-lint"
|
||||
$(GOLANGCI_LINT) run \
|
||||
--config .golangci.toml \
|
||||
$(GO_LINT_FILES)
|
||||
$(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
|
||||
shellcheck: $(SH_FILES) ## Run checks for shell scripts.
|
||||
@docker run --rm -v "$$PWD:/mnt" koalaman/shellcheck:stable \
|
||||
$(SH_FILES) -e SC1071 -e SC2162
|
||||
@@ -326,7 +232,6 @@ shellcheck: $(SH_FILES) ## Run checks for shell scripts.
|
||||
TAG_SUFFIX=$(if $(WIRE_TAGS)!=oss,-$(WIRE_TAGS))
|
||||
PLATFORM=linux/amd64
|
||||
|
||||
.PHONY: build-docker-full
|
||||
build-docker-full: ## Build Docker image for development.
|
||||
@echo "build docker container"
|
||||
tar -ch . | \
|
||||
@@ -340,7 +245,6 @@ build-docker-full: ## Build Docker image for development.
|
||||
--tag grafana/grafana$(TAG_SUFFIX):dev \
|
||||
$(DOCKER_BUILD_ARGS)
|
||||
|
||||
.PHONY: build-docker-full-ubuntu
|
||||
build-docker-full-ubuntu: ## Build Docker image based on Ubuntu for development.
|
||||
@echo "build docker container"
|
||||
tar -ch . | \
|
||||
@@ -352,45 +256,36 @@ build-docker-full-ubuntu: ## Build Docker image based on Ubuntu for development.
|
||||
--build-arg COMMIT_SHA=$$(git rev-parse HEAD) \
|
||||
--build-arg BUILD_BRANCH=$$(git rev-parse --abbrev-ref HEAD) \
|
||||
--build-arg BASE_IMAGE=ubuntu:22.04 \
|
||||
--build-arg GO_IMAGE=golang:$(GO_VERSION) \
|
||||
--build-arg GO_IMAGE=golang:1.21.10 \
|
||||
--tag grafana/grafana$(TAG_SUFFIX):dev-ubuntu \
|
||||
$(DOCKER_BUILD_ARGS)
|
||||
|
||||
##@ 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`
|
||||
.PHONY: devenv
|
||||
# create docker-compose file with provided sources and start them
|
||||
# example: make devenv sources=postgres,auth/openldap
|
||||
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:
|
||||
@cd devenv; \
|
||||
sources=postgres_tests
|
||||
|
||||
.PHONY: devenv-mysql
|
||||
devenv-mysql:
|
||||
@cd devenv; \
|
||||
sources=mysql_tests
|
||||
@@ -402,23 +297,18 @@ devenv-mysql:
|
||||
# go-gettable dependency and so getting it installed can be inconvenient.
|
||||
#
|
||||
# If you are working on changes to protobuf interfaces you may either use
|
||||
# this target or run the individual scripts below directly
|
||||
.PHONY: protobuf
|
||||
# this target or run the individual scripts below directly.
|
||||
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
|
||||
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
|
||||
bash pkg/plugins/backendplugin/pluginextensionv2/generate.sh
|
||||
bash pkg/plugins/backendplugin/secretsmanagerplugin/generate.sh
|
||||
bash pkg/services/store/entity/generate.sh
|
||||
|
||||
.PHONY: clean
|
||||
clean: ## Clean up intermediate build artifacts.
|
||||
@echo "cleaning"
|
||||
rm -rf node_modules
|
||||
rm -rf public/build
|
||||
|
||||
.PHONY: gen-ts
|
||||
gen-ts:
|
||||
@echo "generating TypeScript definitions"
|
||||
go get github.com/tkrajina/typescriptify-golang-structs/typescriptify@v0.1.7
|
||||
@@ -428,40 +318,17 @@ gen-ts:
|
||||
# This repository's configuration is protected (https://readme.drone.io/signature/).
|
||||
# Use this make target to regenerate the configuration YAML files when
|
||||
# you modify starlark files.
|
||||
.PHONY: drone
|
||||
drone: $(DRONE)
|
||||
bash scripts/drone/env-var-check.sh
|
||||
$(DRONE) starlark --format
|
||||
$(DRONE) lint .drone.yml --trusted
|
||||
$(DRONE) --server https://drone.grafana.net sign --save grafana/grafana
|
||||
|
||||
# Generate an Emacs tags table (https://www.gnu.org/software/emacs/manual/html_node/emacs/Tags-Tables.html) for Starlark files.
|
||||
.PHONY: scripts/drone/TAGS
|
||||
scripts/drone/TAGS: $(shell find scripts/drone -name '*.star')
|
||||
etags --lang none --regex="/def \(\w+\)[^:]+:/\1/" --regex="/\s*\(\w+\) =/\1/" $^ -o $@
|
||||
|
||||
.PHONY: format-drone
|
||||
format-drone:
|
||||
buildifier --lint=fix -r scripts/drone
|
||||
|
||||
.PHONY: go-race-is-enabled
|
||||
go-race-is-enabled:
|
||||
@if [ -n "$(GO_RACE)" ]; then \
|
||||
echo "The Go race detector is enabled locally, yey!"; \
|
||||
else \
|
||||
echo "The Go race detector is NOT enabled locally, boo!"; \
|
||||
fi;
|
||||
|
||||
.PHONY: enable-go-race
|
||||
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)
|
||||
|
||||
110
UPGRADING_DEPENDENCIES.md
Normal file
110
UPGRADING_DEPENDENCIES.md
Normal file
@@ -0,0 +1,110 @@
|
||||
# Guide to upgrading dependencies
|
||||
|
||||
Upgrading Go or Node.js requires making changes in many different files. See below for a list and explanation for each.
|
||||
|
||||
## Go
|
||||
|
||||
- Drone
|
||||
- `grafana/build-container`
|
||||
- Appveyor
|
||||
- Dockerfile
|
||||
|
||||
## Node.js
|
||||
|
||||
- Drone
|
||||
- `grafana/build-container`
|
||||
- Appveyor
|
||||
- Dockerfile
|
||||
- `.github/workflows/publish.yml`
|
||||
|
||||
## Go dependencies
|
||||
|
||||
The Grafana project uses [Go modules](https://golang.org/cmd/go/#hdr-Modules__module_versions__and_more) to manage dependencies on external packages. This requires a working Go environment with version 1.11 or greater installed.
|
||||
|
||||
To add or update a new dependency, use the `go get` command:
|
||||
|
||||
```bash
|
||||
go get example.com/some/module/pkg
|
||||
|
||||
# Pick a specific version.
|
||||
go get example.com/some/module/pkg@vX.Y.Z
|
||||
```
|
||||
|
||||
Tidy up the `go.mod` and `go.sum` files:
|
||||
|
||||
```bash
|
||||
go mod tidy
|
||||
```
|
||||
|
||||
You have to commit the changes to `go.mod` and `go.sum` before submitting the pull request.
|
||||
|
||||
To understand what the actual dependencies of `grafana-server` are, one could run it with `-vv` flag. This might produce an output, different from `go.mod` contents and `-vv` option is the source of truth here. It lists the modules _compiled_ into the executable, while `go.mod` lists also test and weak transitive dependencies (modules, used in some package, which is not in use by itself). If you are interested in reporting a vulnerability in a dependency module - please consult `-vv` output, maybe the "dependency" is not a dependency as such.
|
||||
|
||||
### Upgrading dependencies
|
||||
|
||||
If you need to upgrade a direct or indirect dependency, you can do it like so, $MODULE being the dependency in question: `go get -u $MODULE`. The corresponding entry in go.mod should then have the version you specified; if it's an indirect dependency, the entry should have the `// indirect` comment. Follow this by executing `go mod tidy`, to ensure that go.mod and go.sum are up to date. If the indirect dependency turns out to not be used (transitively) by any of our packages, `go mod tidy` will actually strip it from go.mod. In that case, you can just ignore it since it isn't used in the end.
|
||||
|
||||
## Node.js dependencies
|
||||
|
||||
Updated using `yarn`.
|
||||
|
||||
- `package.json`
|
||||
|
||||
## Where to make changes
|
||||
|
||||
### Drone
|
||||
|
||||
Our CI builds run on Drone.
|
||||
|
||||
#### Files
|
||||
|
||||
- `.circleci/config.yml`.
|
||||
|
||||
#### Dependencies
|
||||
|
||||
- nodejs
|
||||
- golang
|
||||
- grafana/build-container (our custom docker build container)
|
||||
|
||||
### grafana/build-container
|
||||
|
||||
The main build steps (in Drone) happen using a custom Docker image that comes pre-baked with some of the necessary dependencies.
|
||||
|
||||
Link: [grafana/build-container](https://github.com/grafana/grafana/tree/main/scripts/build/ci-build)
|
||||
|
||||
#### Dependencies
|
||||
|
||||
- fpm
|
||||
- nodejs
|
||||
- golang
|
||||
- crosscompiling (several compilers)
|
||||
|
||||
### Appveyor
|
||||
|
||||
Main and release builds trigger test runs on Appveyors build environment so that tests will run on Windows.
|
||||
|
||||
#### Files:
|
||||
|
||||
- `appveyor.yml`
|
||||
|
||||
#### Dependencies
|
||||
|
||||
- nodejs
|
||||
- golang
|
||||
|
||||
### Dockerfile
|
||||
|
||||
There is a Docker build for Grafana in the root of the project that allows anyone to build Grafana just using Docker.
|
||||
|
||||
#### Files
|
||||
|
||||
- `Dockerfile`
|
||||
|
||||
#### Dependencies
|
||||
|
||||
- nodejs
|
||||
- golang
|
||||
|
||||
### Local developer environments
|
||||
|
||||
Please send out a notice in the grafana-dev slack channel when updating Go or Node.js to make it easier for everyone to update their local developer environments.
|
||||
@@ -14,7 +14,7 @@ Team members and their access to repositories is maintained through [GitHub team
|
||||
|
||||
Examples of proposed changes are overarching architecture, component design, and specific code or graphical elements. Proposed changes SHOULD cover the big picture and intention, but individual parts SHOULD be split into the smallest possible changes. Changes SHOULD be based on and target the main branch. Depending on size of the proposed change, each change SHOULD be discussed, in increasing order of change size and complexity:
|
||||
|
||||
- Directly in a PR (Pull Request) - this MAY be done, but SHOULD not be the common case.
|
||||
- Directly in a RR (Pull Request) - this MAY be done, but SHOULD not be the common case.
|
||||
- Issue
|
||||
- Developer mailing list
|
||||
- Design document, shared via Google Docs, accessible to at least all team members.
|
||||
@@ -44,7 +44,7 @@ Once a PR is approved as per above, any team member MAY merge the PR.
|
||||
## Backporting a PR
|
||||
|
||||
Critical bug fixes needed for a previous minor release should be backported to the respective release branches after coordinating with the delivery team.
|
||||
Please see the [contribution guide](./contribute/merge-pull-request.md#should-the-pull-request-be-backported) for further details.
|
||||
Please see the [contibution guide](./contribute/merge-pull-request.md#should-the-pull-request-be-backported) for further details.
|
||||
|
||||
# Release workflow
|
||||
|
||||
|
||||
1
apps/.gitkeep
Normal file
1
apps/.gitkeep
Normal file
@@ -0,0 +1 @@
|
||||
# workaround for grafana-build quirk
|
||||
@@ -1 +0,0 @@
|
||||
module:"notifications"
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user