Skip to content

Commit 39935e2

Browse files
hermanschaafdisqmnorburykodiakhq[bot]
authored
fix: Set plugin metadata (#14715)
This sets plugin metadata on all the CloudQuery-maintained plugins, following an update to plugin-sdk v4.16.0, which requires this metadata to be present for the `package` command to succeed. Second attempt of [#14698](#14698) --------- Co-authored-by: Kemal <223029+disq@users.noreply.github.com> Co-authored-by: Martin Norbury <martin.norbury@gmail.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
1 parent 2d77d3b commit 39935e2

83 files changed

Lines changed: 414 additions & 111 deletions

File tree

Some content is hidden

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

.github/workflows/publish_plugin_to_hub.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ jobs:
109109
working-directory: ${{ needs.prepare.outputs.plugin_dir }}
110110
run: |
111111
rsync -v --exclude='tables.md' ../../../website/pages/docs/plugins/${{ needs.prepare.outputs.plugin_kind_plural }}/${{ needs.prepare.outputs.plugin_name }}/*.md docsdir/
112-
go run main.go package --docs-dir docsdir -m ${{ steps.release-notes.outputs.result }} ${{ needs.prepare.outputs.plugin_kind }} ${{ needs.prepare.outputs.plugin_version }} .
112+
go run main.go package --docs-dir docsdir -m ${{ steps.release-notes.outputs.result }} ${{ needs.prepare.outputs.plugin_version }} .
113113
114114
- name: Setup CloudQuery
115115
uses: cloudquery/setup-cloudquery@v3

.github/workflows/publish_plugin_to_hub_duckdb.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ jobs:
8989
run: |
9090
mkdir -p stubdocs
9191
touch stubdocs/README.md
92-
go run main.go package --docs-dir stubdocs -m ${{ steps.release-notes.outputs.result }} ${{ needs.prepare.outputs.plugin_kind }} ${{ needs.prepare.outputs.plugin_version }} .
92+
go run main.go package --docs-dir stubdocs -m ${{ steps.release-notes.outputs.result }} ${{ needs.prepare.outputs.plugin_version }} .
9393
- name: Setup CloudQuery
9494
uses: cloudquery/setup-cloudquery@v3
9595
with:

.github/workflows/publish_plugin_to_hub_snowflake.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ jobs:
9090
run: |
9191
mkdir -p stubdocs
9292
touch stubdocs/README.md
93-
go run main.go package --docs-dir stubdocs -m ${{ steps.release-notes.outputs.result }} ${{ needs.prepare.outputs.plugin_kind }} ${{ needs.prepare.outputs.plugin_version }} .
93+
go run main.go package --docs-dir stubdocs -m ${{ steps.release-notes.outputs.result }} ${{ needs.prepare.outputs.plugin_version }} .
9494
- name: Setup CloudQuery
9595
uses: cloudquery/setup-cloudquery@v3
9696
with:

.github/workflows/publish_plugin_to_hub_sqlite.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ jobs:
8989
run: |
9090
mkdir -p stubdocs
9191
touch stubdocs/README.md
92-
go run main.go package --docs-dir stubdocs -m ${{ steps.release-notes.outputs.result }} ${{ needs.prepare.outputs.plugin_kind }} ${{ needs.prepare.outputs.plugin_version }} .
92+
go run main.go package --docs-dir stubdocs -m ${{ steps.release-notes.outputs.result }} ${{ needs.prepare.outputs.plugin_version }} .
9393
- name: Setup CloudQuery
9494
uses: cloudquery/setup-cloudquery@v3
9595
with:

plugins/destination/azblob/main.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ const (
1515
)
1616

1717
func main() {
18-
p := plugin.NewPlugin("azblob", internalPlugin.Version, client.New)
18+
p := plugin.NewPlugin(internalPlugin.Name, internalPlugin.Version, client.New,
19+
plugin.WithKind(internalPlugin.Kind),
20+
plugin.WithTeam(internalPlugin.Team),
21+
)
1922
if err := serve.Plugin(p, serve.WithPluginSentryDSN(sentryDSN), serve.WithDestinationV0V1Server()).Serve(context.Background()); err != nil {
2023
log.Fatalf("failed to serve plugin: %v", err)
2124
}
Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
package plugin
22

3+
// Don't move this file to a different package, it's used by Go releaser to embed the version in the binary.
34
var (
4-
// Don't move this file to a different package, it's used by Go releaser to embed the version in the binary.
5-
Version = "Development"
5+
Name = "azblob"
6+
Kind = "destination"
7+
Team = "cloudquery"
8+
Version = "development"
69
)

plugins/destination/bigquery/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const (
1515
)
1616

1717
func main() {
18-
p := plugin.NewPlugin("bigquery", internalPlugin.Version, client.New)
18+
p := plugin.NewPlugin(internalPlugin.Name, internalPlugin.Version, client.New, plugin.WithKind(internalPlugin.Kind), plugin.WithTeam(internalPlugin.Team))
1919
if err := serve.Plugin(p, serve.WithDestinationV0V1Server(), serve.WithPluginSentryDSN(sentryDSN)).Serve(context.Background()); err != nil {
2020
log.Fatal(err)
2121
}
Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
package plugin
22

3+
// Don't move this file to a different package, it's used by Go releaser to embed the version in the binary.
34
var (
4-
// Don't move this file to a different package, it's used by Go releaser to embed the version in the binary.
5-
Version = "Development"
5+
Name = "bigquery"
6+
Kind = "destination"
7+
Team = "cloudquery"
8+
Version = "development"
69
)

plugins/destination/clickhouse/main.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,13 @@ const (
1616
)
1717

1818
func main() {
19-
p := plugin.NewPlugin("clickhouse",
19+
p := plugin.NewPlugin(
20+
internalPlugin.Name,
2021
internalPlugin.Version,
2122
client.New,
2223
plugin.WithJSONSchema(spec.JSONSchema),
24+
plugin.WithKind(internalPlugin.Kind),
25+
plugin.WithTeam(internalPlugin.Team),
2326
)
2427
if err := serve.Plugin(p,
2528
serve.WithPluginSentryDSN(sentryDSN),

plugins/destination/clickhouse/resources/plugin/plugin.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,9 @@ package plugin
22

33
// Version is used by Go releaser to embed the version in the binary.
44
// Should be left in this package.
5-
var Version = "Development"
5+
var (
6+
Name = "clickhouse"
7+
Kind = "destination"
8+
Team = "cloudquery"
9+
Version = "development"
10+
)

0 commit comments

Comments
 (0)