Repository navigation
metis: Refine update-proto.sh to enforce specific protoc version - #1069
Conversation
|
This issue is currently awaiting triage. If the repository mantainers determine this is a relevant issue, they will accept it by applying the The 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. |
|
Hi @arvindbr8. Thanks for your PR. I'm waiting for a kubernetes 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. |
| echo "protoc not found, installing locally..." | ||
| PROTOC_VERSION="34.1" | ||
| # Install protoc if not present or version mismatches | ||
| PROTOC_VERSION="34.1" |
There was a problem hiding this comment.
It looks protoc is quite stable, my local old ptotoc version generates the same code as protoc 34.1.
The prow CI environment always install protoc so we will detect immediately if there are ungenerated code.
I think one thing we need to automate/track is to update this protoc version.
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: arvindbr8, YifeiZhuang The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/ok-to-test |
I assume this is an oversight #1069 (comment) since it was already approved /hold cancel |
Description
This PR refines the
tools/update-proto.shscript to ensure reproducible protobuf code generation across different developer environments and CI.Currently, the script only installs
protocif it is completely missing from the host. If a developer has an older version ofprotocinstalled system-wide (e.g.,3.21.12), the script will use it, producing different generated code than the CI environment (which uses34.1).Key Changes
protocis installed, but also verify that its version matches the requestedPROTOC_VERSION(34.1)._tmp/bin, overriding the system version for the duration of the script.protoc-gen-goandprotoc-gen-go-grpcto ensure the latest versions of these generators are fetched viago installevery time.Verification Results
protocversion: The script successfully detected the mismatch, downloaded version34.1, and placed it in_tmp/bin..pb.gofiles now perfectly match what the CI expects, resolvingverify-up-to-datefailures./hold for reviews from @YifeiZhuang
/label tide/merge-method-squash