Skip to content

Commit 9174c16

Browse files
committed
Just avoid setting client version header if it hasn't been parsed properly
1 parent fcd2ccb commit 9174c16

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

temporal-serviceclient/src/main/java/io/temporal/serviceclient/ChannelManager.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,11 @@ private Channel applyTailStandardInterceptors(Channel channel) {
145145
private Channel applyHeadStandardInterceptors(Channel channel) {
146146
Metadata headers = new Metadata();
147147
headers.merge(options.getHeaders());
148-
headers.put(LIBRARY_VERSION_HEADER_KEY, Version.LIBRARY_VERSION);
148+
// Don't set the client header if it wasn't parsed properly when building. The server will
149+
// fail RPCs if it's not semver.
150+
if (Version.LIBRARY_VERSION.contains(".")) {
151+
headers.put(LIBRARY_VERSION_HEADER_KEY, Version.LIBRARY_VERSION);
152+
}
149153
headers.put(SUPPORTED_SERVER_VERSIONS_HEADER_KEY, Version.SUPPORTED_SERVER_VERSIONS);
150154
headers.put(CLIENT_NAME_HEADER_KEY, Version.SDK_NAME);
151155
if (options instanceof CloudServiceStubsOptions) {

0 commit comments

Comments
 (0)