Skip to content

Fixes for hostname, port, and enum validation #83

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 4 commits into from
Apr 8, 2025

Conversation

jchadwick-buf
Copy link
Member

@jchadwick-buf jchadwick-buf commented Apr 7, 2025

The previous PRs introduce unified validation for a couple of particularly challenging cases (IPv4/IPv6 addresses and URIs.) This PR is relatively light, since the existing validation functions in protovalidate-cc are already structured close to what they need to be. These adjustments are just meant to mirror what we are already doing in other implementations now, nothing too sophisticated.

For enum validation, all that was wrong was the message.

The only remaining failure is differences with strings.format which needs further investigation.

The previous PRs introduce unified validation for a couple of particularly challenging cases (IPv4/IPv6 addresses and URIs.) This PR is relatively light, since the existing validation functions in protovalidate-cc are already structured close to what they need to be.

For enum validation, all that was wrong was the message.

There are two more classes of conformance test failures:
- Bugs in the CEL string.format helper.
- A bug in v0.10.3 of the conformance test suite that set IGNORE_ALWAYS on some fields that shouldn't have it.

They will be addressed in future PRs, which should allow us to empty out expected_failures.yaml again.
@jchadwick-buf jchadwick-buf requested a review from smaye81 April 7, 2025 17:06
@jchadwick-buf jchadwick-buf marked this pull request as ready for review April 7, 2025 17:09
…nto jchadwick/host-port-enum-validation-fixes
@jchadwick-buf jchadwick-buf requested a review from Alfus April 8, 2025 16:01
@jchadwick-buf jchadwick-buf merged commit 7662321 into main Apr 8, 2025
10 checks passed
@jchadwick-buf jchadwick-buf deleted the jchadwick/host-port-enum-validation-fixes branch April 8, 2025 17:48
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.

2 participants