diff --git a/.github/workflows/build-and-publish.yaml b/.github/workflows/build-and-publish.yaml index ab068ca..271d9b4 100644 --- a/.github/workflows/build-and-publish.yaml +++ b/.github/workflows/build-and-publish.yaml @@ -2,13 +2,13 @@ name: Build and Publish on: push: - tags: ["**"] - branches: ["**"] + tags: [ "**" ] + branches: [ "**" ] jobs: build-and-publish: name: Java Gradle - uses: bakdata/ci-templates/.github/workflows/java-gradle-library.yaml@1.40.8 + uses: bakdata/ci-templates/.github/workflows/java-gradle-library.yaml@1.45.3 with: java-version: 17 secrets: @@ -19,5 +19,4 @@ jobs: signing-password: ${{ secrets.SONATYPE_SIGNING_PASSWORD }} ossrh-username: ${{ secrets.SONATYPE_OSSRH_USERNAME }} ossrh-password: ${{ secrets.SONATYPE_OSSRH_PASSWORD }} - github-username: ${{ secrets.GH_USERNAME }} github-token: ${{ secrets.GH_TOKEN }} diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index b99f2fe..535f4a8 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -16,7 +16,7 @@ on: jobs: java-gradle-release: name: Java Gradle - uses: bakdata/ci-templates/.github/workflows/java-gradle-release.yaml@1.40.8 + uses: bakdata/ci-templates/.github/workflows/java-gradle-release.yaml@1.45.3 with: java-version: 17 release-type: "${{ inputs.release-type }}" diff --git a/build.gradle.kts b/build.gradle.kts index 037f093..7ddbf27 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -2,11 +2,10 @@ description = "A Java client for KServe inference services." plugins { `java-library` - id("net.researchgate.release") version "3.0.2" - id("com.bakdata.sonar") version "1.1.14" - id("com.bakdata.sonatype") version "1.1.14" - id("org.hildan.github.changelog") version "1.12.1" - id("io.freefair.lombok") version "6.6.3" + id("com.bakdata.release") version "1.4.0" + id("com.bakdata.sonar") version "1.4.0" + id("com.bakdata.sonatype") version "1.4.0" + id("io.freefair.lombok") version "8.4" id("java-test-fixtures") } @@ -61,10 +60,3 @@ configure { } } } - -configure { - githubUser = "bakdata" - githubRepository = "kserve-client" - futureVersionTag = findProperty("changelog.releaseVersion")?.toString() - sinceTag = findProperty("changelog.sinceTag")?.toString() -} diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index f42e62f..744c64d 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip +networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/src/main/java/com/bakdata/kserve/client/KServeClient.java b/src/main/java/com/bakdata/kserve/client/KServeClient.java index 1b44925..f01f24a 100644 --- a/src/main/java/com/bakdata/kserve/client/KServeClient.java +++ b/src/main/java/com/bakdata/kserve/client/KServeClient.java @@ -1,7 +1,7 @@ /* * MIT License * - * Copyright (c) 2022 bakdata + * Copyright (c) 2024 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 @@ -30,6 +30,11 @@ import io.github.resilience4j.core.IntervalFunction; import io.github.resilience4j.retry.Retry; import io.github.resilience4j.retry.RetryConfig; +import java.io.IOException; +import java.net.HttpURLConnection; +import java.time.Duration; +import java.util.Optional; +import java.util.concurrent.Callable; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import okhttp3.HttpUrl; @@ -41,17 +46,11 @@ import okhttp3.Response; import org.jetbrains.annotations.NotNull; -import java.io.IOException; -import java.net.HttpURLConnection; -import java.time.Duration; -import java.util.Optional; -import java.util.concurrent.Callable; - /** *

An abstract client base class to make requests to a KServe inference service.

* It builds the request, handles the response and deals with various errors from the inference service. It - * automatically retries requests in case they time out, e.g. due to the inference service being scaled to zero at - * the time of the request. The exponential random back-off retry mechanism can be configured using the following + * automatically retries requests in case they time out, e.g. due to the inference service being scaled to zero at the + * time of the request. The exponential random back-off retry mechanism can be configured using the following * environment variables: *