Skip to content

[v25.1.x] CORE-15421: add protovalidate as well-known type#29419

Closed
michael-redpanda wants to merge 1 commit into
v25.1.xfrom
manual-backport-29404-v25.1.x-726
Closed

[v25.1.x] CORE-15421: add protovalidate as well-known type#29419
michael-redpanda wants to merge 1 commit into
v25.1.xfrom
manual-backport-29404-v25.1.x-726

Conversation

@michael-redpanda
Copy link
Copy Markdown
Contributor

Backport of PR #29404

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR backports support for protovalidate as a well-known type in Redpanda's schema registry. The change enables the schema registry to recognize and handle buf/validate protobuf imports without requiring explicit references.

Changes:

  • Added protovalidate as a Bazel dependency
  • Registered buf.validate.Rule as a known protobuf type in the schema registry
  • Added comprehensive test coverage for protovalidate functionality

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
MODULE.bazel Adds protovalidate v1.0.0 as a new Bazel dependency
src/v/pandaproxy/BUILD Adds protovalidate proto library to pandaproxy dependencies
src/v/pandaproxy/schema_registry/protobuf.cc Registers buf::validate::Rule as a known type and includes the validate.pb.h header
src/v/pandaproxy/schema_registry/test/compatibility_protobuf.cc Extends compatibility tests with buf/validate field types
tests/rptest/tests/schema_registry_test.py Adds Python test case validating protovalidate schema registration and retrieval

@michael-redpanda michael-redpanda marked this pull request as ready for review January 27, 2026 12:55
@michael-redpanda
Copy link
Copy Markdown
Contributor Author

Conflicts:

  • MODULE.bazel.lock
  • There is no pandaproxy/schema_registry/BUILD in v25.1.x

Add buf/validate/validate.proto as a well-known type in schema registry
so that schemas importing protovalidate validation rules can be
registered without explicitly providing references.

Changes:
- Add protovalidate bazel dependency (version 1.0.0)
- Add validate_proto_cc to schema_registry:core implementation_deps
- Include buf/validate/validate.pb.h and add to known_types set
- Add unit test coverage in test_protobuf_well_known
- Add integration test in schema_registry_test.py

Signed-off-by: Michael Boquard <michael@redpanda.com>
(cherry picked from commit 4cbe872)
@michael-redpanda michael-redpanda force-pushed the manual-backport-29404-v25.1.x-726 branch from 24e0a2f to 0aa7d36 Compare January 27, 2026 18:23
Copy link
Copy Markdown
Contributor

@rockwotj rockwotj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

25.1 doesn't use bazel so I just don't think this is worth backporting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/build area/redpanda kind/backport PRs targeting a stable branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[v25.1.x] CORE-15421: add protovalidate as well-known type

3 participants