fix(types-inet): Align logic with scalar package, set net.IPNet IP field after parsing ParseCIDR#982
Merged
kodiakhq[bot] merged 4 commits intocloudquery:mainfrom Jul 12, 2023
Conversation
disq
approved these changes
Jun 23, 2023
⏱️ 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. |
Contributor
candiduslynx
left a comment
There was a problem hiding this comment.
not sure if that's required
candiduslynx
approved these changes
Jun 26, 2023
Member
|
I think it's a good time to merge this, before the final v4 release. @yevgenypats |
yevgenypats
approved these changes
Jul 12, 2023
kodiakhq bot
pushed a commit
that referenced
this pull request
Jul 12, 2023
🤖 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).
kodiakhq bot
pushed a commit
to cloudquery/cloudquery
that referenced
this pull request
Jul 15, 2023
#### 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 <!--
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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)