From f3955ba7119f8433fc6a0fba6cf1a075ea5a4f2a Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Thu, 21 Jun 2018 15:15:10 -0700 Subject: Update to use the canonical version of LB proto --- tools/distrib/check_copyright.py | 4 ++++ tools/distrib/check_include_guards.py | 2 ++ tools/distrib/check_nanopb_output.sh | 36 ++++++++++++++++++++++------------- 3 files changed, 29 insertions(+), 13 deletions(-) (limited to 'tools/distrib') diff --git a/tools/distrib/check_copyright.py b/tools/distrib/check_copyright.py index 09eecf471b..e6388251cf 100755 --- a/tools/distrib/check_copyright.py +++ b/tools/distrib/check_copyright.py @@ -77,6 +77,10 @@ _EXEMPT = frozenset(( 'examples/python/route_guide/route_guide_pb2_grpc.py', 'src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h', 'src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c', + 'src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/duration.pb.h', + 'src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/duration.pb.c', + 'src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/timestamp.pb.h', + 'src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/timestamp.pb.c', 'src/core/tsi/alts/handshaker/altscontext.pb.h', 'src/core/tsi/alts/handshaker/altscontext.pb.c', 'src/core/tsi/alts/handshaker/handshaker.pb.h', diff --git a/tools/distrib/check_include_guards.py b/tools/distrib/check_include_guards.py index b356a74d2d..56f48af56a 100755 --- a/tools/distrib/check_include_guards.py +++ b/tools/distrib/check_include_guards.py @@ -157,6 +157,8 @@ args = argp.parse_args() KNOWN_BAD = set([ 'src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h', + 'src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/duration.pb.h', + 'src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/timestamp.pb.h', 'src/core/tsi/alts/handshaker/altscontext.pb.h', 'src/core/tsi/alts/handshaker/handshaker.pb.h', 'src/core/tsi/alts/handshaker/transport_security_common.pb.h', diff --git a/tools/distrib/check_nanopb_output.sh b/tools/distrib/check_nanopb_output.sh index 8b5823b938..beb1f6b25c 100755 --- a/tools/distrib/check_nanopb_output.sh +++ b/tools/distrib/check_nanopb_output.sh @@ -41,21 +41,31 @@ make -j 8 # back to the root directory popd +## +## Checks for load_balancer.proto +## +#readonly LOAD_BALANCER_GRPC_OUTPUT_PATH='src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1' +## nanopb-compile the proto to a temp location +#./tools/codegen/core/gen_nano_proto.sh \ +# src/proto/grpc/lb/v1/load_balancer.proto \ +# "$NANOPB_TMP_OUTPUT" \ +# "$LOAD_BALANCER_GRPC_OUTPUT_PATH" # -# Checks for load_balancer.proto +#./tools/codegen/core/gen_nano_proto.sh \ +# third_party/protobuf/src/google/protobuf/duration.proto \ +# "$NANOPB_TMP_OUTPUT/google/protobuf" \ +# "$LOAD_BALANCER_GRPC_OUTPUT_PATH/google/protobuf" # -readonly LOAD_BALANCER_GRPC_OUTPUT_PATH='src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1' -# nanopb-compile the proto to a temp location -./tools/codegen/core/gen_nano_proto.sh \ - src/proto/grpc/lb/v1/load_balancer.proto \ - "$NANOPB_TMP_OUTPUT" \ - "$LOAD_BALANCER_GRPC_OUTPUT_PATH" - -# compare outputs to checked compiled code -if ! diff -r "$NANOPB_TMP_OUTPUT" src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1; then - echo "Outputs differ: $NANOPB_TMP_OUTPUT vs $LOAD_BALANCER_GRPC_OUTPUT_PATH" - exit 2 -fi +#./tools/codegen/core/gen_nano_proto.sh \ +# third_party/protobuf/src/google/protobuf/timestamp.proto \ +# "$NANOPB_TMP_OUTPUT/google/protobuf" \ +# "$LOAD_BALANCER_GRPC_OUTPUT_PATH/google/protobuf" +# +## compare outputs to checked compiled code +#if ! diff -r "$NANOPB_TMP_OUTPUT" src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1; then +# echo "Outputs differ: $NANOPB_TMP_OUTPUT vs $LOAD_BALANCER_GRPC_OUTPUT_PATH" +# exit 2 +#fi # # Checks for handshaker.proto and transport_security_common.proto -- cgit v1.2.3