From 39347757ba443e93ab36de86c8672223f9554145 Mon Sep 17 00:00:00 2001 From: Erez Rokah Date: Mon, 19 Dec 2022 12:34:20 +0200 Subject: [PATCH 1/2] fix(destination): Rename `NewDestinationPlugin` to `NewPlugin` (#519) Follow up to https://github.com/cloudquery/plugin-sdk/pull/516 --- --- plugins/destination/plugin.go | 2 +- plugins/destination/plugin_test.go | 8 ++++---- serve/destination_test.go | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/plugins/destination/plugin.go b/plugins/destination/plugin.go index 697be753f6..970ebf623a 100644 --- a/plugins/destination/plugin.go +++ b/plugins/destination/plugin.go @@ -46,7 +46,7 @@ type Plugin struct { const writeWorkers = 1 -func NewDestinationPlugin(name string, version string, newDestinationClient NewClientFunc) *Plugin { +func NewPlugin(name string, version string, newDestinationClient NewClientFunc) *Plugin { p := &Plugin{ name: name, version: version, diff --git a/plugins/destination/plugin_test.go b/plugins/destination/plugin_test.go index 219da4410c..7feba261f5 100644 --- a/plugins/destination/plugin_test.go +++ b/plugins/destination/plugin_test.go @@ -11,14 +11,14 @@ import ( ) func TestPlugin(t *testing.T) { - p := NewDestinationPlugin("test", "development", NewTestDestinationMemDBClient) + p := NewPlugin("test", "development", NewTestDestinationMemDBClient) PluginTestSuiteRunner(t, p, nil, TestSuiteTests{}) } func TestOnNewError(t *testing.T) { ctx := context.Background() - p := NewDestinationPlugin("test", "development", newTestDestinationMemDBClientErrOnNew) + p := NewPlugin("test", "development", newTestDestinationMemDBClientErrOnNew) err := p.Init(ctx, getTestLogger(t), specs.Destination{}) if err == nil { @@ -29,7 +29,7 @@ func TestOnNewError(t *testing.T) { func TestOnWriteError(t *testing.T) { ctx := context.Background() newClientFunc := getNewTestDestinationMemDBClient(withErrOnWrite()) - p := NewDestinationPlugin("test", "development", newClientFunc) + p := NewPlugin("test", "development", newClientFunc) if err := p.Init(ctx, getTestLogger(t), specs.Destination{}); err != nil { t.Fatal(err) } @@ -56,7 +56,7 @@ func TestOnWriteError(t *testing.T) { func TestOnWriteCtxCancelled(t *testing.T) { ctx := context.Background() newClientFunc := getNewTestDestinationMemDBClient(withBlockingWrite()) - p := NewDestinationPlugin("test", "development", newClientFunc) + p := NewPlugin("test", "development", newClientFunc) if err := p.Init(ctx, getTestLogger(t), specs.Destination{}); err != nil { t.Fatal(err) } diff --git a/serve/destination_test.go b/serve/destination_test.go index 23c1200215..3594d15632 100644 --- a/serve/destination_test.go +++ b/serve/destination_test.go @@ -24,7 +24,7 @@ func bufDestinationDialer(context.Context, string) (net.Conn, error) { } func TestDestination(t *testing.T) { - plugin := destination.NewDestinationPlugin("testDestinationPlugin", "development", destination.NewTestDestinationMemDBClient) + plugin := destination.NewPlugin("testDestinationPlugin", "development", destination.NewTestDestinationMemDBClient) s := &destinationServe{ plugin: plugin, } From cb7d2ad60d14a248606799e0f2959e3e13e26748 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Mon, 19 Dec 2022 13:59:30 +0200 Subject: [PATCH 2/2] chore(main): Release v1.12.7 (#520) :robot: I have created a release *beep* *boop* --- ## [1.12.7](https://github.com/cloudquery/plugin-sdk/compare/v1.12.6...v1.12.7) (2022-12-19) ### Bug Fixes * **destination:** Rename `NewDestinationPlugin` to `NewPlugin` ([#519](https://github.com/cloudquery/plugin-sdk/issues/519)) ([3934775](https://github.com/cloudquery/plugin-sdk/commit/39347757ba443e93ab36de86c8672223f9554145)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 242f95a1f3..6d9bfe57b4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.12.7](https://github.com/cloudquery/plugin-sdk/compare/v1.12.6...v1.12.7) (2022-12-19) + + +### Bug Fixes + +* **destination:** Rename `NewDestinationPlugin` to `NewPlugin` ([#519](https://github.com/cloudquery/plugin-sdk/issues/519)) ([3934775](https://github.com/cloudquery/plugin-sdk/commit/39347757ba443e93ab36de86c8672223f9554145)) + ## [1.12.6](https://github.com/cloudquery/plugin-sdk/compare/v1.12.5...v1.12.6) (2022-12-18)