Skip to content
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
6 changes: 4 additions & 2 deletions .github/workflows/build-and-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@ name: Build and Publish
on:
push:
tags: [ "**" ]
branches: [ "**" ]
branches:
- main
pull_request:

jobs:
build-and-publish:
name: Java Gradle
uses: bakdata/ci-templates/.github/workflows/java-gradle-library.yaml@1.57.0
uses: bakdata/ci-templates/.github/workflows/java-gradle-library.yaml@1.64.0
with:
java-version: 17
secrets:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ on:
jobs:
java-gradle-release:
name: Java Gradle
uses: bakdata/ci-templates/.github/workflows/java-gradle-release.yaml@1.57.0
uses: bakdata/ci-templates/.github/workflows/java-gradle-release.yaml@1.64.0
with:
java-version: 17
release-type: "${{ inputs.release-type }}"
Expand Down
10 changes: 5 additions & 5 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ description = "A Java client for KServe inference services."

plugins {
`java-library`
id("com.bakdata.release") version "1.6.1"
id("com.bakdata.sonar") version "1.6.1"
id("com.bakdata.sonatype") version "1.7.1"
id("io.freefair.lombok") version "8.11"
id("com.bakdata.release") version "1.9.1"
id("com.bakdata.sonar") version "1.9.1"
id("com.bakdata.sonatype") version "1.9.1"
id("io.freefair.lombok") version "8.12.2.1"
id("java-test-fixtures")
}

Expand Down Expand Up @@ -45,7 +45,7 @@ dependencies {
testFixturesImplementation(group = "com.squareup.okhttp3", name = "mockwebserver", version = okHttpVersion)
}

configure<com.bakdata.gradle.SonatypeSettings> {
publication {
developers {
developer {
name.set("Victor Künstler")
Expand Down
9 changes: 5 additions & 4 deletions src/main/java/com/bakdata/kserve/client/KServeClient.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* MIT License
*
* Copyright (c) 2024 bakdata
* Copyright (c) 2025 bakdata
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -101,7 +101,7 @@ private static ObjectMapper createObjectMapper() {
}

private static String getStringBody(final Response response) throws IOException {
try (ResponseBody body = response.body()) {
try (final ResponseBody body = response.body()) {
return body.string();
}
}
Expand Down Expand Up @@ -145,8 +145,9 @@ public <T> Optional<T> makeInferenceRequest(final I inputObject, final Class<? e
final Request httpRequest = getRequest(
this.getBodyString(inputObject),
this.getModelURI(modelNameSuffix));
final Response response = this.executeRequest(httpRequest);
return this.processResponse(response, responseType);
try (final Response response = this.executeRequest(httpRequest)) {
return this.processResponse(response, responseType);
}
}

protected abstract String extractErrorMessage(String stringBody);
Expand Down
Loading