diff --git a/tools/internal_ci/linux/grpc_build_submodule_at_head.sh b/tools/internal_ci/linux/grpc_build_submodule_at_head.sh index 92df3390ead..fe2844891c7 100755 --- a/tools/internal_ci/linux/grpc_build_submodule_at_head.sh +++ b/tools/internal_ci/linux/grpc_build_submodule_at_head.sh @@ -36,7 +36,6 @@ echo "This suite tests whether gRPC HEAD builds with HEAD of submodule '${SUBMOD echo "If a test breaks, either" echo "1) some change in the grpc repository has caused the failure" echo "2) some change that was just merged in the submodule head has caused the failure." - echo "" echo "submodule '${SUBMODULE_NAME}' is at commit: $(cd third_party/${SUBMODULE_NAME}; git rev-parse --verify HEAD)" echo "" @@ -51,8 +50,6 @@ case "$SUBMODULE_NAME" in ;; protobuf) BAZEL_DEP_NAME="com_google_protobuf" - # TODO(xuanwang-amos): Remove the following once python test gets fixed for protobuf-at-head test. - EXTRA_EXCLUDE_FILTER="python" ;; esac if [ -z "$BAZEL_DEP_NAME" ] @@ -90,4 +87,4 @@ tools/buildgen/generate_projects.sh git add -A git -c user.name='foo' -c user.email='foo@google.com' commit -m 'Update submodule' --allow-empty -tools/run_tests/run_tests_matrix.py -f linux --exclude c sanity basictests_arm64 openssl dbg $EXTRA_EXCLUDE_FILTER --inner_jobs 16 -j 2 --build_only +tools/run_tests/run_tests_matrix.py -f linux --exclude c sanity basictests_arm64 openssl dbg --inner_jobs 16 -j 2 --build_only diff --git a/tools/run_tests/helper_scripts/build_python.sh b/tools/run_tests/helper_scripts/build_python.sh index f911af171d2..3dd4bd3c6c0 100755 --- a/tools/run_tests/helper_scripts/build_python.sh +++ b/tools/run_tests/helper_scripts/build_python.sh @@ -86,6 +86,19 @@ function toolchain() { fi } +# When we mount and reuse the existing repo from host machine inside docker +# container, the `tools/bazel.rc` file is shared to the docker container and +# the Bazel override written to `bazel.rc` from tools/.../grpc_build_submodule_at_head.sh +# (outside docker container) forces bazel to look for the same host location +# inside the docker container, which doesn't exist. +# Hence overriding it again with the working directory inside the container +# should solve this issue +BAZEL_DEP_PATH="$(pwd)/third_party/protobuf" +BAZEL_DEP_NAME="com_google_protobuf" +echo "bazel override_repository is set for ${BAZEL_DEP_NAME} to ${BAZEL_DEP_PATH}" +echo "build --override_repository=${BAZEL_DEP_NAME}=${BAZEL_DEP_PATH}" >> "tools/bazel.rc" +echo "query --override_repository=${BAZEL_DEP_NAME}=${BAZEL_DEP_PATH}" >> "tools/bazel.rc" + #################### # Script Arguments # ####################