Skip to content

feat: Migrate cli, plugins and destinations to new type system#3323

Merged
yevgenypats merged 30 commits intomainfrom
feat/cq_type_system
Nov 1, 2022
Merged

feat: Migrate cli, plugins and destinations to new type system#3323
yevgenypats merged 30 commits intomainfrom
feat/cq_type_system

Conversation

@yevgenypats
Copy link
Copy Markdown
Contributor

This is instead of #3176

SDK PRs:

cloudquery/plugin-sdk#318
cloudquery/plugin-sdk#320

Previous related CloudQuery PRs:

#3286

return fmt.Errorf("failed to initialize destination plugin client for %s: %w", destinationSpec.Name, err)
}

if err := destClients[i].Migrate(ctx, tables); err != nil {
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.

@yevgenypats Maybe now is a good opportunity to change this so that we only migrate the tables specified in the config? This would also be nice for csv, since only the files for tables specified in the config will get created.

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.

Agree. I think they are quite a few improvements that we can/need to do. for example also to spawn only one process per unique destination. but I suggest doing this in follow-up smaller PRs. should be also easier to review and easier/faster for me to develop

cli/cmd/sync2.go Outdated
return fmt.Errorf("failed to get metrics for source %s: %w", sourceSpec.Name, err)
}

fmt.Printf("Sync completed successfully. Resources: %d, Errors: %d, Panics: %d\n", metrics.TotalResources(), metrics.TotalErrors(), metrics.TotalPanics())
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.

Looks like we're missing the time taken now, which I think was quite nice to have.

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.

Added

Copy link
Copy Markdown
Contributor

@hermanschaaf hermanschaaf left a comment

Choose a reason for hiding this comment

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

Leaving a few comments in the meantime, but I haven't quite read through it all yet; looks like there are still some moving parts here so I'll focus more on cloudquery/plugin-sdk#320

Copy link
Copy Markdown
Member

@erezrokah erezrokah left a comment

Choose a reason for hiding this comment

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

Added a few comments, also we need to add the CSV plugin to:

