Skip to content
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

Add isIpPrefix #99

Merged
merged 4 commits into from
Oct 30, 2023
Merged

Add isIpPrefix #99

merged 4 commits into from
Oct 30, 2023

Conversation

higebu
Copy link
Contributor

@higebu higebu commented Sep 28, 2023

@CLAassistant
Copy link

CLAassistant commented Sep 28, 2023

CLA assistant check
All committers have signed the CLA.

@rodaine
Copy link
Member

rodaine commented Oct 2, 2023

Hi @higebu! Thanks for taking the time to so thoroughly implement this. Have you had a chance to look at the previous discussion on including support for CIDR blocks in the linked issue?

@higebu
Copy link
Contributor Author

higebu commented Oct 3, 2023

Hi @rodaine! Thank you for taking a look. Sure. I'll check the issue.

@paina
Copy link

paina commented Oct 9, 2023

Hi @rodaine, @higebu.
I've PR-ed C++ implementation of isIpPrefix() as bufbuild/protovalidate-cc#45.
If it works, we will be able to use the validation with C++.

@rodaine
Copy link
Member

rodaine commented Oct 9, 2023

Looking good! Can you please add some conformance tests to ensure that they're correctly handling these new constraints?

You can either add this to the existing strings suite or create a new one specifically for this new rule.

@higebu higebu force-pushed the feat-ip-prefix branch 2 times, most recently from e9fa928 to 15f66ec Compare October 10, 2023 01:27
@higebu higebu marked this pull request as ready for review October 10, 2023 01:28
@higebu higebu force-pushed the feat-ip-prefix branch 2 times, most recently from f000d24 to 93b53fd Compare October 10, 2023 02:22
@higebu
Copy link
Contributor Author

higebu commented Oct 10, 2023

@rodaine Thank you for the guidance of conformance tests. I added some conformance tests and will fix protovalidate-xxx.

@higebu
Copy link
Contributor Author

higebu commented Oct 10, 2023

@rodaine I fixed protovalidate-python and protovalidate-java with conformance tests.
bufbuild/protovalidate-python#78 (comment)
bufbuild/protovalidate-java#39 (comment)

BTW, how to run protovalidate-conformance with protovalidate-go and protovalidate-cc? They seems to depends on bufbuild/protovalidate@v0.4.2, so I can't not test with development version of protovalidate.

@rodaine
Copy link
Member

rodaine commented Oct 30, 2023

Hey @higebu! Going to start merging these so you should be able to update the conformance tests for the libraries downstream.

@rodaine rodaine merged commit c4ad688 into bufbuild:main Oct 30, 2023
3 checks passed
rodaine added a commit that referenced this pull request Oct 30, 2023
rodaine added a commit to bufbuild/protovalidate-go that referenced this pull request Oct 30, 2023
Related to: bufbuild/protovalidate#99

---------

Co-authored-by: Chris Roche <github@rodaine.com>
rodaine added a commit to bufbuild/protovalidate-python that referenced this pull request Oct 31, 2023
Related to: bufbuild/protovalidate#99

---------

Co-authored-by: Chris Roche <github@rodaine.com>
pkwarren pushed a commit to bufbuild/protovalidate-java that referenced this pull request Nov 2, 2023
rodaine added a commit to bufbuild/protovalidate-cc that referenced this pull request Nov 7, 2023
Related to: bufbuild/protovalidate#99

Based on @higebu's idea on the PR, I've implemented `isIpPrefix()` for
C++.

---------

Co-authored-by: Chris Roche <github@rodaine.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request] CIDR Validation
4 participants