Skip to content

Commit

Permalink
Uses shaded netty in server jar to avoid downstream conflicts.
Browse files Browse the repository at this point in the history
gRPC uses Netty 4.1 and `netty-tcnative-boringssl-static`, which is
sensitive to Netty versions. DataStax Cassandra driver 4.0 uses Netty
4.1, but the driver isn't out, yet. By using the published shaded jar,
we can dodge the conflict for now.

I've verified that we can connect to google cloud services after this
change. I've also verified that there's no significant jar size change.

See https://github.com/grpc/grpc-java/blob/master/SECURITY.md#netty
See openzipkin/zipkin-gcp#45
  • Loading branch information
Adrian Cole authored and adriancole committed Nov 12, 2017
1 parent 76691dc commit f934861
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 12 deletions.
13 changes: 1 addition & 12 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -312,17 +312,6 @@
<version>${project.version}</version>
</dependency>

<!-- Needs to be defined here or else spring-boot-dependencies will override it -->
<dependency>
<groupId>com.datastax.cassandra</groupId>
<artifactId>cassandra-driver-core</artifactId>
<version>${cassandra-driver-core.version}</version>
</dependency>
<dependency>
<groupId>com.datastax.cassandra</groupId>
<artifactId>cassandra-driver-mapping</artifactId>
<version>${cassandra-driver-core.version}</version>
</dependency>
<dependency>
<groupId>org.jooq</groupId>
<artifactId>jooq</artifactId>
Expand Down Expand Up @@ -450,7 +439,7 @@
<build>
<pluginManagement>
<plugins>
<!-- mvn -N io.takari:maven:wrapper -Dmaven=3.5.0 -->
<!-- mvn -N io.takari:maven:wrapper -Dmaven=3.5.2 -->
<plugin>
<groupId>io.takari</groupId>
<artifactId>maven</artifactId>
Expand Down
5 changes: 5 additions & 0 deletions zipkin-collector/scribe/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@
<groupId>io.airlift</groupId>
<artifactId>configuration</artifactId>
</exclusion>
<exclusion>
<!-- interferes with netty-tcnative-boringssl-static versions -->
<groupId>com.facebook.nifty</groupId>
<artifactId>nifty-ssl</artifactId>
</exclusion>
</exclusions>
</dependency>

Expand Down
42 changes: 42 additions & 0 deletions zipkin-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,55 @@
<groupId>${project.groupId}</groupId>
<artifactId>zipkin-autoconfigure-storage-cassandra</artifactId>
<optional>true</optional>
<exclusions>
<exclusion>
<groupId>com.datastax.cassandra</groupId>
<artifactId>cassandra-driver-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- shaded to not interfere with netty 4.1 and boringssl. [JAVA-1241] -->
<dependency>
<groupId>com.datastax.cassandra</groupId>
<artifactId>cassandra-driver-core</artifactId>
<version>${cassandra-driver-core.version}</version>
<classifier>shaded</classifier>
<optional>true</optional>
<exclusions>
<exclusion>
<groupId>io.netty</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.datastax.cassandra</groupId>
<artifactId>cassandra-driver-mapping</artifactId>
<version>${cassandra-driver-core.version}</version>
<optional>true</optional>
<exclusions>
<exclusion>
<groupId>com.datastax.cassandra</groupId>
<artifactId>cassandra-driver-core</artifactId>
</exclusion>
</exclusions>
</dependency>

<!-- Cassandra 3 backend -->
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>zipkin-autoconfigure-storage-cassandra3</artifactId>
<optional>true</optional>
<exclusions>
<exclusion>
<groupId>com.datastax.cassandra</groupId>
<artifactId>cassandra-driver-core</artifactId>
</exclusion>
<exclusion>
<groupId>com.datastax.cassandra</groupId>
<artifactId>cassandra-driver-mapping</artifactId>
</exclusion>
</exclusions>
</dependency>

<!-- Elasticsearch http backend -->
Expand Down
1 change: 1 addition & 0 deletions zipkin-storage/cassandra/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
<dependency>
<groupId>com.datastax.cassandra</groupId>
<artifactId>cassandra-driver-core</artifactId>
<version>${cassandra-driver-core.version}</version>
</dependency>

<dependency>
Expand Down
2 changes: 2 additions & 0 deletions zipkin-storage/cassandra3/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,13 @@
<dependency>
<groupId>com.datastax.cassandra</groupId>
<artifactId>cassandra-driver-core</artifactId>
<version>${cassandra-driver-core.version}</version>
</dependency>

<dependency>
<groupId>com.datastax.cassandra</groupId>
<artifactId>cassandra-driver-mapping</artifactId>
<version>${cassandra-driver-core.version}</version>
</dependency>

<dependency>
Expand Down

0 comments on commit f934861

Please sign in to comment.