Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump grpc to 1.33.1 to fix corruption when downloading CAS blobs #13055

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions distdir_deps.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -121,16 +121,16 @@ DIST_DEPS = {
],
},
"com_github_grpc_grpc": {
"archive": "v1.32.0.tar.gz",
"sha256": "f880ebeb2ccf0e47721526c10dd97469200e40b5f101a0d9774eb69efa0bd07a",
"strip_prefix": "grpc-1.32.0",
"archive": "v1.33.1.tar.gz",
"sha256": "58eaee5c0f1bd0b92ebe1fa0606ec8f14798500620e7444726afcaf65041cb63",
"strip_prefix": "grpc-1.33.1",
"urls": [
"https://mirror.bazel.build/github.com/grpc/grpc/archive/v1.32.0.tar.gz",
"https://github.com/grpc/grpc/archive/v1.32.0.tar.gz",
"https://mirror.bazel.build/github.com/grpc/grpc/archive/v1.33.1.tar.gz",
"https://github.com/grpc/grpc/archive/v1.33.1.tar.gz",
],
"patch_args": ["-p1"],
"patches": [
"//third_party/grpc:grpc_1.32.0.patch",
"//third_party/grpc:grpc_1.33.1.patch",
],
"used_in": [
"additional_distfiles",
Expand Down
2 changes: 1 addition & 1 deletion scripts/bootstrap/compile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ fi
GOOGLE_API_PROTOS="$(grep -o '".*\.proto"' third_party/googleapis/BUILD.bazel | sed 's/"//g' | sed 's|^|third_party/googleapis/|g')"
PROTO_FILES=$(find third_party/remoteapis ${GOOGLE_API_PROTOS} third_party/pprof src/main/protobuf src/main/java/com/google/devtools/build/lib/buildeventstream/proto src/main/java/com/google/devtools/build/skyframe src/main/java/com/google/devtools/build/lib/skyframe/proto src/main/java/com/google/devtools/build/lib/bazel/debug src/main/java/com/google/devtools/build/lib/starlarkdebug/proto src/main/java/com/google/devtools/build/lib/packages/metrics/package_metrics.proto -name "*.proto")
LIBRARY_JARS=$(find $ADDITIONAL_JARS third_party -name '*.jar' | grep -Fv JavaBuilder | grep -Fv third_party/guava/guava | grep -ve 'third_party/grpc/grpc.*jar' | tr "\n" " ")
GRPC_JAVA_VERSION=1.32.2
GRPC_JAVA_VERSION=1.33.1
GRPC_LIBRARY_JARS=$(find third_party/grpc -name '*.jar' | grep -e ".*${GRPC_JAVA_VERSION}.*jar" | tr "\n" " ")
GUAVA_VERSION=29.0
GUAVA_JARS=$(find third_party/guava -name '*.jar' | grep -e ".*${GUAVA_VERSION}.*jar" | tr "\n" " ")
Expand Down
18 changes: 9 additions & 9 deletions third_party/grpc/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ load("//tools/distributions:distribution_rules.bzl", "distrib_java_import", "dis

licenses(["notice"]) # Apache v2

exports_files(["grpc_1.32.0.patch"])
exports_files(["grpc_1.33.1.patch"])

package(default_visibility = ["//visibility:public"])

Expand All @@ -32,14 +32,14 @@ filegroup(
distrib_jar_filegroup(
name = "bootstrap-grpc-jars",
srcs = [
"grpc-api-1.32.2.jar",
"grpc-auth-1.32.2.jar",
"grpc-context-1.32.2.jar",
"grpc-core-1.32.2.jar",
"grpc-netty-1.32.2.jar",
"grpc-protobuf-1.32.2.jar",
"grpc-protobuf-lite-1.32.2.jar",
"grpc-stub-1.32.2.jar",
"grpc-api-1.33.1.jar",
"grpc-auth-1.33.1.jar",
"grpc-context-1.33.1.jar",
"grpc-core-1.33.1.jar",
"grpc-netty-1.33.1.jar",
"grpc-protobuf-1.33.1.jar",
"grpc-protobuf-lite-1.33.1.jar",
"grpc-stub-1.33.1.jar",
],
enable_distributions = ["debian"],
)
Expand Down
12 changes: 6 additions & 6 deletions third_party/grpc/README.bazel.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
# How to update the C++ sources of gRPC:

1. Update the gRPC definitions in WORKSPACE file, currently we use
https://github.com/grpc/grpc/archive/v1.32.2.tar.gz
https://github.com/grpc/grpc/archive/v1.33.1.tar.gz
2. Update the gRPC patch file if necessary, it mostly helps avoid unnecessary dependencies.
3. Update third_party/grpc/BUILD to redirect targets to @com_github_grpc_grpc if necessary.

# How to update the BUILD/bzl sources of gRPC:

1. `git clone http://github.com/grpc/grpc.git` in a convenient directory
2. `git checkout <tag>` (current is `v1.32.0`, commithash `414bb8322d`)
2. `git checkout <tag>` (current is `v1.33.1`, commithash `054ff69350`)
3. `mkdir -p third_party/grpc/bazel`
4. `cp <gRPC git tree>/bazel/{BUILD,cc_grpc_library.bzl,generate_cc.bzl,protobuf.bzl} third_party/grpc/bazel`
5. In the `third_party/grpc` directory, apply local patches:
`patch -p3 < bazel_1.32.0.patch`
`patch -p3 < bazel_1.33.1.patch`

# How to update the Java plugin:

1. Checkout tag `v1.32.2` from https://github.com/grpc/grpc-java
1. Checkout tag `v1.33.1` from https://github.com/grpc/grpc-java
2. `cp -R <grpc-java git tree>/compiler/src/java_plugin third_party/grpc/compiler/src`

# How to update the Java code:

Download the necessary jars at version `1.32.2` from maven central.
Download the necessary jars at version `1.33.1` from maven central.

# Submitting the change needs 3 pull requests

1. Update third_party/grpc to include files from new version
2. Switch WORKSPACE, scripts/bootstrap/compile.sh and any other references to new version
2. Switch distdir_deps.bzl, scripts/bootstrap/compile.sh and any other references to new version
3. Remove older version from third_party/grpc
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ class LogHelper {
}
};

// Abort the program after logging the mesage if the given condition is not
// Abort the program after logging the message if the given condition is not
// true. Otherwise, do nothing.
#define GRPC_CODEGEN_CHECK(x) !(x) && LogHelper(&std::cerr).get_os() \
<< "CHECK FAILED: " << __FILE__ << ":" \
<< __LINE__ << ": "

// Abort the program after logging the mesage.
// Abort the program after logging the message.
#define GRPC_CODEGEN_FAIL GRPC_CODEGEN_CHECK(false)

namespace java_grpc_generator {
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File renamed without changes.