Skip to content

feat: Add Support for net.IP in Faker#445

Merged
kodiakhq[bot] merged 6 commits intocloudquery:mainfrom
bbernays:faker-net-ip-support
Dec 5, 2022
Merged

feat: Add Support for net.IP in Faker#445
kodiakhq[bot] merged 6 commits intocloudquery:mainfrom
bbernays:faker-net-ip-support

Conversation

@bbernays
Copy link
Copy Markdown
Contributor

@bbernays bbernays commented Nov 30, 2022

Summary

The Gitlab Plugin I am working on has net.IP fields... existing implementation does not produce a valid IP address so needs explicit support


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 github-actions bot added the feat label Nov 30, 2022
@github-actions
Copy link
Copy Markdown

github-actions bot commented Nov 30, 2022

⏱️ Benchmark results

  • DefaultConcurrency-2 resources/s: 11,513
  • Glob-2 ns/op: 157.8
  • TablesWithChildrenDefaultConcurrency-2 resources/s: 30,918
  • BufferedScanner-2 ns/op: 9.38
  • LogReader-2 ns/op: 30.73

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.

Thanks @bbernays, added 2 comments.
Can you also link to which mock test faking an IP is required?

@github-actions github-actions bot added feat and removed feat labels Nov 30, 2022
@bbernays bbernays marked this pull request as ready for review November 30, 2022 14:18
Co-authored-by: Erez Rokah <erezrokah@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

@yevgenypats yevgenypats left a comment

Choose a reason for hiding this comment

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

doesn't that produce a valid IP only for for slice? what about map, ptr or just field in struct ?

@yevgenypats
Copy link
Copy Markdown
Contributor

Or maybe I miss something as seems the tests does pass? didn't touch that code for a while....

@bbernays
Copy link
Copy Markdown
Contributor Author

bbernays commented Dec 2, 2022

doesn't that produce a valid IP only for for slice? what about map, ptr or just field in struct ?

net.IP is defined as as a type IP []byte slice so we only have to handle that one special type of slice

@github-actions github-actions bot added feat and removed feat labels Dec 2, 2022
@kodiakhq kodiakhq bot merged commit 2deced1 into cloudquery:main Dec 5, 2022
@bbernays bbernays deleted the faker-net-ip-support branch December 5, 2022 15:39
kodiakhq bot pushed a commit that referenced this pull request Dec 6, 2022
🤖 I have created a release *beep* *boop*
---


## [1.11.0](v1.10.0...v1.11.0) (2022-12-05)


### Features

* Add Support for net.IP in Faker ([#445](#445)) ([2deced1](2deced1))


### Bug Fixes

* **deps:** Update golang.org/x/exp digest to 6ab00d0 ([#449](#449)) ([b981e33](b981e33))
* **deps:** Update module github.com/avast/retry-go/v4 to v4.3.1 ([#450](#450)) ([e4116f1](e4116f1))
* **deps:** Update module google.golang.org/grpc to v1.51.0 ([#451](#451)) ([538211c](538211c))
* Don't log start-and-finish of relational tables ([#459](#459)) ([4d6eeca](4d6eeca))
* Sync Metrics for Long running plugins ([#455](#455)) ([3fecc61](3fecc61))
* TablesForSpec should only return top-level tables ([#456](#456)) ([ab7ca97](ab7ca97))

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

3 participants