Skip to content

Commit c2188a9

Browse files
olavloitelesv
andauthored
fix: default to PickFirstLoadBalancerProvider (GoogleCloudPlatform#2063)
The services/META-INF/io.grpc.LoadBalancerProvider file included by default in the jar with dependencies did not correspond with the default pick_first policy of AutoConfiguredLoadBalancerFactory. Fixes GoogleCloudPlatform#2061 Co-authored-by: Les Vogel <lesv@users.noreply.github.com>
1 parent b9a5132 commit c2188a9

3 files changed

Lines changed: 31 additions & 3 deletions

File tree

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.0.0"
2+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.0.0 http://maven.apache.org/xsd/assembly-2.0.0.xsd">
4+
<id>jar-with-dependencies</id>
5+
<formats>
6+
<format>jar</format>
7+
</formats>
8+
<includeBaseDirectory>false</includeBaseDirectory>
9+
<dependencySets>
10+
<dependencySet>
11+
<outputDirectory>/</outputDirectory>
12+
<useProjectArtifact>false</useProjectArtifact>
13+
<unpack>true</unpack>
14+
<unpackOptions>
15+
<excludes>
16+
<exclude>io.grpc.LoadBalancerProvider</exclude>
17+
</excludes>
18+
</unpackOptions>
19+
</dependencySet>
20+
</dependencySets>
21+
<fileSets>
22+
<fileSet>
23+
<directory>${project.build.outputDirectory}</directory>
24+
<outputDirectory>.</outputDirectory>
25+
</fileSet>
26+
</fileSets>
27+
</assembly>

spanner/cloud-client/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,9 @@ limitations under the License.
146146
<artifactId>maven-assembly-plugin</artifactId>
147147
<version>3.2.0</version>
148148
<configuration>
149-
<descriptorRefs>
150-
<descriptorRef>jar-with-dependencies</descriptorRef>
151-
</descriptorRefs>
149+
<descriptors>
150+
<descriptor>assembly-descriptor.xml</descriptor>
151+
</descriptors>
152152
<archive>
153153
<manifest>
154154
<mainClass>com.example.spanner.SpannerSample</mainClass>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
io.grpc.internal.PickFirstLoadBalancerProvider

0 commit comments

Comments
 (0)