Skip to content

fix: Validate and normalize inet test values #2205

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

Merged
merged 2 commits into from
Jul 1, 2025
Merged

Conversation

bbernays
Copy link
Contributor

@bbernays bbernays commented Jun 30, 2025

Summary

The inet type, uses the net.ParseCIDR function which when returning the network, actually drop some of the details of the CIDR string that is passed in...

It returns the IP address and the network implied by the IP and prefix length. For example, ParseCIDR("192.0.2.1/24") returns the IP address 192.0.2.1 and the network 192.0.2.0/24.

This fix ensures that all inet values will be unchanged if they go through a read --> write --> read (like we do in the filetypes tests)

This issue was discovered in the filetypes tests where a value was written to a parquet file then read back into an arrow record where the inet builder normalized the data and when compared to the original record a difference was detected

@bbernays bbernays requested a review from a team as a code owner June 30, 2025 20:00
@bbernays bbernays requested a review from murarustefaan June 30, 2025 20:00
@github-actions github-actions bot added the fix label Jun 30, 2025
@github-actions github-actions bot added fix and removed fix labels Jun 30, 2025
@kodiakhq kodiakhq bot merged commit c9f45a2 into main Jul 1, 2025
10 checks passed
@kodiakhq kodiakhq bot deleted the fix-dynamic-inet branch July 1, 2025 07:44
kodiakhq bot pushed a commit that referenced this pull request Jul 1, 2025
🤖 I have created a release *beep* *boop*
---


## [4.86.1](v4.86.0...v4.86.1) (2025-07-01)


### Bug Fixes

* **deps:** Update dependency go to v1.24.4 ([#2209](#2209)) ([6b91b19](6b91b19))
* **deps:** Update golang.org/x/exp digest to b7579e2 ([#2207](#2207)) ([5970950](5970950))
* Validate and normalize inet test values ([#2205](#2205)) ([c9f45a2](c9f45a2))

---
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/filetypes that referenced this pull request Jul 1, 2025

Regenerates snapshots for tests now that the data is dynamic rather than hardcoded
Dependent on cloudquery/plugin-sdk#2205
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.

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy