Add automation to enforce releaseChannel annotation on new proto fields#3682
Add automation to enforce releaseChannel annotation on new proto fields#3682gabriel9895 wants to merge 1 commit intoistio:masterfrom
Conversation
|
😊 Welcome @caoyukun0430! This is either your first contribution to the Istio api repo, or it's been You can learn more about the Istio working groups, Code of Conduct, and contribution guidelines Thanks for contributing! Courtesy of your friendly welcome wagon. |
|
|
|
Hi @caoyukun0430. Thanks for your PR. I'm waiting for a istio member to verify that this patch is reasonable to test. If it is, they should reply with Tip We noticed you've done this a few times! Consider joining the org to skip this step and gain Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
/ok-to-test |
|
This PR adds internal CI tooling (lint script + tests) with no user-facing changes — no API, proto, or behavior modifications. /release-notes-none |
|
/retest |
9196723 to
ad88cc6
Compare
Adds a lint check that ensures newly added proto fields include a +cue-gen:<APIName>:releaseChannel:extended annotation. Fixes istio#3147 Signed-off-by: Gabriel Cao <13051583793@yeah.net>
ad88cc6 to
bcc4746
Compare
Fixes #3147
Problem
Per GUIDELINES.md, new fields added to Istio
API protos must include a // +cue-gen::releaseChannel:extended comment annotation to indicate
they belong to the extended release channel before being promoted to stable. Currently this relies
entirely on reviewer memory — there is no automated enforcement.
Solution
A new lint script (scripts/check-release-channel.sh) that:
google.protobuf.Duration)
annotation
The check is diff-based rather than static because the vast majority of existing fields are already stable
and intentionally lack the annotation — only newly added fields require it.
Reason to write shell script
The annotation lives in proto comments, which are not preserved in compiled protobuf descriptors. A Go-
based approach would require a new source-level proto parser dependency. Shell is consistent with the
existing lint scripts in scripts/ (check-operator-proto.sh, check-imports.sh).
Integration
Added to local-lint-protos in Makefile.core.mk, so it runs automatically as part of make lint →
make presubmit in Prow CI.
Testing
Includes scripts/check-release-channel_test.sh with 8 test cases:
Files changed