-
Notifications
You must be signed in to change notification settings - Fork 24
fix(types-inet): Align logic with scalar package, set net.IPNet IP field after parsing ParseCIDR
#982
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(types-inet): Align logic with scalar package, set net.IPNet IP field after parsing ParseCIDR
#982
Conversation
⏱️ Benchmark resultsComparing with 097621f
|
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #982 +/- ##
==========================================
+ Coverage 47.24% 47.27% +0.02%
==========================================
Files 82 82
Lines 7708 7713 +5
==========================================
+ Hits 3642 3646 +4
- Misses 3732 3733 +1
Partials 334 334
☔ View full report in Codecov by Sentry. |
candiduslynx
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure if that's required
|
I think it's a good time to merge this, before the final v4 release. @yevgenypats |
🤖 I have created a release *beep* *boop* --- ## [4.0.0](v4.8.1-rc1...v4.0.0) (2023-07-12) ### Bug Fixes * **deps:** Update github.com/cloudquery/arrow/go/v13 digest to 0a52533 ([#1083](#1083)) ([0370294](0370294)) * **deps:** Update github.com/cloudquery/arrow/go/v13 digest to a2a76eb ([#1084](#1084)) ([26df75f](26df75f)) * **types-inet:** Align logic with scalar package, set `net.IPNet` `IP` field after parsing `ParseCIDR` ([#982](#982)) ([fa07032](fa07032)) * Use background ctx in batchwriter worker ([#1079](#1079)) ([dea8168](dea8168)) ### Miscellaneous Chores * release 4.0.0 ([a80ee69](a80ee69)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
#### Summary Similar to #11696. ~~I had to comment change some of the tests due to cloudquery/plugin-sdk#982 and cloudquery/plugin-sdk#915 (comment), so not ready to merge~~ BEGIN_COMMIT_OVERRIDE feat!: Upgrades the postgresql source plugin to use plugin-sdk v4. This version does not contain any user-facing breaking changes, but because it is now using CloudQuery gRPC protocol v3, it does require use of a destination plugin that also supports protocol v3. All recent destination plugin versions support this. feat!: To enable CDC in this version you'll need to use the `cdc_id` configuration string property, instead of the `cdc` boolean one. Please refer to the [docs](https://www.cloudquery.io/docs/plugins/sources/postgresql/overview) for more information END_COMMIT_OVERRIDE <!--
Summary
Discovered this while working on the PostgreSQL source v4 migration.
When we set string values to the
inetscalar we set theIPfield on the resultingnet.IPNet:plugin-sdk/scalar/inet.go
Line 85 in 097621f
However the
inetarrow type loses that information when returning the value:plugin-sdk/types/inet.go
Line 159 in 097621f
This means that if you create an arrow
inettype from the string192.168.0.1/24, then callValueStryou get back192.168.0.0/24This PR sets the IP data on the resulting
net.IPNetso it is not lostUse the following steps to ensure your PR is ready to be reviewed
go fmtto format your code 🖊golangci-lint run🚨 (install golangci-lint here)