Skip to content

Commit

Permalink
Add section about gRPC version conflicts to README (#53)
Browse files Browse the repository at this point in the history
* Add section about gRPC version conflicts to README

* Fix
  • Loading branch information
justinuang authored and igorbernstein2 committed Oct 30, 2019
1 parent f355230 commit e5a7b0f
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
29 changes: 29 additions & 0 deletions README.md
Expand Up @@ -162,6 +162,8 @@ try {
}
```

TIP: If you are experiencing version conflicts with gRPC, see [Version Conflicts](#version-conflicts).

## OpenCensus Tracing

Cloud Bigtable client supports [OpenCensus Tracing](https://opencensus.io/tracing/),
Expand Down Expand Up @@ -318,6 +320,33 @@ StackdriverStatsExporter.createAndRegister(
BigtableDataSettings.enableOpenCensusStats();
```

## Version Conflicts

google-cloud-bigtable depends on gRPC directly which may conflict with the versions brought
in by other libraries, for example Apache Beam. This happens because internal dependencies
between gRPC libraries are pinned to an exact version of grpc-core
(see [here](https://github.com/grpc/grpc-java/commit/90db93b990305aa5a8428cf391b55498c7993b6e)).
If both google-cloud-bigtable and the other library bring in two gRPC libraries that depend
on the different versions of grpc-core, then dependency resolution will fail.
The easiest way to fix this is to depend on the gRPC bom, which will force all the gRPC
transitive libraries to use the same version.

Add the following to your project's pom.xml.

```
<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-bom</artifactId>
<version>1.24.1</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
```

## Troubleshooting

To get help, follow the instructions in the [shared Troubleshooting
Expand Down
1 change: 1 addition & 0 deletions pom.xml
Expand Up @@ -158,6 +158,7 @@
<google.api-common.version>1.8.1</google.api-common.version>
<google.common-protos.version>1.17.0</google.common-protos.version>
<google.core.version>1.91.3</google.core.version>
<!-- make sure to update the grpc version in README -->
<grpc.version>1.24.1</grpc.version>
<guava.version>28.1-android</guava.version>
<opencensus.version>0.24.0</opencensus.version>
Expand Down

0 comments on commit e5a7b0f

Please sign in to comment.