Skip to content

feat(destinations): Migrate to managed batching SDK#5805

Merged
kodiakhq[bot] merged 26 commits intomainfrom
feat/managed_destinations
Dec 22, 2022
Merged

feat(destinations): Migrate to managed batching SDK#5805
kodiakhq[bot] merged 26 commits intomainfrom
feat/managed_destinations

Conversation

@yevgenypats
Copy link
Copy Markdown
Contributor

@yevgenypats yevgenypats commented Dec 19, 2022

This should go after this is merged cloudquery/plugin-sdk#518

Blocked by cloudquery/plugin-sdk#521

@yevgenypats yevgenypats force-pushed the feat/managed_destinations branch from a1307b1 to b4fb132 Compare December 21, 2022 08:26
@yevgenypats yevgenypats marked this pull request as ready for review December 21, 2022 08:27
@yevgenypats yevgenypats requested review from a team and candiduslynx and removed request for a team December 21, 2022 08:27
@yevgenypats yevgenypats requested review from hermanschaaf and removed request for candiduslynx December 21, 2022 08:31
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
yevgenypats and others added 7 commits December 21, 2022 16:53
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>
client *bigquery.Client
}

func New(ctx context.Context, logger zerolog.Logger, destSpec specs.Destination) (destination.Client, error) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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())
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I realize now there's a typo in this name, it's WithManagerWriter but probably should be WithManagedWriter 😮‍💨

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -12,61 +13,85 @@ const (
readSQL = "SELECT * FROM %s WHERE \"_cq_source_name\" = ?"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this also be order by _cq_sync_time asc like the other plugins?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is like that be default

@yevgenypats
Copy link
Copy Markdown
Contributor Author

Commenting out cockroachDB due to this cloudquery/plugin-sdk#528

@yevgenypats yevgenypats added the automerge Automatically merge once required checks pass label Dec 22, 2022
@kodiakhq kodiakhq bot merged commit 2f130c1 into main Dec 22, 2022
@kodiakhq kodiakhq bot deleted the feat/managed_destinations branch December 22, 2022 17:31
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).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automerge Automatically merge once required checks pass

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants