diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json
new file mode 100644
index 0000000000..74f5825021
--- /dev/null
+++ b/.devcontainer/devcontainer.json
@@ -0,0 +1,36 @@
+{
+ "name": "Java",
+
+ "image": "mcr.microsoft.com/devcontainers/java:0-17",
+
+ "features": {
+ "ghcr.io/devcontainers/features/java:1": {
+ "version": "none",
+ "installMaven": "true",
+ "installGradle": "false"
+ },
+ "ghcr.io/devcontainers/features/docker-in-docker:2": {}
+ },
+
+ // Use 'forwardPorts' to make a list of ports inside the container available locally.
+ // "forwardPorts": [],
+
+ // Use 'postCreateCommand' to run commands after the container is created.
+ // "postCreateCommand": "java -version",
+
+ "customizations": {
+ "vscode": {
+ "extensions" : [
+ "vscjava.vscode-java-pack",
+ "vscjava.vscode-maven",
+ "vscjava.vscode-java-debug",
+ "EditorConfig.EditorConfig",
+ "ms-azuretools.vscode-docker",
+ "antfu.vite",
+ "ms-kubernetes-tools.vscode-kubernetes-tools",
+ "github.vscode-pull-request-github"
+ ]
+ }
+ }
+
+}
diff --git a/.github/workflows/e2e-automation.yml b/.github/workflows/e2e-automation.yml
index eb10985747..5ce1437614 100644
--- a/.github/workflows/e2e-automation.yml
+++ b/.github/workflows/e2e-automation.yml
@@ -36,7 +36,7 @@ jobs:
- name: Pull with Docker
id: pull_chrome
run: |
- docker pull selenium/standalone-chrome:103.0
+ docker pull selenoid/vnc_chrome:103.0
- name: Set up JDK
uses: actions/setup-java@v3
with:
@@ -52,6 +52,7 @@ jobs:
id: compose_app
# use the following command until #819 will be fixed
run: |
+ docker-compose -f kafka-ui-e2e-checks/docker/selenoid-git.yaml up -d
docker-compose -f ./documentation/compose/e2e-tests.yaml up -d
- name: Run test suite
run: |
@@ -78,7 +79,7 @@ jobs:
uses: Sibz/github-status-action@v1.1.6
with:
authToken: ${{secrets.GITHUB_TOKEN}}
- context: "Test report"
+ context: "Click Details button to open Allure report"
state: "success"
sha: ${{ github.sha }}
target_url: http://kafkaui-allure-reports.s3-website.eu-central-1.amazonaws.com/${{ github.run_number }}
diff --git a/.github/workflows/e2e-checks.yaml b/.github/workflows/e2e-checks.yaml
index 83be371bea..771eb698fe 100644
--- a/.github/workflows/e2e-checks.yaml
+++ b/.github/workflows/e2e-checks.yaml
@@ -15,20 +15,20 @@ jobs:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- - name: Configure AWS credentials for Kafka-UI account
+ - name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v2
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: eu-central-1
- - name: Set the values
+ - name: Set up environment
id: set_env_values
run: |
cat "./kafka-ui-e2e-checks/.env.ci" >> "./kafka-ui-e2e-checks/.env"
- - name: pull docker
+ - name: Pull with Docker
id: pull_chrome
run: |
- docker pull selenium/standalone-chrome:103.0
+ docker pull selenoid/vnc_chrome:103.0
- name: Set up JDK
uses: actions/setup-java@v3
with:
@@ -40,12 +40,13 @@ jobs:
run: |
./mvnw -B -ntp versions:set -DnewVersion=${{ github.event.pull_request.head.sha }}
./mvnw -B -V -ntp clean install -Pprod -Dmaven.test.skip=true ${{ github.event.inputs.extraMavenOptions }}
- - name: compose app
+ - name: Compose with Docker
id: compose_app
# use the following command until #819 will be fixed
run: |
+ docker-compose -f kafka-ui-e2e-checks/docker/selenoid-git.yaml up -d
docker-compose -f ./documentation/compose/e2e-tests.yaml up -d
- - name: e2e run
+ - name: Run test suite
run: |
./mvnw -B -ntp versions:set -DnewVersion=${{ github.event.pull_request.head.sha }}
./mvnw -B -V -ntp -Dsurefire.suiteXmlFiles='src/test/resources/smoke.xml' -f 'kafka-ui-e2e-checks' test -Pprod
@@ -65,7 +66,7 @@ jobs:
AWS_S3_BUCKET: 'kafkaui-allure-reports'
AWS_REGION: 'eu-central-1'
SOURCE_DIR: 'allure-history/allure-results'
- - name: Post the link to allure report
+ - name: Deploy report to Amazon S3
if: always()
uses: Sibz/github-status-action@v1.1.6
with:
diff --git a/.github/workflows/e2e-weekly.yml b/.github/workflows/e2e-weekly.yml
index 4683c7e111..ea5ca7e522 100644
--- a/.github/workflows/e2e-weekly.yml
+++ b/.github/workflows/e2e-weekly.yml
@@ -23,7 +23,7 @@ jobs:
- name: Pull with Docker
id: pull_chrome
run: |
- docker pull selenium/standalone-chrome:103.0
+ docker pull selenoid/vnc_chrome:103.0
- name: Set up JDK
uses: actions/setup-java@v3
with:
@@ -39,6 +39,7 @@ jobs:
id: compose_app
# use the following command until #819 will be fixed
run: |
+ docker-compose -f kafka-ui-e2e-checks/docker/selenoid-git.yaml up -d
docker-compose -f ./documentation/compose/e2e-tests.yaml up -d
- name: Run test suite
run: |
@@ -65,7 +66,7 @@ jobs:
uses: Sibz/github-status-action@v1.1.6
with:
authToken: ${{secrets.GITHUB_TOKEN}}
- context: "Test report"
+ context: "Click Details button to open Allure report"
state: "success"
sha: ${{ github.sha }}
target_url: http://kafkaui-allure-reports.s3-website.eu-central-1.amazonaws.com/${{ github.run_number }}
diff --git a/documentation/compose/e2e-tests.yaml b/documentation/compose/e2e-tests.yaml
index 2a422c54d4..ae56f5d576 100644
--- a/documentation/compose/e2e-tests.yaml
+++ b/documentation/compose/e2e-tests.yaml
@@ -11,14 +11,14 @@ services:
test: wget --no-verbose --tries=1 --spider http://localhost:8080/actuator/health
interval: 30s
timeout: 10s
- retries: 10
+ retries: 10
depends_on:
- kafka0:
- condition: service_healthy
- schemaregistry0:
- condition: service_healthy
- kafka-connect0:
- condition: service_healthy
+ kafka0:
+ condition: service_healthy
+ schemaregistry0:
+ condition: service_healthy
+ kafka-connect0:
+ condition: service_healthy
environment:
KAFKA_CLUSTERS_0_NAME: local
KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS: kafka0:29092
@@ -33,10 +33,10 @@ services:
hostname: kafka0
container_name: kafka0
healthcheck:
- test: unset JMX_PORT && KAFKA_JMX_OPTS="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=kafka0 -Dcom.sun.management.jmxremote.rmi.port=9999" && kafka-broker-api-versions --bootstrap-server=localhost:9092
- interval: 30s
- timeout: 10s
- retries: 10
+ test: unset JMX_PORT && KAFKA_JMX_OPTS="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=kafka0 -Dcom.sun.management.jmxremote.rmi.port=9999" && kafka-broker-api-versions --bootstrap-server=localhost:9092
+ interval: 30s
+ timeout: 10s
+ retries: 10
ports:
- "9092:9092"
- "9997:9997"
@@ -68,12 +68,12 @@ services:
- 8085:8085
depends_on:
kafka0:
- condition: service_healthy
+ condition: service_healthy
healthcheck:
- test: ["CMD", "timeout", "1", "curl", "--silent", "--fail", "http://schemaregistry0:8085/subjects"]
- interval: 30s
- timeout: 10s
- retries: 10
+ test: [ "CMD", "timeout", "1", "curl", "--silent", "--fail", "http://schemaregistry0:8085/subjects" ]
+ interval: 30s
+ timeout: 10s
+ retries: 10
environment:
SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS: PLAINTEXT://kafka0:29092
SCHEMA_REGISTRY_KAFKASTORE_SECURITY_PROTOCOL: PLAINTEXT
@@ -93,11 +93,11 @@ services:
- 8083:8083
depends_on:
kafka0:
- condition: service_healthy
+ condition: service_healthy
schemaregistry0:
- condition: service_healthy
+ condition: service_healthy
healthcheck:
- test: ["CMD", "nc", "127.0.0.1", "8083"]
+ test: [ "CMD", "nc", "127.0.0.1", "8083" ]
interval: 30s
timeout: 10s
retries: 10
@@ -118,8 +118,8 @@ services:
CONNECT_INTERNAL_VALUE_CONVERTER: org.apache.kafka.connect.json.JsonConverter
CONNECT_REST_ADVERTISED_HOST_NAME: kafka-connect0
CONNECT_PLUGIN_PATH: "/usr/share/java,/usr/share/confluent-hub-components"
-# AWS_ACCESS_KEY_ID: ""
-# AWS_SECRET_ACCESS_KEY: ""
+ # AWS_ACCESS_KEY_ID: ""
+ # AWS_SECRET_ACCESS_KEY: ""
kafka-init-topics:
image: confluentinc/cp-kafka:7.2.1
@@ -127,7 +127,7 @@ services:
- ./message.json:/data/message.json
depends_on:
kafka0:
- condition: service_healthy
+ condition: service_healthy
command: "bash -c 'echo Waiting for Kafka to be ready... && \
cub kafka-ready -b kafka0:29092 1 30 && \
kafka-topics --create --topic users --partitions 3 --replication-factor 1 --if-not-exists --bootstrap-server kafka0:29092 && \
@@ -142,10 +142,10 @@ services:
ports:
- 5432:5432
healthcheck:
- test: ["CMD-SHELL", "pg_isready -U dev_user"]
+ test: [ "CMD-SHELL", "pg_isready -U dev_user" ]
interval: 10s
timeout: 5s
- retries: 5
+ retries: 5
environment:
POSTGRES_USER: 'dev_user'
POSTGRES_PASSWORD: '12345'
@@ -154,7 +154,7 @@ services:
image: ellerbrock/alpine-bash-curl-ssl
depends_on:
postgres-db:
- condition: service_healthy
+ condition: service_healthy
kafka-connect0:
condition: service_healthy
volumes:
@@ -164,7 +164,7 @@ services:
ksqldb:
image: confluentinc/ksqldb-server:0.18.0
healthcheck:
- test: ["CMD", "timeout", "1", "curl", "--silent", "--fail", "http://localhost:8088/info"]
+ test: [ "CMD", "timeout", "1", "curl", "--silent", "--fail", "http://localhost:8088/info" ]
interval: 30s
timeout: 10s
retries: 10
@@ -174,7 +174,7 @@ services:
kafka-connect0:
condition: service_healthy
schemaregistry0:
- condition: service_healthy
+ condition: service_healthy
ports:
- 8088:8088
environment:
diff --git a/etc/checkstyle/checkstyle-e2e.xml b/etc/checkstyle/checkstyle-e2e.xml
new file mode 100644
index 0000000000..c2af9c987b
--- /dev/null
+++ b/etc/checkstyle/checkstyle-e2e.xml
@@ -0,0 +1,333 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/etc/checkstyle/checkstyle.xml b/etc/checkstyle/checkstyle.xml
index 0348f809b4..745f1bc368 100644
--- a/etc/checkstyle/checkstyle.xml
+++ b/etc/checkstyle/checkstyle.xml
@@ -318,7 +318,7 @@
-
+
@@ -330,4 +330,4 @@
-
\ No newline at end of file
+
diff --git a/kafka-ui-api/Dockerfile b/kafka-ui-api/Dockerfile
index fcd29c0f06..d969ec7631 100644
--- a/kafka-ui-api/Dockerfile
+++ b/kafka-ui-api/Dockerfile
@@ -1,4 +1,5 @@
-FROM azul/zulu-openjdk-alpine:17-jre
+#FROM azul/zulu-openjdk-alpine:17-jre-headless
+FROM azul/zulu-openjdk-alpine@sha256:a36679ac0d28cb835e2a8c00e1e0d95509c6c51c5081c7782b85edb1f37a771a
RUN apk add --no-cache gcompat # need to make snappy codec work
RUN addgroup -S kafkaui && adduser -S kafkaui -G kafkaui
diff --git a/kafka-ui-api/src/main/java/com/provectus/kafka/ui/client/RetryingKafkaConnectClient.java b/kafka-ui-api/src/main/java/com/provectus/kafka/ui/client/RetryingKafkaConnectClient.java
index 5ec5a779d3..74b9485008 100644
--- a/kafka-ui-api/src/main/java/com/provectus/kafka/ui/client/RetryingKafkaConnectClient.java
+++ b/kafka-ui-api/src/main/java/com/provectus/kafka/ui/client/RetryingKafkaConnectClient.java
@@ -6,7 +6,13 @@ import com.provectus.kafka.ui.config.ClustersProperties;
import com.provectus.kafka.ui.connect.ApiClient;
import com.provectus.kafka.ui.connect.api.KafkaConnectClientApi;
import com.provectus.kafka.ui.connect.model.Connector;
+import com.provectus.kafka.ui.connect.model.ConnectorPlugin;
+import com.provectus.kafka.ui.connect.model.ConnectorPluginConfigValidationResponse;
+import com.provectus.kafka.ui.connect.model.ConnectorStatus;
+import com.provectus.kafka.ui.connect.model.ConnectorTask;
+import com.provectus.kafka.ui.connect.model.ConnectorTopics;
import com.provectus.kafka.ui.connect.model.NewConnector;
+import com.provectus.kafka.ui.connect.model.TaskStatus;
import com.provectus.kafka.ui.exception.KafkaConnectConflictReponseException;
import com.provectus.kafka.ui.exception.ValidationException;
import com.provectus.kafka.ui.util.WebClientConfigurator;
@@ -15,11 +21,7 @@ import java.util.List;
import java.util.Map;
import javax.annotation.Nullable;
import lombok.extern.slf4j.Slf4j;
-import org.springframework.core.ParameterizedTypeReference;
-import org.springframework.http.HttpHeaders;
-import org.springframework.http.HttpMethod;
-import org.springframework.http.MediaType;
-import org.springframework.util.MultiValueMap;
+import org.springframework.http.ResponseEntity;
import org.springframework.util.unit.DataSize;
import org.springframework.web.client.RestClientException;
import org.springframework.web.reactive.function.client.WebClient;
@@ -79,6 +81,176 @@ public class RetryingKafkaConnectClient extends KafkaConnectClientApi {
);
}
+ @Override
+ public Mono> createConnectorWithHttpInfo(NewConnector newConnector)
+ throws WebClientResponseException {
+ return withRetryOnConflict(super.createConnectorWithHttpInfo(newConnector));
+ }
+
+ @Override
+ public Mono deleteConnector(String connectorName) throws WebClientResponseException {
+ return withRetryOnConflict(super.deleteConnector(connectorName));
+ }
+
+ @Override
+ public Mono> deleteConnectorWithHttpInfo(String connectorName)
+ throws WebClientResponseException {
+ return withRetryOnConflict(super.deleteConnectorWithHttpInfo(connectorName));
+ }
+
+
+ @Override
+ public Mono getConnector(String connectorName) throws WebClientResponseException {
+ return withRetryOnConflict(super.getConnector(connectorName));
+ }
+
+ @Override
+ public Mono> getConnectorWithHttpInfo(String connectorName)
+ throws WebClientResponseException {
+ return withRetryOnConflict(super.getConnectorWithHttpInfo(connectorName));
+ }
+
+ @Override
+ public Mono