grpc-go icon indicating copy to clipboard operation
grpc-go copied to clipboard

scripts: regenerate pbs with caching deps to a fixed tmp folder

Open arvindbr8 opened this issue 1 year ago • 1 comments

Fixes #7400

@dfawley I went with something that's more along the lines of option no.3 in the issue. Now the deps are installed in a "well-known" directory which is /tmp/grpc-go-tools. This will ensure not requiring to re-download all deps when running regenerate.

Changes:

install-protoc.sh

  1. Now requires an INSTALL_PATH to be specified
    • This is a behavior change. Previously INSTALL_PATH was optional and would put it in your GOBIN/GOPATH. We dont want to be polluting the users GO dir with non-golang binaries.
  2. Now checks if protoc in the required version is present in INSTALL_PATH and not $PATH

regenerate.sh

  1. Installs everything to /tmp/grpc-go-tools instead of mktmp
  2. Only download deps if not present
  3. Other shell linter changes

cc: @aranjans

RELEASE NOTES: none

arvindbr8 avatar Jul 12 '24 23:07 arvindbr8

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 81.47%. Comparing base (ecbb837) to head (4a49832). Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7409      +/-   ##
==========================================
- Coverage   81.47%   81.47%   -0.01%     
==========================================
  Files         350      350              
  Lines       26843    26846       +3     
==========================================
+ Hits        21871    21873       +2     
- Misses       3784     3785       +1     
  Partials     1188     1188              

see 19 files with indirect coverage changes

codecov[bot] avatar Jul 12 '24 23:07 codecov[bot]