Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deps: Update various dependencies #115

Merged
merged 2 commits into from
Oct 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,25 +57,25 @@
<!--suppress UnresolvedMavenProperty -->
<jenkins-build-tag>${env.BUILD_TAG}</jenkins-build-tag> <!-- set by jenkins -->

<grpc-version>1.57.2</grpc-version>
<grpc-version>1.59.0</grpc-version>
<netty-version>4.1.100.Final</netty-version>
<litelinks-version>1.7.2</litelinks-version>
<kv-utils-version>0.5.1</kv-utils-version>
<etcd-java-version>0.0.22</etcd-java-version>
<protobuf-version>3.23.0</protobuf-version>
<annotation-version>9.0.75</annotation-version>
<guava-version>32.1.2-jre</guava-version>
<jackson-databind-version>2.15.2</jackson-databind-version>
<protobuf-version>3.24.4</protobuf-version>
<annotation-version>9.0.82</annotation-version>
<guava-version>32.1.3-jre</guava-version>
<jackson-databind-version>2.15.3</jackson-databind-version>
<gson-version>2.10.1</gson-version>
<thrift-version>0.18.1</thrift-version>
<thrift-version>0.19.0</thrift-version>
<eclipse-collections-version>11.1.0</eclipse-collections-version>
<log4j2-version>2.20.0</log4j2-version>
<log4j2-version>2.21.1</log4j2-version>
<slf4j-version>1.7.36</slf4j-version>
<!-- Care must be taken when updating the prometheus client lib version
since we have some custom optimized extensions to this -->
<prometheus-version>0.9.0</prometheus-version>
<bouncycastle-version>1.70</bouncycastle-version>
<junit-version>5.9.3</junit-version>
<junit-version>5.10.0</junit-version>

<dockerhome>${project.build.directory}/dockerhome</dockerhome>
<skipTests>false</skipTests>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,15 @@ public static <T extends AbstractStub<T>> T forModel(T stub, String... modelIds)
headers.put(MODEL_ID_META_KEY, modelId);
}
headers.put(CUST_HEADER_KEY, "custom-value");
return MetadataUtils.attachHeaders(stub, headers);
return stub.withInterceptors(MetadataUtils.newAttachHeadersInterceptor(headers));
}

public static <T extends AbstractStub<T>> T forVModel(T stub, String... vmodelIds) {
Metadata headers = new Metadata();
for (String modelId : vmodelIds) {
headers.put(VMODEL_ID_META_KEY, modelId);
}
return MetadataUtils.attachHeaders(stub, headers);
return stub.withInterceptors(MetadataUtils.newAttachHeadersInterceptor(headers));
}

// default KV store to test is etcd
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ public static <T extends AbstractStub<T>> T forModel(T stub, String... modelIds)
headers.put(MODEL_ID_META_KEY, modelId);
}
headers.put(CUST_HEADER_KEY, "custom-value");
return MetadataUtils.attachHeaders(stub, headers);
return stub.withInterceptors(MetadataUtils.newAttachHeadersInterceptor(headers));
}

@BeforeEach
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ public static <T extends AbstractStub<T>> T forModel(T stub, String... modelIds)
headers.put(MODEL_ID_META_KEY, modelId);
}
headers.put(CUST_HEADER_KEY, "custom-value");
return MetadataUtils.attachHeaders(stub, headers);
return stub.withInterceptors(MetadataUtils.newAttachHeadersInterceptor(headers));
}

@BeforeEach
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ public void headerLoggingTest() throws Exception {
// We'll make sure this one *isn't* logged since it wasn't included in the config
headers.put(unloggedHeader, "my-unlogged-value");

PredictResponse response = MetadataUtils.attachHeaders(useModels, headers).predict(req);
PredictResponse response = useModels.withInterceptors(
MetadataUtils.newAttachHeadersInterceptor(headers)).predict(req);
assertEquals("classification for predict me! by model myModel",
response.getResults(0).getCategory());

Expand Down
2 changes: 1 addition & 1 deletion src/test/java/com/ibm/watson/modelmesh/VModelsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,6 @@ private static VModelStatusInfo clearTargetCopyInfo(VModelStatusInfo vmsi) {
public static <T extends AbstractStub<T>> T forVModel(T stub, String modelId) {
Metadata headers = new Metadata();
headers.put(VMODEL_ID_META_KEY, modelId);
return MetadataUtils.attachHeaders(stub, headers);
return stub.withInterceptors(MetadataUtils.newAttachHeadersInterceptor(headers));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public static void main(String[] args) {
public static <T extends AbstractStub<T>> T forModel(T stub, String modelId) {
Metadata headers = new Metadata();
headers.put(MODEL_ID_META_KEY, modelId);
return MetadataUtils.attachHeaders(stub, headers);
return stub.withInterceptors(MetadataUtils.newAttachHeadersInterceptor(headers));
}

}
Loading