From 12f117c9c087ec6ef6d1c7a2b732016331629091 Mon Sep 17 00:00:00 2001 From: SIX Douglas Date: Tue, 10 Dec 2024 05:51:38 +0100 Subject: [PATCH 1/2] BE: Chore: Upgrade java to 21 (#628) --- .github/workflows/backend_tests.yml | 2 +- .github/workflows/branch-deploy.yml | 2 +- .github/workflows/build-public-image.yml | 2 +- .github/workflows/codeql-analysis.yml | 2 +- .github/workflows/cve_checks.yml | 2 +- .github/workflows/e2e-run.yml | 4 ++-- .github/workflows/main.yml | 2 +- .github/workflows/release-serde-api.yml | 2 +- .github/workflows/release.yml | 2 +- .../workflows/separate_env_public_create.yml | 2 +- api/Dockerfile | 4 ++-- .../ui/client/RetryingKafkaConnectClient.java | 2 +- .../ui/service/ConsumerGroupService.java | 2 ++ .../ui/service/KafkaConnectService.java | 13 +--------- documentation/compose/connectors/start.sh | 2 +- documentation/compose/e2e-tests.yaml | 4 ++-- e2e-tests/pom.xml | 14 +++++++---- pom.xml | 24 +++++++++---------- serde-api/pom.xml | 4 ++-- 19 files changed, 43 insertions(+), 48 deletions(-) diff --git a/.github/workflows/backend_tests.yml b/.github/workflows/backend_tests.yml index abb97d149..e9e6f975c 100644 --- a/.github/workflows/backend_tests.yml +++ b/.github/workflows/backend_tests.yml @@ -28,7 +28,7 @@ jobs: - name: Set up JDK uses: actions/setup-java@v4 with: - java-version: '17' + java-version: '21' distribution: 'zulu' cache: 'maven' diff --git a/.github/workflows/branch-deploy.yml b/.github/workflows/branch-deploy.yml index 720ceee3f..998e09bfe 100644 --- a/.github/workflows/branch-deploy.yml +++ b/.github/workflows/branch-deploy.yml @@ -29,7 +29,7 @@ jobs: - name: Set up JDK uses: actions/setup-java@v4 with: - java-version: '17' + java-version: '21' distribution: 'zulu' cache: 'maven' - name: Build diff --git a/.github/workflows/build-public-image.yml b/.github/workflows/build-public-image.yml index 3e364c992..4f37246bc 100644 --- a/.github/workflows/build-public-image.yml +++ b/.github/workflows/build-public-image.yml @@ -27,7 +27,7 @@ jobs: - name: Set up JDK uses: actions/setup-java@v4 with: - java-version: '17' + java-version: '21' distribution: 'zulu' cache: 'maven' - name: Build diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 40fc3fb3e..e73c9576b 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -45,7 +45,7 @@ jobs: - name: Set up JDK uses: actions/setup-java@v4 with: - java-version: '17' + java-version: '21' distribution: 'zulu' cache: 'maven' diff --git a/.github/workflows/cve_checks.yml b/.github/workflows/cve_checks.yml index 5df2d33bf..2bb98dd5a 100644 --- a/.github/workflows/cve_checks.yml +++ b/.github/workflows/cve_checks.yml @@ -20,7 +20,7 @@ jobs: - name: Set up JDK uses: actions/setup-java@v4 with: - java-version: '17' + java-version: '21' distribution: 'zulu' cache: 'maven' diff --git a/.github/workflows/e2e-run.yml b/.github/workflows/e2e-run.yml index b79e07897..b17335215 100644 --- a/.github/workflows/e2e-run.yml +++ b/.github/workflows/e2e-run.yml @@ -30,7 +30,7 @@ jobs: - name: Set up JDK uses: actions/setup-java@v3 with: - java-version: '17' + java-version: '21' distribution: 'zulu' cache: 'maven' @@ -72,7 +72,7 @@ jobs: - name: Set up JDK uses: actions/setup-java@v3 with: - java-version: '17' + java-version: '21' distribution: 'zulu' cache: 'maven' diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7701b91e6..bf684a69b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -28,7 +28,7 @@ jobs: - name: Set up JDK uses: actions/setup-java@v4 with: - java-version: '17' + java-version: '21' distribution: 'zulu' cache: 'maven' diff --git a/.github/workflows/release-serde-api.yml b/.github/workflows/release-serde-api.yml index 36d8a8412..b1e210e45 100644 --- a/.github/workflows/release-serde-api.yml +++ b/.github/workflows/release-serde-api.yml @@ -22,7 +22,7 @@ jobs: - name: Set up JDK uses: actions/setup-java@v4 with: - java-version: "17" + java-version: "21" distribution: "zulu" cache: "maven" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3a3c9de23..6e2075b75 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -28,7 +28,7 @@ jobs: - name: Set up JDK uses: actions/setup-java@v4 with: - java-version: '17' + java-version: '21' distribution: 'zulu' cache: 'maven' diff --git a/.github/workflows/separate_env_public_create.yml b/.github/workflows/separate_env_public_create.yml index 97eb8ee02..e77a15438 100644 --- a/.github/workflows/separate_env_public_create.yml +++ b/.github/workflows/separate_env_public_create.yml @@ -29,7 +29,7 @@ jobs: - name: Set up JDK uses: actions/setup-java@v4 with: - java-version: '17' + java-version: '21' distribution: 'zulu' cache: 'maven' - name: Build diff --git a/api/Dockerfile b/api/Dockerfile index 82ac8c023..b117f5ed1 100644 --- a/api/Dockerfile +++ b/api/Dockerfile @@ -1,7 +1,7 @@ -# The tag is ignored when a sha is included but the reason to add it are: +# The tag is ignored when a sha is included but the reason to add it are: # 1. Self Documentation: It is difficult to find out what the expected tag is given a sha alone # 2. Helps dependabot during discovery of upgrades -FROM azul/zulu-openjdk-alpine:17-jre-headless-latest@sha256:af4df00adaec356d092651af50d9e80fd179f96722d267e79acb564aede10fda +FROM azul/zulu-openjdk-alpine:21.0.4-jre-headless@sha256:c6f58ac023a103283fd02d204462268ae5e29996bfe379f6cf11837355e93c98 RUN apk add --no-cache \ # snappy codec diff --git a/api/src/main/java/io/kafbat/ui/client/RetryingKafkaConnectClient.java b/api/src/main/java/io/kafbat/ui/client/RetryingKafkaConnectClient.java index bb4ea92fe..f0b291af6 100644 --- a/api/src/main/java/io/kafbat/ui/client/RetryingKafkaConnectClient.java +++ b/api/src/main/java/io/kafbat/ui/client/RetryingKafkaConnectClient.java @@ -176,7 +176,7 @@ public Mono>> getConnectorTopicsWith } @Override - public Flux getConnectors(String search) throws WebClientResponseException { + public Mono> getConnectors(String search) throws WebClientResponseException { return withRetryOnConflict(super.getConnectors(search)); } diff --git a/api/src/main/java/io/kafbat/ui/service/ConsumerGroupService.java b/api/src/main/java/io/kafbat/ui/service/ConsumerGroupService.java index 27593cd6f..b2d6bd20f 100644 --- a/api/src/main/java/io/kafbat/ui/service/ConsumerGroupService.java +++ b/api/src/main/java/io/kafbat/ui/service/ConsumerGroupService.java @@ -149,6 +149,8 @@ private Mono> loadSortedDescriptions(ReactiveAdmi case EMPTY -> 3; case DEAD -> 4; case UNKNOWN -> 5; + case ASSIGNING -> 6; + case RECONCILING -> 7; }; var comparator = Comparator.comparingInt(statesPriorities); yield loadDescriptionsByListings(ac, groups, comparator, pageNum, perPage, sortOrderDto); diff --git a/api/src/main/java/io/kafbat/ui/service/KafkaConnectService.java b/api/src/main/java/io/kafbat/ui/service/KafkaConnectService.java index c5a32b29e..d72580fe2 100644 --- a/api/src/main/java/io/kafbat/ui/service/KafkaConnectService.java +++ b/api/src/main/java/io/kafbat/ui/service/KafkaConnectService.java @@ -1,6 +1,5 @@ package io.kafbat.ui.service; -import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; import io.kafbat.ui.connect.api.KafkaConnectClientApi; import io.kafbat.ui.connect.model.ConnectorStatus; @@ -31,7 +30,6 @@ import java.util.stream.Stream; import javax.annotation.Nullable; import lombok.RequiredArgsConstructor; -import lombok.SneakyThrows; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; @@ -106,10 +104,7 @@ public Mono getConnectorTopics(KafkaCluster cluster, String con public Flux getConnectorNames(KafkaCluster cluster, String connectName) { return api(cluster, connectName) - .flux(client -> client.getConnectors(null)) - // for some reason `getConnectors` method returns the response as a single string - .collectList().map(e -> e.get(0)) - .map(this::parseConnectorsNamesStringToList) + .mono(client -> client.getConnectors(null)) .flatMapMany(Flux::fromIterable); } @@ -118,12 +113,6 @@ public Flux getConnectorNamesWithErrorsSuppress(KafkaCluster cluster, St return getConnectorNames(cluster, connectName).onErrorComplete(); } - @SneakyThrows - private List parseConnectorsNamesStringToList(String json) { - return objectMapper.readValue(json, new TypeReference<>() { - }); - } - public Mono createConnector(KafkaCluster cluster, String connectName, Mono connector) { return api(cluster, connectName) diff --git a/documentation/compose/connectors/start.sh b/documentation/compose/connectors/start.sh index 7adc5e4e1..092267591 100755 --- a/documentation/compose/connectors/start.sh +++ b/documentation/compose/connectors/start.sh @@ -1,4 +1,4 @@ -#! /bin/bash +#! /bin/sh while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' kafka-connect0:8083)" != "200" ]] do sleep 5 done diff --git a/documentation/compose/e2e-tests.yaml b/documentation/compose/e2e-tests.yaml index 126c5aa29..da986cc39 100644 --- a/documentation/compose/e2e-tests.yaml +++ b/documentation/compose/e2e-tests.yaml @@ -150,7 +150,7 @@ services: POSTGRES_PASSWORD: '12345' create-connectors: - image: ellerbrock/alpine-bash-curl-ssl + image: curlimages/curl depends_on: postgres-db: condition: service_healthy @@ -158,7 +158,7 @@ services: condition: service_healthy volumes: - ./connectors:/connectors - command: bash -c '/connectors/start.sh' + command: sh -c '/connectors/start.sh' ksqldb: image: confluentinc/cp-ksqldb-server:7.6.0 diff --git a/e2e-tests/pom.xml b/e2e-tests/pom.xml index c46bb78eb..8131dd11d 100644 --- a/e2e-tests/pom.xml +++ b/e2e-tests/pom.xml @@ -12,12 +12,12 @@ e2e-tests - 3.3.1 + 3.8.0 ${project.version} - 17 - 3.2.3 - 3.2.5 - 1.9.9.1 + 21 + 3.5.1 + 3.5.1 + 1.9.21 2.27.0 @@ -73,6 +73,10 @@ webdrivermanager 5.8.0 + + io.netty + netty-resolver-dns-native-macos + diff --git a/pom.xml b/pom.xml index 683abf771..7b2a670fb 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ - 17 + 21 UTF-8 ..//frontend/src/generated-sources @@ -34,12 +34,12 @@ 2.12.0 3.25.3 1.11.4 - 1.12.19 + 1.14.19 7.4.4 3.1.0 3.0.13 2.14.0 - 3.7.1 + 3.8.0 1.6.2 1.18.34 3.25.5 @@ -54,7 +54,7 @@ 33.3.1-jre 5.11.2 - 5.11.0 + 5.14.2 4.12.0 1.20.2 @@ -63,14 +63,14 @@ v9.11.0 - 0.42.1 - 1.12.1 - 3.2.0 - 3.10.1 - 3.2.0 - 3.1.2 - 6.6.0 - 1.2.32 + 0.45.1 + 1.15.1 + 3.4.0 + 3.13.0 + 3.3.1 + 3.5.1 + 7.9.0 + 1.8.0 diff --git a/serde-api/pom.xml b/serde-api/pom.xml index 3c2e3b3a1..facf886d8 100644 --- a/serde-api/pom.xml +++ b/serde-api/pom.xml @@ -8,8 +8,8 @@ jar - 17 - 17 + 21 + 21 From 45324ddbaff247cd428a8d1c6b92ae6015218d99 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 10 Dec 2024 09:07:29 +0400 Subject: [PATCH 2/2] Bump azul/zulu-openjdk-alpine from 21.0.4-jre-headless to 21.0.5-jre-headless in /api (#700) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- api/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/Dockerfile b/api/Dockerfile index b117f5ed1..adaa64009 100644 --- a/api/Dockerfile +++ b/api/Dockerfile @@ -1,7 +1,7 @@ # The tag is ignored when a sha is included but the reason to add it are: # 1. Self Documentation: It is difficult to find out what the expected tag is given a sha alone # 2. Helps dependabot during discovery of upgrades -FROM azul/zulu-openjdk-alpine:21.0.4-jre-headless@sha256:c6f58ac023a103283fd02d204462268ae5e29996bfe379f6cf11837355e93c98 +FROM azul/zulu-openjdk-alpine:21.0.5-jre-headless@sha256:842b23baf96980437281b7419af970238b4c1c3109e50beac5299cdc278291d7 RUN apk add --no-cache \ # snappy codec