build(grpc): update Makefile responsible for code generation #5749
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Allow protoc and the language-specific plugins to be installed at specific versions locally and then use those versions to generate code.
This means we no longer depend on arbitrary versions installed on the system doing the code generation, making this reproducible.
The installs happen in the
apis/tools
directory, if the required tools are not found. Python packages are installed in a virtual environment underapis/tools/python
In this first phase, we retain the exact same tool versions that were used to generate the existing protobuf/grpc code. We also apply the licensing headers to those generated files automatically.
Because of a previous mismatch in how those licensing headers were generated, most generated files end up with a minor whitespace difference.
[IMPORTANT]: The kotlin/java codegen for
apis/mlops/v2_dataplane/v2_dataplane.proto
had not been previously generated using the makefile (it seems it was generated as a one-off). This means the version of the codegen tools used was already mismatched compared to the rest. Consequently, this PR adds this code generation to the Makefile, and re-generates the code files in order to bring everything to a consistent version.Issue(s) related to this PR:
Comments for reviewer
apis/mlops/v2_dataplane/kotlin/*
are newly re-generated and contain non-whitespace differences