Skip to content

feat: Add WithResolverTransformer#578

Merged
kodiakhq[bot] merged 4 commits intocloudquery:mainfrom
erezrokah:feat/add_resolver_transformer
Jan 5, 2023
Merged

feat: Add WithResolverTransformer#578
kodiakhq[bot] merged 4 commits intocloudquery:mainfrom
erezrokah:feat/add_resolver_transformer

Conversation

@erezrokah
Copy link
Copy Markdown
Member

Summary

For some plugins it's useful to configure a resolver based on the field's type:
https://github.com/cloudquery/cloudquery/blob/876cc163d6dff277bb09a5147162a8646fcd98de/plugins/source/gcp/codegen/main.go#L263

I don't use the default one from codegen package like others as it returns (string, error) and we want to return a schema.ColumnResolver instead


Use the following steps to ensure your PR is ready to be reviewed

  • Read the contribution guidelines 🧑‍🎓
  • Run go fmt to format your code 🖊
  • Lint your changes via golangci-lint run 🚨 (install golangci-lint here)
  • Update or add tests 🧪
  • Ensure the status checks below are successful ✅

@erezrokah erezrokah requested a review from yevgenypats as a code owner January 5, 2023 16:05
@github-actions github-actions bot added the feat label Jan 5, 2023
@github-actions
Copy link
Copy Markdown

github-actions bot commented Jan 5, 2023

⏱️ Benchmark results

  • DefaultConcurrencyDFS-2 resources/s: 11,849
  • DefaultConcurrencyRoundRobin-2 resources/s: 12,286
  • Glob-2 ns/op: 219.4
  • TablesWithChildrenDFS-2 resources/s: 24,613
  • TablesWithChildrenRoundRobin-2 resources/s: 26,001
  • TablesWithRateLimitingDFS-2 resources/s: 28.44
  • TablesWithRateLimitingRoundRobin-2 resources/s: 830.5
  • BufferedScanner-2 ns/op: 13.82
  • LogReader-2 ns/op: 39.84

@erezrokah
Copy link
Copy Markdown
Member Author

@kodiakhq kodiakhq bot merged commit 5aeba0e into cloudquery:main Jan 5, 2023
kodiakhq bot pushed a commit that referenced this pull request Jan 9, 2023
🤖 I have created a release *beep* *boop*
---


## [1.22.0](v1.21.0...v1.22.0) (2023-01-06)


### Features

* Add size in bytes to CQ types ([#510](#510)) ([7c15d9a](7c15d9a))
* Add WithIgnoreInTestsTransformer ([#579](#579)) ([f836abd](f836abd))
* Add WithResolverTransformer ([#578](#578)) ([5aeba0e](5aeba0e))

---
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 to cloudquery/cloudquery that referenced this pull request Jan 9, 2023

#### Summary

This PR removes code gen from GCP (it keeps only service discovery).
Blocked by cloudquery/plugin-sdk#578 and cloudquery/plugin-sdk#579.

While working on this PR I noticed a few cases where we configured the wrong PKs on tables. I'll fix those separately 

<!--
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants