Skip to content

Commit

Permalink
Upgrade grpc-java to 1.45.1 and 1/3 for grpc to 1.45.0
Browse files Browse the repository at this point in the history
  • Loading branch information
vpanta committed Mar 31, 2022
1 parent a08d35f commit 10e5445
Show file tree
Hide file tree
Showing 21 changed files with 769 additions and 839 deletions.
20 changes: 11 additions & 9 deletions third_party/grpc/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ licenses(["notice"]) # Apache v2

exports_files([
"grpc_1.41.0.patch",
"grpc_1.41.0.win_arm64.patch"
"grpc_1.41.0.win_arm64.patch",
"grpc_1.45.0.patch",
"grpc_1.45.0.win_arm64.patch",
])

package(default_visibility = ["//visibility:public"])
Expand All @@ -35,14 +37,14 @@ filegroup(
distrib_jar_filegroup(
name = "bootstrap-grpc-jars",
srcs = [
"grpc-api-1.41.0.jar",
"grpc-auth-1.41.0.jar",
"grpc-context-1.41.0.jar",
"grpc-core-1.41.0.jar",
"grpc-netty-1.41.0.jar",
"grpc-protobuf-1.41.0.jar",
"grpc-protobuf-lite-1.41.0.jar",
"grpc-stub-1.41.0.jar",
"grpc-api-1.45.0.jar",
"grpc-auth-1.45.0.jar",
"grpc-context-1.45.0.jar",
"grpc-core-1.45.0.jar",
"grpc-netty-1.45.0.jar",
"grpc-protobuf-1.45.0.jar",
"grpc-protobuf-lite-1.45.0.jar",
"grpc-stub-1.45.0.jar",
],
enable_distributions = ["debian"],
)
Expand Down
79 changes: 50 additions & 29 deletions third_party/grpc/NOTICE.txt
Original file line number Diff line number Diff line change
@@ -1,31 +1,16 @@
Copyright 2014, Google Inc. All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.

* Neither the name of Google Inc. nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Copyright 2014 The gRPC Authors

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

-----------------------------------------------------------------------

Expand All @@ -38,4 +23,40 @@ at:
* HOMEPAGE:
* https://github.com/square/okhttp
* LOCATION_IN_GRPC:
* okhttp/third_party/okhttp
* okhttp/third_party/okhttp

This product contains a modified portion of 'Envoy', an open source
cloud-native high-performance edge/middle/service proxy, which can be
obtained at:

* LICENSE:
* xds/third_party/envoy/LICENSE (Apache License 2.0)
* NOTICE:
* xds/third_party/envoy/NOTICE
* HOMEPAGE:
* https://www.envoyproxy.io
* LOCATION_IN_GRPC:
* xds/third_party/envoy

This product contains a modified portion of 'protoc-gen-validate (PGV)',
an open source protoc plugin to generate polyglot message validators,
which can be obtained at:

* LICENSE:
* xds/third_party/protoc-gen-validate/LICENSE (Apache License 2.0)
* NOTICE:
* xds/third_party/protoc-gen-validate/NOTICE
* HOMEPAGE:
* https://github.com/envoyproxy/protoc-gen-validate
* LOCATION_IN_GRPC:
* xds/third_party/protoc-gen-validate

This product contains a modified portion of 'udpa',
an open source universal data plane API, which can be obtained at:

* LICENSE:
* xds/third_party/udpa/LICENSE (Apache License 2.0)
* HOMEPAGE:
* https://github.com/cncf/udpa
* LOCATION_IN_GRPC:
* xds/third_party/udpa
22 changes: 0 additions & 22 deletions third_party/grpc/PATENTS

This file was deleted.

15 changes: 10 additions & 5 deletions third_party/grpc/README.bazel.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,32 @@
| Repo | Current | Upgrading To |
| ---------------- | --------- | ------------ |
| `grpc/grpc` | `v1.41.0` | `v1.45.0` |
| `grpc/grpc-java` | `v1.41.0` | `v1.45.1` |

# 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.41.0.tar.gz
https://github.com/grpc/grpc/archive/v1.45.0.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.41.0`, commithash `fc662b7964384b701af5bd3ce6994d2180080eb4`)
2. `git checkout <tag>` (current is `v1.45.0`, commithash `494b08ada4009ead0d0b70e44d354be72f9c283a`)
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.41.0.patch`
`patch -p3 < bazel_1.45.0.patch`

# How to update the Java plugin:

1. Checkout tag `v1.41.0` from https://github.com/grpc/grpc-java
1. Checkout tag `v1.45.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.41.0` from maven central.
Download the necessary jars at version `1.45.1` from maven central.

# Submitting the change needs 3 pull requests

Expand Down
Loading

0 comments on commit 10e5445

Please sign in to comment.