-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
api: protoxform tool and API reformat. #8309
Conversation
This patch introduces a new tool, protoxform, that will be the basis of the v2 -> v3 migration tooling. It operates as a Python protoc plugin, within the same framework as protodoc, and provides the ability to operate on protoc AST input and generate proto output. As a first step, the tool is applied reflexively on v2, and functions as a formatting tool. In later patches, this will be added to check_format/fix_format scripts and CI. Risk level: medium (it's possible that some inadvertent wire changes occur, if they do, this patch should be rolled back). Testing: manual inspection of diff, bazel test //test/..., some grep/diff scripts to ensure we haven't lost any comments. Signed-off-by: Harvey Tuch <htuch@google.com>
@@ -0,0 +1,405 @@ | |||
# protoc plugin to map from FileDescriptorProtos to a canonicaly formatted |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything in api/
is generated by protoxform
. The actual tooling deltas are in tool/
.
/checkowners! |
CC @envoyproxy/api-shepherds: Your approval is needed for changes made to |
Signed-off-by: Harvey Tuch <htuch@google.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is very impressive. TBH I mostly just skimmed the automated changes and the script, and just called out thing that I saw. Nothing is a crisis so up to you whether you want to action here or in follow ups.
Signed-off-by: Harvey Tuch <htuch@google.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
Via ./api/migration/v3alpha.sh. This picks up the changes since the last sync, in particular the major reformat in envoyproxy#8309. Risk level: Low (not used yet). Testing: bazel build @envoy_api//... Signed-off-by: Harvey Tuch <htuch@google.com>
Via ./api/migration/v3alpha.sh. This picks up the changes since the last sync, in particular the major reformat in #8309. Risk level: Low (not used yet). Testing: bazel build @envoy_api//... Signed-off-by: Harvey Tuch <htuch@google.com>
This patch introduces a new tool, protoxform, that will be the basis of the v2 -> v3 migration tooling. It operates as a Python protoc plugin, within the same framework as protodoc, and provides the ability to operate on protoc AST input and generate proto output. As a first step, the tool is applied reflexively on v2, and functions as a formatting tool. In later patches, this will be added to check_format/fix_format scripts and CI. Part of envoyproxy#8082. Risk level: medium (it's possible that some inadvertent wire changes occur, if they do, this patch should be rolled back). Testing: manual inspection of diff, bazel test //test/..., some grep/diff scripts to ensure we haven't lost any comments. Signed-off-by: Harvey Tuch <htuch@google.com>
This patch introduces a new tool, protoxform, that will be the basis of the v2 -> v3 migration tooling. It operates as a Python protoc plugin, within the same framework as protodoc, and provides the ability to operate on protoc AST input and generate proto output. As a first step, the tool is applied reflexively on v2, and functions as a formatting tool. In later patches, this will be added to check_format/fix_format scripts and CI. Part of envoyproxy#8082. Risk level: medium (it's possible that some inadvertent wire changes occur, if they do, this patch should be rolled back). Testing: manual inspection of diff, bazel test //test/..., some grep/diff scripts to ensure we haven't lost any comments. Signed-off-by: Harvey Tuch <htuch@google.com>
envoyproxy#8309 and envoyproxy#8100 collided Risk Level: Low (cleanup) Signed-off-by: Alyssa Wilk <alyssar@chromium.org>
Via ./api/migration/v3alpha.sh. This picks up the changes since the last sync, in particular the major reformat in envoyproxy#8309. Risk level: Low (not used yet). Testing: bazel build @envoy_api//... Signed-off-by: Harvey Tuch <htuch@google.com>
This patch introduces a new tool, protoxform, that will be the basis of the v2 -> v3 migration tooling. It operates as a Python protoc plugin, within the same framework as protodoc, and provides the ability to operate on protoc AST input and generate proto output. As a first step, the tool is applied reflexively on v2, and functions as a formatting tool. In later patches, this will be added to check_format/fix_format scripts and CI. Part of envoyproxy#8082. Risk level: medium (it's possible that some inadvertent wire changes occur, if they do, this patch should be rolled back). Testing: manual inspection of diff, bazel test //test/..., some grep/diff scripts to ensure we haven't lost any comments. Signed-off-by: Harvey Tuch <htuch@google.com>
This patch introduces a new tool, protoxform, that will be the basis of
the v2 -> v3 migration tooling. It operates as a Python protoc plugin,
within the same framework as protodoc, and provides the ability to
operate on protoc AST input and generate proto output.
As a first step, the tool is applied reflexively on v2, and functions as
a formatting tool. In later patches, this will be added to
check_format/fix_format scripts and CI.
Part of #8082.
Risk level: medium (it's possible that some inadvertent wire changes
occur, if they do, this patch should be rolled back).
Testing: manual inspection of diff, bazel test //test/..., some
grep/diff scripts to ensure we haven't lost any comments.
Signed-off-by: Harvey Tuch htuch@google.com