"plugins/destination/test": {


May I suggest to put the new CSV plugin in a separate PR?

Also my main issue is that cqtypes is leaking to the resolvers (we had this before actually when resolvers access the table data).
Not sure how to go about it, but maybe we can always access the struct item instead?

@yevgenypats yevgenypats requested review from erezrokah and hermanschaaf and removed request for disq October 31, 2022 16:41
@yevgenypats yevgenypats added the automerge Automatically merge once required checks pass label Nov 1, 2022
@yevgenypats yevgenypats merged commit f265a94 into main Nov 1, 2022
@yevgenypats yevgenypats deleted the feat/cq_type_system branch November 1, 2022 08:04
kodiakhq bot pushed a commit that referenced this pull request Nov 1, 2022
🤖 I have created a release *beep* *boop*
---


## [1.5.0](plugins-destination-postgresql-v1.4.0...plugins-destination-postgresql-v1.5.0) (2022-11-01)


### Features

* Migrate cli, plugins and destinations to new type system ([#3323](#3323)) ([f265a94](f265a94))


### Bug Fixes

* **deps:** Update plugin-sdk for postgresql to v0.13.18 ([#3417](#3417)) ([5c1cfcd](5c1cfcd))

---
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 Nov 1, 2022
🤖 I have created a release *beep* *boop*
---


## [1.2.0](plugins-source-azure-v1.1.0...plugins-source-azure-v1.2.0) (2022-11-01)


### Features

* Migrate cli, plugins and destinations to new type system ([#3323](#3323)) ([f265a94](f265a94))


### Bug Fixes

* **deps:** Update golang.org/x/exp digest to c99f073 ([#3372](#3372)) ([c64bc54](c64bc54))
* **deps:** Update module github.com/Azure/azure-sdk-for-go/sdk/azcore to v1.1.4 ([#3376](#3376)) ([294708e](294708e))
* **deps:** Update plugin-sdk for azure to v0.13.17 ([#3400](#3400)) ([a244d6c](a244d6c))
* **deps:** Update plugin-sdk for azure to v0.13.18 ([#3410](#3410)) ([36ea67c](36ea67c))

---
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 Nov 1, 2022
🤖 I have created a release *beep* *boop*
---


## [2.3.0](plugins-source-k8s-v2.2.0...plugins-source-k8s-v2.3.0) (2022-11-01)


### Features

* Migrate cli, plugins and destinations to new type system ([#3323](#3323)) ([f265a94](f265a94))


### Bug Fixes

* **deps:** Update kubernetes packages to v0.25.3 ([#3375](#3375)) ([8401b8e](8401b8e))
* **deps:** Update plugin-sdk for k8s to v0.13.18 ([#3407](#3407)) ([e6d116d](e6d116d))

---
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 Nov 1, 2022
🤖 I have created a release *beep* *boop*
---


## [1.2.0](plugins-source-terraform-v1.1.0...plugins-source-terraform-v1.2.0) (2022-11-01)


### Features

* Migrate cli, plugins and destinations to new type system ([#3323](#3323)) ([f265a94](f265a94))


### Bug Fixes

* **deps:** Update module github.com/aws/aws-sdk-go to v1.44.127 ([#3377](#3377)) ([b4f5d32](b4f5d32))
* **deps:** Update plugin-sdk for terraform to v0.13.18 ([#3418](#3418)) ([4aa1202](4aa1202))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
yevgenypats added a commit that referenced this pull request Nov 1, 2022
This is instead of #3176 

SDK PRs:

cloudquery/plugin-sdk#318
cloudquery/plugin-sdk#320

Previous related CloudQuery PRs:

#3286

Co-authored-by: Herman Schaaf <hermanschaaf@gmail.com>
Co-authored-by: Erez Rokah <erezrokah@users.noreply.github.com>
yevgenypats pushed a commit that referenced this pull request Nov 1, 2022
🤖 I have created a release *beep* *boop*
---


## [1.5.0](plugins-destination-postgresql-v1.4.0...plugins-destination-postgresql-v1.5.0) (2022-11-01)


### Features

* Migrate cli, plugins and destinations to new type system ([#3323](#3323)) ([f265a94](f265a94))


### Bug Fixes

* **deps:** Update plugin-sdk for postgresql to v0.13.18 ([#3417](#3417)) ([5c1cfcd](5c1cfcd))

---
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 Nov 1, 2022
🤖 I have created a release *beep* *boop*
---


## [1.2.0](plugins-source-okta-v1.1.0...plugins-source-okta-v1.2.0) (2022-11-01)


### Features

* Migrate cli, plugins and destinations to new type system ([#3323](#3323)) ([f265a94](f265a94))


### Bug Fixes

* **deps:** Update plugin-sdk for okta to v0.13.18 ([#3416](#3416)) ([1def393](1def393))

---
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 Nov 1, 2022
🤖 I have created a release *beep* *boop*
---


## [2.2.0](plugins-source-cloudflare-v2.1.0...plugins-source-cloudflare-v2.2.0) (2022-11-01)


### Features

* Migrate cli, plugins and destinations to new type system ([#3323](#3323)) ([f265a94](f265a94))


### Bug Fixes

* **deps:** Update plugin-sdk for cloudflare to v0.13.17 ([#3402](#3402)) ([0e26848](0e26848))
* **deps:** Update plugin-sdk for cloudflare to v0.13.18 ([#3411](#3411)) ([5e8ce04](5e8ce04))

---
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 Nov 1, 2022
🤖 I have created a release *beep* *boop*
---


## [1.2.0](plugins-source-github-v1.1.0...plugins-source-github-v1.2.0) (2022-11-01)


### Features

* Migrate cli, plugins and destinations to new type system ([#3323](#3323)) ([f265a94](f265a94))


### Bug Fixes

* **deps:** Update plugin-sdk for github to v0.13.18 ([#3405](#3405)) ([b6be94c](b6be94c))

---
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 Nov 1, 2022
🤖 I have created a release *beep* *boop*
---


## [2.4.0](plugins-source-gcp-v2.3.0...plugins-source-gcp-v2.4.0) (2022-11-01)


### Features

* Migrate cli, plugins and destinations to new type system ([#3323](#3323)) ([f265a94](f265a94))


### Bug Fixes

* **deps:** Update plugin-sdk for gcp to v0.13.17 ([#3404](#3404)) ([a919a84](a919a84))
* **deps:** Update plugin-sdk for gcp to v0.13.18 ([#3413](#3413)) ([c59bc48](c59bc48))

---
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 Nov 1, 2022
🤖 I have created a release *beep* *boop*
---


## [2.2.0](plugins-source-heroku-v2.1.0...plugins-source-heroku-v2.2.0) (2022-11-01)


### Features

* Migrate cli, plugins and destinations to new type system ([#3323](#3323)) ([f265a94](f265a94))


### Bug Fixes

* **deps:** Update plugin-sdk for heroku to v0.13.17 ([#3406](#3406)) ([900439b](900439b))
* **deps:** Update plugin-sdk for heroku to v0.13.18 ([#3415](#3415)) ([fbe8a77](fbe8a77))

---
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 Nov 1, 2022
🤖 I have created a release *beep* *boop*
---


## [2.2.0](plugins-source-digitalocean-v2.1.0...plugins-source-digitalocean-v2.2.0) (2022-11-01)


### Features

* Migrate cli, plugins and destinations to new type system ([#3323](#3323)) ([f265a94](f265a94))


### Bug Fixes

* **deps:** Update plugin-sdk for digitalocean to v0.13.17 ([#3403](#3403)) ([e2f2255](e2f2255))
* **deps:** Update plugin-sdk for digitalocean to v0.13.18 ([#3412](#3412)) ([9d19db1](9d19db1))

---
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 Nov 2, 2022
🤖 I have created a release *beep* *boop*
---


## [4.0.0](plugins-source-aws-v3.8.0...plugins-source-aws-v4.0.0) (2022-11-02)


### ⚠ BREAKING CHANGES

* **aws:** Unified tag structure (#3330)

### Features

* Add eventbridge resources ([#3160](#3160)) ([67d3a35](67d3a35))
* **aws:** Fraud Detector support ([#3076](#3076)) ([f0e309a](f0e309a))
* Migrate cli, plugins and destinations to new type system ([#3323](#3323)) ([f265a94](f265a94))
* Update AWS Services (new fields) ([#3324](#3324)) ([0b65803](0b65803))


### Bug Fixes

* Add id to aws_cloudfront_cache_policies, region to aws_ec2_transit_gateways ([#3444](#3444)) ([41362e2](41362e2))
* **aws:** Unified tag structure ([#3330](#3330)) ([c9c1e4c](c9c1e4c))
* **deps:** Update module github.com/aws/aws-sdk-go-v2/credentials to v1.12.23 ([#3378](#3378)) ([c33bf73](c33bf73))
* **deps:** Update module github.com/aws/aws-sdk-go-v2/feature/s3/manager to v1.11.37 ([#3379](#3379)) ([3f1a71d](3f1a71d))
* **deps:** Update module github.com/aws/aws-sdk-go-v2/service/acm to v1.15.2 ([#3380](#3380)) ([b4329ee](b4329ee))
* **deps:** Update module github.com/aws/aws-sdk-go-v2/service/apigateway to v1.15.22 ([#3381](#3381)) ([5816480](5816480))
* **deps:** Update module github.com/aws/aws-sdk-go-v2/service/apigatewayv2 to v1.12.20 ([#3385](#3385)) ([2dd39a6](2dd39a6))
* **deps:** Update module github.com/aws/aws-sdk-go-v2/service/applicationautoscaling to v1.15.20 ([#3386](#3386)) ([0702717](0702717))
* **deps:** Update module github.com/aws/aws-sdk-go-v2/service/appsync to v1.15.12 ([#3387](#3387)) ([6bb936a](6bb936a))
* **deps:** Update module github.com/aws/aws-sdk-go-v2/service/athena to v1.18.12 ([#3388](#3388)) ([e95f748](e95f748))
* **deps:** Update module github.com/aws/aws-sdk-go-v2/service/autoscaling to v1.23.18 ([#3389](#3389)) ([5af977f](5af977f))
* **deps:** Update module github.com/aws/aws-sdk-go-v2/service/backup to v1.17.11 ([#3390](#3390)) ([1ecaab7](1ecaab7))
* **deps:** Update module github.com/aws/aws-sdk-go-v2/service/cloudfront to v1.20.7 ([#3391](#3391)) ([46465d1](46465d1))
* **deps:** Update plugin-sdk for aws to v0.13.17 ([#3399](#3399)) ([f2cd266](f2cd266))
* **deps:** Update plugin-sdk for aws to v0.13.18 ([#3409](#3409)) ([92fa576](92fa576))
* Filtering for DocDB + Neptune ([#3271](#3271)) ([8080c6e](8080c6e))
* Update endpoints ([#3368](#3368)) ([b78c6b1](b78c6b1))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
daniel-garcia pushed a commit to infobloxopen/ibcq-source-k8s that referenced this pull request Feb 24, 2026
🤖 I have created a release *beep* *boop*
---


## [2.3.0](cloudquery/cloudquery@plugins-source-k8s-v2.2.0...plugins-source-k8s-v2.3.0) (2022-11-01)


### Features

* Migrate cli, plugins and destinations to new type system ([#3323](cloudquery/cloudquery#3323)) ([e51e35f](cloudquery/cloudquery@e51e35f))


### Bug Fixes

* **deps:** Update kubernetes packages to v0.25.3 ([#3375](cloudquery/cloudquery#3375)) ([d9f0feb](cloudquery/cloudquery@d9f0feb))
* **deps:** Update plugin-sdk for k8s to v0.13.18 ([#3407](cloudquery/cloudquery#3407)) ([81874f7](cloudquery/cloudquery@81874f7))

---
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.

4 participants