cncf / cncf/xds

Migrate to protovalidate

Open
#146 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Starlark
Stars
271
Forks
85
PR merge metrics
No merged PRs in 30d

Description

Figured it's worth filing the xds-side issue for https://github.com/envoyproxy/envoy/issues/32124 which I couldn't find here

xDS uses protoc-gen-validate, which is deprecated and not getting any real development. New languages / runtimes (i.e. buffa in rust) will likely get protovalidate implementations and not pgv. So to be forward-compatible without a dependency on effectively abandonware, xDS likely should migrate proactively.

There have been some attempts like #140 and #124. I think there is reasonable hesitation because it is a big change, notably it forces any downstream to migrate to protovalidate right away with no grace period. I would recommend giving some time for downstreams to migrate.

1. Add protovalidate annotations alongside the current pgv annotations with appropriate dependency additions for bazel, etc of the proto. Note, adding protovalidate annotations does not imply downstreams have to immediately add a protovalidate runtime dependency. The annotation is inert until they do so.
3. Wait some months maintainers feel is fair to allow downstreams to migrate, e.g. whatever envoy generally uses for easier flips
4. Remove pgv annotations / gencode, tooling

The main downside is that for some time, double annotations would need to be maintained when operating on the protos. Looking through recent commits, the protos seem fairly stable, so maybe this isn't that big of a deal.

/cc @phlax @mmorel-35

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reviewing the prior attempts in issues #140 and #124, the Envoy issue 32124, and the xDS proto and Bazel dependency changes involved. Map the current protoc-gen-validate annotations, generated code, and tooling before proposing the staged migration. Done means protovalidate annotations and dependencies are added, downstream migration time is allowed, and the pgv annotations, generated code, and tooling are removed.

Written by the indexing model from the issue text.

Assessment

Domain
api, build-system, tooling
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.