Skip to content

feat(transformers): Add support for net.IP#595

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

feat(transformers): Add support for net.IP#595
kodiakhq[bot] merged 4 commits intocloudquery:mainfrom
erezrokah:feat/handle_net_ip

Conversation

@erezrokah
Copy link
Copy Markdown
Member

Summary

A follow up to cloudquery/cloudquery#6588 where net.IP was resolved to TypeByteArray by the SDK and we had to manually configure it cloudquery/cloudquery@0ccf23b


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 ✅

@github-actions
Copy link
Copy Markdown

github-actions bot commented Jan 10, 2023

⏱️ Benchmark results

Comparing with 506d4cc

  • DefaultConcurrencyDFS-2 resources/s: 10,618 ⬇️ 3.43% decrease vs. 506d4cc
  • DefaultConcurrencyRoundRobin-2 resources/s: 10,823 ⬇️ 0.91% decrease vs. 506d4cc
  • Glob-2 ns/op: 185.3 ⬇️ 2.70% decrease vs. 506d4cc
  • TablesWithChildrenDFS-2 resources/s: 29,091 ⬆️ 13.69% increase vs. 506d4cc
  • TablesWithChildrenRoundRobin-2 resources/s: 27,008 ⬇️ 0.22% decrease vs. 506d4cc
  • TablesWithRateLimitingDFS-2 resources/s: 28.31 ⬇️ 0.07% decrease vs. 506d4cc
  • TablesWithRateLimitingRoundRobin-2 resources/s: 805.3 ⬇️ 2.26% decrease vs. 506d4cc
  • BufferedScanner-2 ns/op: 11.42 ⬇️ 6.13% decrease vs. 506d4cc
  • LogReader-2 ns/op: 33.43 ⬇️ 3.47% decrease vs. 506d4cc

erezrokah and others added 2 commits January 11, 2023 12:10
Co-authored-by: candiduslynx <candiduslynx@users.noreply.github.com>

func defaultGoTypeToSchemaType(v reflect.Type) (schema.ValueType, error) {
// Non primitive types
if v == reflect.TypeOf(net.IP{}) {
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 it maybe go with time.Time under the struct case?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

In the switch it falls under reflect.Slice (it's a byte array), but it feels odd to check the kind then again the type

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.

Ah I see, yeah. Makes sense 👍

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


## [1.25.0](v1.24.2...v1.25.0) (2023-01-11)


### Features

* **docs:** Sort tables ([#599](#599)) ([8a3bfad](8a3bfad))
* **transformers:** Add support for `net.IP` ([#595](#595)) ([a420645](a420645))
* **transformers:** Add WithPrimaryKeys option ([#598](#598)) ([107006c](107006c))


### Bug Fixes

* Send resource validation errors to Sentry ([#601](#601)) ([5916516](5916516))

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants