Skip to content

Commit 2d391c1

Browse files
authored
postgresql: change plugin id (grafana#77444)
* postgres: change plugin id * fixed cue file * codeowners update * fixed backend test
1 parent 675e946 commit 2d391c1

File tree

35 files changed

+21
-18
lines changed

35 files changed

+21
-18
lines changed

.github/CODEOWNERS

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@
255255

256256
# BI backend code
257257
/pkg/tsdb/mysql/ @grafana/oss-big-tent
258-
/pkg/tsdb/postgres/ @grafana/oss-big-tent
258+
/pkg/tsdb/grafana-postgresql-datasource/ @grafana/oss-big-tent
259259
/pkg/tsdb/mssql/ @grafana/grafana-bi-squad
260260

261261
# Database migrations
@@ -544,7 +544,7 @@ scripts/generate-icon-bundle.js @grafana/plugins-platform-frontend @grafana/graf
544544
/public/app/plugins/datasource/mssql/ @grafana/grafana-bi-squad
545545
/public/app/plugins/datasource/mysql/ @grafana/oss-big-tent
546546
/public/app/plugins/datasource/opentsdb/ @grafana/observability-metrics
547-
/public/app/plugins/datasource/postgres/ @grafana/oss-big-tent
547+
/public/app/plugins/datasource/grafana-postgresql-datasource/ @grafana/oss-big-tent
548548
/public/app/plugins/datasource/prometheus/ @grafana/observability-metrics
549549
/public/app/plugins/datasource/cloud-monitoring/ @grafana/partner-datasources
550550
/public/app/plugins/datasource/zipkin/ @grafana/observability-traces-and-profiling

.github/pr-commands.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@
149149
},
150150
{
151151
"type": "changedfiles",
152-
"matches": [ "public/app/plugins/datasource/postgres/**/*", "pkg/tsdb/postgres/**/*"],
152+
"matches": [ "public/app/plugins/datasource/grafana-postgresql-datasource/**/*", "pkg/tsdb/grafana-postgresql-datasource/**/*"],
153153
"action": "updateLabel",
154154
"addLabel": "datasource/Postgres"
155155
},

pkg/plugins/backendplugin/coreplugin/registry.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import (
1515
cloudmonitoring "github.com/grafana/grafana/pkg/tsdb/cloud-monitoring"
1616
"github.com/grafana/grafana/pkg/tsdb/cloudwatch"
1717
"github.com/grafana/grafana/pkg/tsdb/elasticsearch"
18+
postgres "github.com/grafana/grafana/pkg/tsdb/grafana-postgresql-datasource"
1819
pyroscope "github.com/grafana/grafana/pkg/tsdb/grafana-pyroscope-datasource"
1920
testdatasource "github.com/grafana/grafana/pkg/tsdb/grafana-testdata-datasource"
2021
"github.com/grafana/grafana/pkg/tsdb/grafanads"
@@ -25,7 +26,6 @@ import (
2526
"github.com/grafana/grafana/pkg/tsdb/mysql"
2627
"github.com/grafana/grafana/pkg/tsdb/opentsdb"
2728
"github.com/grafana/grafana/pkg/tsdb/parca"
28-
"github.com/grafana/grafana/pkg/tsdb/postgres"
2929
"github.com/grafana/grafana/pkg/tsdb/prometheus"
3030
"github.com/grafana/grafana/pkg/tsdb/tempo"
3131
)
@@ -42,7 +42,7 @@ const (
4242
Prometheus = "prometheus"
4343
Tempo = "tempo"
4444
TestData = "grafana-testdata-datasource"
45-
PostgreSQL = "postgres"
45+
PostgreSQL = "grafana-postgresql-datasource"
4646
MySQL = "mysql"
4747
MSSQL = "mssql"
4848
Grafana = "grafana"

pkg/plugins/pfs/corelist/corelist_load_gen.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/plugins/plugins.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,8 @@ func ReadPluginJSON(reader io.Reader) (JSONData, error) {
137137
fallthrough
138138
case "grafana-testdata-datasource":
139139
fallthrough
140+
case "grafana-postgresql-datasource":
141+
fallthrough
140142
case "annolist":
141143
fallthrough
142144
case "debug":

pkg/server/wire.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ import (
156156
cloudmonitoring "github.com/grafana/grafana/pkg/tsdb/cloud-monitoring"
157157
"github.com/grafana/grafana/pkg/tsdb/cloudwatch"
158158
"github.com/grafana/grafana/pkg/tsdb/elasticsearch"
159+
postgres "github.com/grafana/grafana/pkg/tsdb/grafana-postgresql-datasource"
159160
pyroscope "github.com/grafana/grafana/pkg/tsdb/grafana-pyroscope-datasource"
160161
testdatasource "github.com/grafana/grafana/pkg/tsdb/grafana-testdata-datasource"
161162
"github.com/grafana/grafana/pkg/tsdb/grafanads"
@@ -168,7 +169,6 @@ import (
168169
"github.com/grafana/grafana/pkg/tsdb/mysql"
169170
"github.com/grafana/grafana/pkg/tsdb/opentsdb"
170171
"github.com/grafana/grafana/pkg/tsdb/parca"
171-
"github.com/grafana/grafana/pkg/tsdb/postgres"
172172
"github.com/grafana/grafana/pkg/tsdb/prometheus"
173173
"github.com/grafana/grafana/pkg/tsdb/tempo"
174174
)

pkg/services/datasources/models.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const (
2323
DS_TEMPO = "tempo"
2424
DS_ZIPKIN = "zipkin"
2525
DS_MYSQL = "mysql"
26-
DS_POSTGRES = "postgres"
26+
DS_POSTGRES = "grafana-postgresql-datasource"
2727
DS_MSSQL = "mssql"
2828
DS_ACCESS_DIRECT = "direct"
2929
DS_ACCESS_PROXY = "proxy"

pkg/services/pluginsintegration/plugins_integration_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import (
2727
cloudmonitoring "github.com/grafana/grafana/pkg/tsdb/cloud-monitoring"
2828
"github.com/grafana/grafana/pkg/tsdb/cloudwatch"
2929
"github.com/grafana/grafana/pkg/tsdb/elasticsearch"
30+
postgres "github.com/grafana/grafana/pkg/tsdb/grafana-postgresql-datasource"
3031
pyroscope "github.com/grafana/grafana/pkg/tsdb/grafana-pyroscope-datasource"
3132
testdatasource "github.com/grafana/grafana/pkg/tsdb/grafana-testdata-datasource"
3233
"github.com/grafana/grafana/pkg/tsdb/grafanads"
@@ -37,7 +38,6 @@ import (
3738
"github.com/grafana/grafana/pkg/tsdb/mysql"
3839
"github.com/grafana/grafana/pkg/tsdb/opentsdb"
3940
"github.com/grafana/grafana/pkg/tsdb/parca"
40-
"github.com/grafana/grafana/pkg/tsdb/postgres"
4141
"github.com/grafana/grafana/pkg/tsdb/prometheus"
4242
"github.com/grafana/grafana/pkg/tsdb/tempo"
4343
)
@@ -185,7 +185,7 @@ func verifyCorePluginCatalogue(t *testing.T, ctx context.Context, ps *pluginstor
185185
"prometheus": {},
186186
"tempo": {},
187187
"grafana-testdata-datasource": {},
188-
"postgres": {},
188+
"grafana-postgresql-datasource": {},
189189
"mysql": {},
190190
"mssql": {},
191191
"grafana": {},

pkg/tests/api/plugins/data/expectedListResp.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1292,7 +1292,7 @@
12921292
{
12931293
"name": "PostgreSQL",
12941294
"type": "datasource",
1295-
"id": "postgres",
1295+
"id": "grafana-postgresql-datasource",
12961296
"enabled": true,
12971297
"pinned": false,
12981298
"info": {
@@ -1303,8 +1303,8 @@
13031303
"description": "Data source for PostgreSQL and compatible databases",
13041304
"links": null,
13051305
"logos": {
1306-
"small": "/public/app/plugins/datasource/postgres/img/postgresql_logo.svg",
1307-
"large": "/public/app/plugins/datasource/postgres/img/postgresql_logo.svg"
1306+
"small": "/public/app/plugins/datasource/grafana-postgresql-datasource/img/postgresql_logo.svg",
1307+
"large": "/public/app/plugins/datasource/grafana-postgresql-datasource/img/postgresql_logo.svg"
13081308
},
13091309
"build": {},
13101310
"screenshots": null,
@@ -1318,7 +1318,7 @@
13181318
},
13191319
"latestVersion": "",
13201320
"hasUpdate": false,
1321-
"defaultNavUrl": "/plugins/postgres/",
1321+
"defaultNavUrl": "/plugins/grafana-postgresql-datasource/",
13221322
"category": "sql",
13231323
"state": "",
13241324
"signature": "internal",

pkg/tsdb/postgres/locker.go renamed to pkg/tsdb/grafana-postgresql-datasource/locker.go

File renamed without changes.

0 commit comments

Comments
 (0)