Cloud Monitoring: Fix naming and warnings (#82271)

This commit is contained in:
Alyssa Bull 2024-02-09 11:22:44 -07:00 committed by GitHub
parent 7f109c885d
commit 77111a0714
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 56 additions and 62 deletions

View File

@ -9,9 +9,9 @@ on:
type: choice
options:
- grafana-azure-monitor-datasource
- grafana-cloud-monitoring-datasource
- grafana-testdata-datasource
- parca
- stackdriver
- tempo
concurrency:

View File

@ -228,10 +228,10 @@
"@floating-ui/react": "0.26.9",
"@glideapps/glide-data-grid": "^6.0.0",
"@grafana-plugins/grafana-azure-monitor-datasource": "workspace:*",
"@grafana-plugins/grafana-cloud-monitoring-datasource": "workspace:*",
"@grafana-plugins/grafana-pyroscope-datasource": "workspace:*",
"@grafana-plugins/grafana-testdata-datasource": "workspace:*",
"@grafana-plugins/parca": "workspace:*",
"@grafana-plugins/stackdriver": "workspace:*",
"@grafana-plugins/tempo": "workspace:*",
"@grafana/aws-sdk": "0.3.1",
"@grafana/data": "workspace:*",

View File

@ -16,7 +16,7 @@ schemas: [{
// grafana.com, then the plugin `id` has to follow the naming
// conventions.
id: string & strings.MinRunes(1)
id: =~"^([0-9a-z]+\\-([0-9a-z]+\\-)?(\(strings.Join([ for t in _types {t}], "|"))))|(alertGroups|alertlist|annolist|barchart|bargauge|candlestick|canvas|dashlist|debug|datagrid|gauge|geomap|gettingstarted|graph|heatmap|histogram|icon|live|logs|news|nodeGraph|piechart|pluginlist|stat|state-timeline|status-history|table|table-old|text|timeseries|trend|traces|welcome|xychart|alertmanager|cloudwatch|dashboard|elasticsearch|grafana|grafana-azure-monitor-datasource|grafana-cloud-monitoring-datasource|graphite|influxdb|jaeger|loki|mixed|mssql|mysql|opentsdb|postgres|prometheus|stackdriver|tempo|grafana-testdata-datasource|zipkin|phlare|parca)$"
id: =~"^([0-9a-z]+\\-([0-9a-z]+\\-)?(\(strings.Join([ for t in _types {t}], "|"))))|(alertGroups|alertlist|annolist|barchart|bargauge|candlestick|canvas|dashlist|debug|datagrid|gauge|geomap|gettingstarted|graph|heatmap|histogram|icon|live|logs|news|nodeGraph|piechart|pluginlist|stat|state-timeline|status-history|table|table-old|text|timeseries|trend|traces|welcome|xychart|alertmanager|cloudwatch|dashboard|elasticsearch|grafana|grafana-azure-monitor-datasource|stackdriver|graphite|influxdb|jaeger|loki|mixed|mssql|mysql|opentsdb|postgres|prometheus|stackdriver|tempo|grafana-testdata-datasource|zipkin|phlare|parca)$"
// An alias is useful when migrating from one plugin id to another (rebranding etc)
// This should be used sparingly, and is currently only supported though a hardcoded checklist

View File

@ -16,7 +16,7 @@ func main() {
// from Grafana to create different instances of SampleDatasource (per datasource
// ID). When datasource configuration changed Dispose method will be called and
// new datasource instance created using NewSampleDatasource factory.
if err := datasource.Manage("grafana-cloud-monitoring-datasource", NewDatasource, datasource.ManageOpts{}); err != nil {
if err := datasource.Manage("stackdriver", NewDatasource, datasource.ManageOpts{}); err != nil {
log.DefaultLogger.Error(err.Error())
os.Exit(1)
}

View File

@ -30,9 +30,7 @@ const mssqlPlugin = async () =>
const testDataDSPlugin = async () =>
await import(/* webpackChunkName: "testDataDSPlugin" */ '@grafana-plugins/grafana-testdata-datasource/module');
const cloudMonitoringPlugin = async () =>
await import(
/* webpackChunkName: "cloudMonitoringPlugin" */ '@grafana-plugins/grafana-cloud-monitoring-datasource/module'
);
await import(/* webpackChunkName: "cloudMonitoringPlugin" */ '@grafana-plugins/stackdriver/module');
const azureMonitorPlugin = async () =>
await import(/* webpackChunkName: "azureMonitorPlugin" */ '@grafana-plugins/grafana-azure-monitor-datasource/module');
const tempoPlugin = async () => await import(/* webpackChunkName: "tempoPlugin" */ '@grafana-plugins/tempo/module');

View File

@ -1,5 +1,5 @@
{
"name": "@grafana-plugins/grafana-cloud-monitoring-datasource",
"name": "@grafana-plugins/stackdriver",
"description": "Grafana data source for Google Cloud Monitoring",
"private": true,
"version": "10.4.0-pre",

View File

@ -1,19 +1,15 @@
import { CloudMonitoringQuery as CloudMonitoringQueryBase, QueryType } from '../dataquery.gen';
export { QueryType };
export {
TimeSeriesList,
PreprocessorType,
export { PreprocessorType, MetricKind, AlignmentTypes, ValueTypes, MetricFindQueryTypes } from '../dataquery.gen';
export type {
TimeSeriesQuery,
SLOQuery,
TimeSeriesList,
MetricQuery,
MetricKind,
PromQLQuery,
LegacyCloudMonitoringAnnotationQuery,
Filter,
AlignmentTypes,
ValueTypes,
MetricFindQueryTypes,
PromQLQuery,
} from '../dataquery.gen';
/**

View File

@ -3236,51 +3236,6 @@ __metadata:
languageName: unknown
linkType: soft
"@grafana-plugins/grafana-cloud-monitoring-datasource@workspace:*, @grafana-plugins/grafana-cloud-monitoring-datasource@workspace:public/app/plugins/datasource/cloud-monitoring":
version: 0.0.0-use.local
resolution: "@grafana-plugins/grafana-cloud-monitoring-datasource@workspace:public/app/plugins/datasource/cloud-monitoring"
dependencies:
"@emotion/css": "npm:11.11.2"
"@grafana/data": "npm:10.4.0-pre"
"@grafana/e2e-selectors": "npm:10.4.0-pre"
"@grafana/experimental": "npm:1.7.10"
"@grafana/google-sdk": "npm:0.1.2"
"@grafana/plugin-configs": "npm:10.4.0-pre"
"@grafana/runtime": "npm:10.4.0-pre"
"@grafana/schema": "npm:10.4.0-pre"
"@grafana/ui": "npm:10.4.0-pre"
"@kusto/monaco-kusto": "npm:^7.4.0"
"@testing-library/react": "npm:14.2.1"
"@testing-library/user-event": "npm:14.5.2"
"@types/debounce-promise": "npm:3.1.9"
"@types/jest": "npm:29.5.12"
"@types/lodash": "npm:4.14.202"
"@types/node": "npm:20.11.17"
"@types/prismjs": "npm:1.26.3"
"@types/react": "npm:18.2.55"
"@types/react-test-renderer": "npm:18.0.7"
"@types/testing-library__jest-dom": "npm:5.14.9"
debounce-promise: "npm:3.1.2"
fast-deep-equal: "npm:^3.1.3"
i18next: "npm:^23.0.0"
immer: "npm:10.0.3"
lodash: "npm:4.17.21"
monaco-editor: "npm:0.34.0"
prismjs: "npm:1.29.0"
react: "npm:18.2.0"
react-select-event: "npm:5.5.1"
react-test-renderer: "npm:18.2.0"
react-use: "npm:17.5.0"
rxjs: "npm:7.8.1"
ts-node: "npm:10.9.2"
tslib: "npm:2.6.2"
typescript: "npm:5.3.3"
webpack: "npm:5.90.1"
peerDependencies:
"@grafana/runtime": "*"
languageName: unknown
linkType: soft
"@grafana-plugins/grafana-pyroscope-datasource@workspace:*, @grafana-plugins/grafana-pyroscope-datasource@workspace:public/app/plugins/datasource/grafana-pyroscope-datasource":
version: 0.0.0-use.local
resolution: "@grafana-plugins/grafana-pyroscope-datasource@workspace:public/app/plugins/datasource/grafana-pyroscope-datasource"
@ -3406,6 +3361,51 @@ __metadata:
languageName: unknown
linkType: soft
"@grafana-plugins/stackdriver@workspace:*, @grafana-plugins/stackdriver@workspace:public/app/plugins/datasource/cloud-monitoring":
version: 0.0.0-use.local
resolution: "@grafana-plugins/stackdriver@workspace:public/app/plugins/datasource/cloud-monitoring"
dependencies:
"@emotion/css": "npm:11.11.2"
"@grafana/data": "npm:10.4.0-pre"
"@grafana/e2e-selectors": "npm:10.4.0-pre"
"@grafana/experimental": "npm:1.7.10"
"@grafana/google-sdk": "npm:0.1.2"
"@grafana/plugin-configs": "npm:10.4.0-pre"
"@grafana/runtime": "npm:10.4.0-pre"
"@grafana/schema": "npm:10.4.0-pre"
"@grafana/ui": "npm:10.4.0-pre"
"@kusto/monaco-kusto": "npm:^7.4.0"
"@testing-library/react": "npm:14.2.1"
"@testing-library/user-event": "npm:14.5.2"
"@types/debounce-promise": "npm:3.1.9"
"@types/jest": "npm:29.5.12"
"@types/lodash": "npm:4.14.202"
"@types/node": "npm:20.11.17"
"@types/prismjs": "npm:1.26.3"
"@types/react": "npm:18.2.55"
"@types/react-test-renderer": "npm:18.0.7"
"@types/testing-library__jest-dom": "npm:5.14.9"
debounce-promise: "npm:3.1.2"
fast-deep-equal: "npm:^3.1.3"
i18next: "npm:^23.0.0"
immer: "npm:10.0.3"
lodash: "npm:4.17.21"
monaco-editor: "npm:0.34.0"
prismjs: "npm:1.29.0"
react: "npm:18.2.0"
react-select-event: "npm:5.5.1"
react-test-renderer: "npm:18.2.0"
react-use: "npm:17.5.0"
rxjs: "npm:7.8.1"
ts-node: "npm:10.9.2"
tslib: "npm:2.6.2"
typescript: "npm:5.3.3"
webpack: "npm:5.90.1"
peerDependencies:
"@grafana/runtime": "*"
languageName: unknown
linkType: soft
"@grafana-plugins/tempo@workspace:*, @grafana-plugins/tempo@workspace:public/app/plugins/datasource/tempo":
version: 0.0.0-use.local
resolution: "@grafana-plugins/tempo@workspace:public/app/plugins/datasource/tempo"
@ -17971,10 +17971,10 @@ __metadata:
"@floating-ui/react": "npm:0.26.9"
"@glideapps/glide-data-grid": "npm:^6.0.0"
"@grafana-plugins/grafana-azure-monitor-datasource": "workspace:*"
"@grafana-plugins/grafana-cloud-monitoring-datasource": "workspace:*"
"@grafana-plugins/grafana-pyroscope-datasource": "workspace:*"
"@grafana-plugins/grafana-testdata-datasource": "workspace:*"
"@grafana-plugins/parca": "workspace:*"
"@grafana-plugins/stackdriver": "workspace:*"
"@grafana-plugins/tempo": "workspace:*"
"@grafana/aws-sdk": "npm:0.3.1"
"@grafana/data": "workspace:*"