feat(destinations): Migrate to managed batching SDK#5805
Merged
kodiakhq[bot] merged 26 commits intomainfrom Dec 22, 2022
Merged
feat(destinations): Migrate to managed batching SDK#5805kodiakhq[bot] merged 26 commits intomainfrom
kodiakhq[bot] merged 26 commits intomainfrom
Conversation
a1307b1 to
b4fb132
Compare
kodiakhq bot
pushed a commit
to cloudquery/plugin-sdk
that referenced
this pull request
Dec 21, 2022
This adds a managed API for destination plugins. Closes #518 as it got destroyed with conflicts. This should go with that: cloudquery/cloudquery#5805
hermanschaaf
suggested changes
Dec 21, 2022
Co-authored-by: Herman Schaaf <hermanschaaf@gmail.com>
Co-authored-by: Herman Schaaf <hermanschaaf@gmail.com>
Co-authored-by: Herman Schaaf <hermanschaaf@gmail.com>
Co-authored-by: Herman Schaaf <hermanschaaf@gmail.com>
hermanschaaf
suggested changes
Dec 22, 2022
| client *bigquery.Client | ||
| } | ||
|
|
||
| func New(ctx context.Context, logger zerolog.Logger, destSpec specs.Destination) (destination.Client, error) { |
Contributor
There was a problem hiding this comment.
I'm a little confused about why the linter isn't complaining about the unused ctx parameter - is it still running? 🤔
|
|
||
| func TestPlugin(t *testing.T) { | ||
| p := destination.NewPlugin("bigquery", "development", New) | ||
| p := destination.NewPlugin("bigquery", "development", New, destination.WithManagerWriter()) |
Contributor
There was a problem hiding this comment.
I realize now there's a typo in this name, it's WithManagerWriter but probably should be WithManagedWriter 😮💨
Contributor
Author
There was a problem hiding this comment.
| @@ -12,61 +13,85 @@ const ( | |||
| readSQL = "SELECT * FROM %s WHERE \"_cq_source_name\" = ?" | |||
Contributor
There was a problem hiding this comment.
Should this also be order by _cq_sync_time asc like the other plugins?
Contributor
Author
There was a problem hiding this comment.
I think it is like that be default
hermanschaaf
approved these changes
Dec 22, 2022
Contributor
Author
|
Commenting out cockroachDB due to this cloudquery/plugin-sdk#528 |
This was referenced Dec 22, 2022
kodiakhq bot
pushed a commit
that referenced
this pull request
Dec 23, 2022
🤖 I have created a release *beep* *boop* --- ## [1.1.0](plugins-destination-snowflake-v1.0.7...plugins-destination-snowflake-v1.1.0) (2022-12-23) ### Features * **destinations:** Migrate to managed batching SDK ([#5805](#5805)) ([2f130c1](2f130c1)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
kodiakhq bot
pushed a commit
that referenced
this pull request
Dec 23, 2022
🤖 I have created a release *beep* *boop* --- ## [1.3.0](plugins-destination-bigquery-v1.2.1...plugins-destination-bigquery-v1.3.0) (2022-12-23) ### Features * **destinations:** Migrate to managed batching SDK ([#5805](#5805)) ([2f130c1](2f130c1)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
kodiakhq bot
pushed a commit
that referenced
this pull request
Dec 23, 2022
🤖 I have created a release *beep* *boop* --- ## [1.1.0](plugins-destination-sqlite-v1.0.14...plugins-destination-sqlite-v1.1.0) (2022-12-23) ### Features * **destinations:** Migrate to managed batching SDK ([#5805](#5805)) ([2f130c1](2f130c1)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
kodiakhq bot
pushed a commit
that referenced
this pull request
Dec 23, 2022
🤖 I have created a release *beep* *boop* --- ## [1.2.0](plugins-destination-csv-v1.1.15...plugins-destination-csv-v1.2.0) (2022-12-23) ### Features * **destinations:** Migrate to managed batching SDK ([#5805](#5805)) ([2f130c1](2f130c1)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
kodiakhq bot
pushed a commit
that referenced
this pull request
Dec 23, 2022
🤖 I have created a release *beep* *boop* --- ## [1.10.0](plugins-destination-postgresql-v1.9.0...plugins-destination-postgresql-v1.10.0) (2022-12-23) ### Features * **destinations:** Migrate to managed batching SDK ([#5805](#5805)) ([2f130c1](2f130c1)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This should go after this is merged cloudquery/plugin-sdk#518
Blocked by cloudquery/plugin-sdk#521