From aa192e13071ec89de8c608bd1be1073194ed4c34 Mon Sep 17 00:00:00 2001 From: slievrly Date: Sat, 27 Dec 2025 11:01:38 +0800 Subject: [PATCH 01/14] optimize: support docker_jdk in github actions Signed-off-by: slievrly --- .github/workflows/E2E.yml | 37 ++++++- .../apache/seata/config/ConfigConstants.java | 47 ++++++++ .../generator/DockerFileForJarGenerator.java | 6 + .../template/application-dockerFile.ftl | 24 +++- .../resources/template/jar-dockerFile.ftl | 22 +++- e2e-test/scripts/prepare-test.sh | 29 ++++- e2e-test/scripts/test-jdk-versions.sh | 82 ++++++++++++++ e2e-test/scripts/test-run.sh | 42 +++++-- e2e-test/seata-e2e-example.yaml | 104 ++++++++++++++++++ 9 files changed, 373 insertions(+), 20 deletions(-) create mode 100644 e2e-test/scripts/test-jdk-versions.sh create mode 100644 e2e-test/seata-e2e-example.yaml diff --git a/.github/workflows/E2E.yml b/.github/workflows/E2E.yml index c81b4b043..5a032cebf 100644 --- a/.github/workflows/E2E.yml +++ b/.github/workflows/E2E.yml @@ -15,14 +15,22 @@ on: [ push,pull_request ] jobs: run_e2e: - name: Run E2E Test ${{ matrix.java }}, ${{ matrix.os }} + name: Run E2E Test (Build JDK${{ matrix.build_jdk }}, Docker JDK${{ matrix.docker_jdk }}) runs-on: ${{ matrix.os }} strategy: matrix: os: [ ubuntu-latest ] - java: [ 8, 11 ] + # Build JDK version - used for Maven compilation + build_jdk: [ 8, 11 ] + # Docker JDK version - used in Docker images for runtime + docker_jdk: [ 8, 11, 17 ] + # Exclude some combinations to reduce test time + exclude: + # When building with JDK 8, skip testing with JDK 17 + - build_jdk: 8 + docker_jdk: 17 fail-fast: false - max-parallel: 2 + max-parallel: 3 steps: - name: Uninstall Docker Compose v2 run: sudo rm -f /usr/local/bin/docker-compose @@ -59,11 +67,20 @@ jobs: chmod 777 e2e cp e2e /usr/local/bin - - name: Set up JDK ${{ matrix.java }} + - name: Set up JDK ${{ matrix.build_jdk }} for build uses: actions/setup-java@v3 with: distribution: 'zulu' - java-version: ${{ matrix.java }} + java-version: ${{ matrix.build_jdk }} + + - name: Set Docker JDK base image + run: | + echo "==========================================" + echo "E2E Test Configuration:" + echo "Build JDK Version: ${{ matrix.build_jdk }}" + echo "Docker Runtime JDK Version: ${{ matrix.docker_jdk }}" + echo "==========================================" + echo "E2E_JDK_BASE_IMAGE=${{ matrix.docker_jdk }}" >> $GITHUB_ENV - name: prepare e2e tests run: | @@ -72,3 +89,13 @@ jobs: - name: run e2e tests run: | cd e2e-test/scripts && sh test-run.sh + + - name: Upload test logs on failure + if: failure() + uses: actions/upload-artifact@v3 + with: + name: e2e-test-logs-jdk${{ matrix.build_jdk }}-docker-jdk${{ matrix.docker_jdk }} + path: | + e2e-test/logs/ + tmp/ + retention-days: 7 diff --git a/e2e-test/e2e-test-builder/src/main/java/org/apache/seata/config/ConfigConstants.java b/e2e-test/e2e-test-builder/src/main/java/org/apache/seata/config/ConfigConstants.java index a08308825..b08f57a1d 100644 --- a/e2e-test/e2e-test-builder/src/main/java/org/apache/seata/config/ConfigConstants.java +++ b/e2e-test/e2e-test-builder/src/main/java/org/apache/seata/config/ConfigConstants.java @@ -16,6 +16,9 @@ */ package org.apache.seata.config; +import java.util.HashMap; +import java.util.Map; + /** * @author jingliu_xiong@foxmail.com */ @@ -30,4 +33,48 @@ public class ConfigConstants { public static final String IMAGE_VERSION = "0.0.1"; public static final String DOCKER_SERVICE_JAR_TYPE = "Jar"; public static final String DOCKER_SERVICE_APPLICATION_TYPE = "Application"; + + // JDK base image configuration + public static final String DEFAULT_BASE_IMAGE = "openjdk:8-jdk-alpine"; + public static final String ENV_JDK_BASE_IMAGE = "E2E_JDK_BASE_IMAGE"; + + // Predefined JDK image mapping + private static final Map JDK_IMAGE_MAP = new HashMap() {{ + put("8", "openjdk:8-jdk-alpine"); + put("11", "openjdk:11-jdk-alpine"); + put("17", "openjdk:17-jdk-alpine"); + put("21", "eclipse-temurin:21-jdk-alpine"); + // Support for different distributions + put("8-zulu", "azul/zulu-openjdk-alpine:8"); + put("11-zulu", "azul/zulu-openjdk-alpine:11"); + put("17-zulu", "azul/zulu-openjdk-alpine:17"); + put("21-zulu", "azul/zulu-openjdk-alpine:21"); + }}; + + /** + * Get base image for Docker build + * Priority: Environment Variable > Default Value + * + * @return base image string + */ + public static String getBaseImage() { + String envImage = System.getenv(ENV_JDK_BASE_IMAGE); + if (envImage != null && !envImage.isEmpty()) { + // If it's a full image name (contains : or /), use it directly + if (envImage.contains(":") || envImage.contains("/")) { + System.out.println("[E2E] Using custom base image from environment: " + envImage); + return envImage; + } + // Otherwise, lookup from the predefined mapping + String mappedImage = JDK_IMAGE_MAP.get(envImage); + if (mappedImage != null) { + System.out.println("[E2E] Using mapped base image for JDK " + envImage + ": " + mappedImage); + return mappedImage; + } + System.out.println("[E2E] Warning: Unknown JDK version '" + envImage + "', using default: " + DEFAULT_BASE_IMAGE); + } else { + System.out.println("[E2E] Using default base image: " + DEFAULT_BASE_IMAGE); + } + return DEFAULT_BASE_IMAGE; + } } diff --git a/e2e-test/e2e-test-builder/src/main/java/org/apache/seata/generator/DockerFileForJarGenerator.java b/e2e-test/e2e-test-builder/src/main/java/org/apache/seata/generator/DockerFileForJarGenerator.java index 5f67c47ad..e30bbc759 100644 --- a/e2e-test/e2e-test-builder/src/main/java/org/apache/seata/generator/DockerFileForJarGenerator.java +++ b/e2e-test/e2e-test-builder/src/main/java/org/apache/seata/generator/DockerFileForJarGenerator.java @@ -83,8 +83,11 @@ private void generateApplicationDcokerFiles(E2EConfig e2EConfig, File composeDir String moduleComposeDir = new File(composeDir, e2EConfig.getScene_name() + "-" + module.getName()).getAbsolutePath(); try { + String baseImage = ConfigConstants.getBaseImage(); Map props = new HashMap<>(); props.put("sourceJar", module.getName() + ".jar"); + props.put("baseImage", baseImage); + LOGGER.info("Generating Dockerfile for module {} with base image: {}", module.getName(), baseImage); cfg.getTemplate("application-dockerFile.ftl") .process(props, new FileWriter(new File(moduleComposeDir, "Dockerfile"))); } catch (TemplateException | IOException e) { @@ -97,8 +100,11 @@ private void generateJarDcokerFiles(E2EConfig e2EConfig, File composeDir, Module String moduleComposeDir = new File(composeDir, e2EConfig.getScene_name() + "-" + module.getName()).getAbsolutePath(); try { + String baseImage = ConfigConstants.getBaseImage(); Map props = new HashMap<>(); props.put("sourceJar", module.getName() + ".jar"); + props.put("baseImage", baseImage); + LOGGER.info("Generating Dockerfile (Jar mode) for module {} with base image: {}", module.getName(), baseImage); cfg.getTemplate("jar-dockerFile.ftl") .process(props, new FileWriter(new File(moduleComposeDir, "Dockerfile"))); URL entryPoint = this.getClass().getClassLoader().getResource("sh/entrypoint.sh"); diff --git a/e2e-test/e2e-test-builder/src/main/resources/template/application-dockerFile.ftl b/e2e-test/e2e-test-builder/src/main/resources/template/application-dockerFile.ftl index c49483bc0..b011bc752 100644 --- a/e2e-test/e2e-test-builder/src/main/resources/template/application-dockerFile.ftl +++ b/e2e-test/e2e-test-builder/src/main/resources/template/application-dockerFile.ftl @@ -15,7 +15,25 @@ limitations under the License. --> -FROM openjdk:8-jdk-alpine -RUN apk --no-cache add curl +FROM ${baseImage!"openjdk:8-jdk-alpine"} +RUN apk --no-cache add curl bash COPY ${sourceJar} /app.jar -ENTRYPOINT ["java","-jar","/app.jar"] \ No newline at end of file + +# Create startup script with JDK version logging +RUN echo '#!/bin/bash' > /startup.sh && \ + echo 'echo "=========================================="' >> /startup.sh && \ + echo 'echo "Seata E2E Test Container Starting..."' >> /startup.sh && \ + echo 'echo "=========================================="' >> /startup.sh && \ + echo 'echo "Base Image: ${baseImage!"openjdk:8-jdk-alpine"}"' >> /startup.sh && \ + echo 'echo "Java Version:"' >> /startup.sh && \ + echo 'java -version' >> /startup.sh && \ + echo 'echo "=========================================="' >> /startup.sh && \ + echo 'echo "Container Info:"' >> /startup.sh && \ + echo 'echo "Hostname: $(hostname)"' >> /startup.sh && \ + echo 'echo "Start Time: $(date)"' >> /startup.sh && \ + echo 'echo "=========================================="' >> /startup.sh && \ + echo 'echo "Starting Application..."' >> /startup.sh && \ + echo 'exec java -jar /app.jar' >> /startup.sh && \ + chmod +x /startup.sh + +ENTRYPOINT ["/startup.sh"] \ No newline at end of file diff --git a/e2e-test/e2e-test-builder/src/main/resources/template/jar-dockerFile.ftl b/e2e-test/e2e-test-builder/src/main/resources/template/jar-dockerFile.ftl index 5893d922a..83cbc0ffe 100644 --- a/e2e-test/e2e-test-builder/src/main/resources/template/jar-dockerFile.ftl +++ b/e2e-test/e2e-test-builder/src/main/resources/template/jar-dockerFile.ftl @@ -15,8 +15,26 @@ limitations under the License. --> -FROM openjdk:8-jdk-alpine +FROM ${baseImage!"openjdk:8-jdk-alpine"} +RUN apk --no-cache add bash COPY ${sourceJar} /app.jar COPY entrypoint.sh /entrypoint.sh RUN chmod +x /entrypoint.sh -ENTRYPOINT ["/entrypoint.sh"] \ No newline at end of file + +# Log JDK version information on container start +RUN echo '#!/bin/bash' > /log-jdk-info.sh && \ + echo 'echo "=========================================="' >> /log-jdk-info.sh && \ + echo 'echo "Seata E2E Test Container (Jar Mode)"' >> /log-jdk-info.sh && \ + echo 'echo "=========================================="' >> /log-jdk-info.sh && \ + echo 'echo "Base Image: ${baseImage!"openjdk:8-jdk-alpine"}"' >> /log-jdk-info.sh && \ + echo 'echo "Java Version:"' >> /log-jdk-info.sh && \ + echo 'java -version' >> /log-jdk-info.sh && \ + echo 'echo "=========================================="' >> /log-jdk-info.sh && \ + echo 'echo "Container Info:"' >> /log-jdk-info.sh && \ + echo 'echo "Hostname: $(hostname)"' >> /log-jdk-info.sh && \ + echo 'echo "Start Time: $(date)"' >> /log-jdk-info.sh && \ + echo 'echo "=========================================="' >> /log-jdk-info.sh && \ + echo '/entrypoint.sh' >> /log-jdk-info.sh && \ + chmod +x /log-jdk-info.sh + +ENTRYPOINT ["/log-jdk-info.sh"] \ No newline at end of file diff --git a/e2e-test/scripts/prepare-test.sh b/e2e-test/scripts/prepare-test.sh index 6c31af704..4ac79b53c 100644 --- a/e2e-test/scripts/prepare-test.sh +++ b/e2e-test/scripts/prepare-test.sh @@ -17,18 +17,41 @@ # limitations under the License. # -echo "start prepare Seata e2e test scene" +echo "==========================================" +echo "Start Preparing Seata E2E Test Scenes" +echo "==========================================" + +# Print environment information +echo "[INFO] Build Environment:" +echo " - Build Time: $(date)" +echo " - Java Version: $(java -version 2>&1 | head -n 1)" +if [ -n "$E2E_JDK_BASE_IMAGE" ]; then + echo " - Docker Base Image: $E2E_JDK_BASE_IMAGE" +else + echo " - Docker Base Image: openjdk:8-jdk-alpine (default)" +fi +echo "==========================================" + DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" TEST_DIR="$(dirname "$DIR")" PROJECT_DIR="$(dirname "$(dirname "$DIR")")" + +echo "[INFO] Building e2e-test-builder module..." cd $TEST_DIR/e2e-test-builder mvn clean install -DskipTests result=$? if [ $result -ne 0 ]; then - echo "Build seata e2e-test-builder failure" + echo "[ERROR] Build seata e2e-test-builder failure" exit $result fi + +echo "[INFO] Copying e2e-test-builder jar..." cd $PROJECT_DIR cp $TEST_DIR/e2e-test-builder/target/e2e-test-builder-*-jar-with-dependencies.jar $PROJECT_DIR/e2e-test-builder.jar + +echo "[INFO] Generating test scenes and Docker images..." java -jar ./e2e-test-builder.jar ./ -echo "finish prepare Seata e2e test scene" \ No newline at end of file + +echo "==========================================" +echo "Finish Preparing Seata E2E Test Scenes" +echo "==========================================" \ No newline at end of file diff --git a/e2e-test/scripts/test-jdk-versions.sh b/e2e-test/scripts/test-jdk-versions.sh new file mode 100644 index 000000000..7a0081ae1 --- /dev/null +++ b/e2e-test/scripts/test-jdk-versions.sh @@ -0,0 +1,82 @@ +#!/bin/bash + +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# This script tests different JDK versions for E2E testing + +echo "==========================================" +echo "Seata E2E Multi-JDK Version Test Script" +echo "==========================================" + +# Array of JDK versions to test +JDK_VERSIONS=("8" "11" "17") + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +PROJECT_DIR="$(dirname "$(dirname "$DIR")")" + +# Test each JDK version +for jdk_version in "${JDK_VERSIONS[@]}" +do + echo "" + echo "==========================================" + echo "Testing with JDK Version: $jdk_version" + echo "==========================================" + + export E2E_JDK_BASE_IMAGE="$jdk_version" + + echo "[INFO] Running prepare-test.sh with JDK $jdk_version..." + cd "$DIR" + sh prepare-test.sh + + if [ $? -ne 0 ]; then + echo "[ERROR] prepare-test.sh failed for JDK $jdk_version" + exit 1 + fi + + echo "[INFO] Checking generated Dockerfile..." + # Find first generated Dockerfile and verify it contains the correct base image + dockerfile=$(find "$PROJECT_DIR/tmp/images" -name "Dockerfile" -type f | head -n 1) + if [ -n "$dockerfile" ]; then + echo "[INFO] Sample Dockerfile content:" + head -n 5 "$dockerfile" + + # Verify base image is correct + if grep -q "FROM.*$jdk_version" "$dockerfile" || grep -q "FROM openjdk:$jdk_version" "$dockerfile"; then + echo "[SUCCESS] ✓ Dockerfile contains correct JDK version" + else + echo "[WARNING] ⚠ Dockerfile may not contain expected JDK version" + fi + else + echo "[WARNING] No Dockerfile found in tmp/images" + fi + + echo "[INFO] Cleaning up tmp directory..." + rm -rf "$PROJECT_DIR/tmp" + + echo "[SUCCESS] JDK $jdk_version test preparation completed" +done + +echo "" +echo "==========================================" +echo "All JDK version tests completed!" +echo "==========================================" +echo "" +echo "Note: This script only tests the preparation phase." +echo "To run full E2E tests, use: sh test-run.sh" +echo "" + diff --git a/e2e-test/scripts/test-run.sh b/e2e-test/scripts/test-run.sh index 1cc810794..ef58caf90 100644 --- a/e2e-test/scripts/test-run.sh +++ b/e2e-test/scripts/test-run.sh @@ -17,32 +17,60 @@ # limitations under the License. # -echo "start run Seata e2e test scene" +echo "==========================================" +echo "Start Running Seata E2E Test Scenes" +echo "==========================================" + +# Print test environment information +echo "[INFO] Test Environment:" +echo " - Test Time: $(date)" +echo " - Java Version: $(java -version 2>&1 | head -n 1)" +if [ -n "$E2E_JDK_BASE_IMAGE" ]; then + echo " - Docker Runtime JDK: $E2E_JDK_BASE_IMAGE" +else + echo " - Docker Runtime JDK: openjdk:8-jdk-alpine (default)" +fi +echo "==========================================" + DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" TEST_DIR="$(dirname "$DIR")" PROJECT_DIR="$(dirname "$(dirname "$DIR")")" + +echo "[INFO] Building e2e-test module..." cd $TEST_DIR mvn clean install -DskipTests result=$? if [ $result -ne 0 ]; then - echo "Build seata e2e-test failure" + echo "[ERROR] Build seata e2e-test failure" exit $result fi + +echo "[INFO] Building e2e-test-runner module..." cd $TEST_DIR/e2e-test-runner mvn clean install -DskipTests result=$? if [ $result -ne 0 ]; then - echo "Build seata e2e-test-runner failure" + echo "[ERROR] Build seata e2e-test-runner failure" exit $result fi + +echo "[INFO] Copying e2e-test-runner jar..." cd $PROJECT_DIR cp $TEST_DIR/e2e-test-runner/target/e2e-test-runner-*-jar-with-dependencies.jar $PROJECT_DIR/e2e-test-runner.jar -echo "start run seata test by skywalking e2e framework" + +echo "==========================================" +echo "[INFO] Running tests by SkyWalking E2E framework" +echo "==========================================" pwd java -jar ./e2e-test-runner.jar ./tmp/scene-test result=$? + +echo "==========================================" if [ $result -ne 0 ]; then - echo "run seata e2e-test-runner failure" + echo "[ERROR] E2E test execution failed with exit code: $result" + echo "==========================================" exit $result -fi -echo "finish run Seata e2e test scene" \ No newline at end of file +else + echo "[SUCCESS] All E2E tests passed!" + echo "==========================================" +fi \ No newline at end of file diff --git a/e2e-test/seata-e2e-example.yaml b/e2e-test/seata-e2e-example.yaml new file mode 100644 index 000000000..0e8a646de --- /dev/null +++ b/e2e-test/seata-e2e-example.yaml @@ -0,0 +1,104 @@ +# Seata E2E Configuration Example with Module Type +# This file demonstrates how to configure different module types + +e2e: + scene_name: example-scene + + # Retry configuration + retry: + max: 5 + interval: 20s + total_timeout: 20m + + # Service modules + modules: + # Consumer services (业务调用方) + consumers: + - name: business-service + # Optional: Specify module type + # - "Application": Use application-dockerFile.ftl (auto-start with java -jar) + # - "Jar": Use jar-dockerFile.ftl (container keeps running, manual start) + # - If not specified: defaults to "Application" + moduleType: Application + docker_service: + hostname: business-service + restart: on-failure + container_name: test + depends_on: + account-service: + condition: service_started + environment: + SEATA_SERVER: seata + + # Provider services (业务服务提供方) + providers: + - name: account-service + # Example: Using Jar mode (container keeps running) + moduleType: Jar + docker_service: + hostname: account-service + restart: on-failure + depends_on: + mysql: + condition: service_healthy + environment: + MYSQL_HOST: mysql + + - name: order-service + # Default mode (Application) - no need to specify + docker_service: + hostname: order-service + restart: on-failure + depends_on: + mysql: + condition: service_healthy + + # Infrastructure services (基础设施) + infrastructures: + - name: mysql + docker_service: + hostname: mysql + image: mysql:5.7 + volumes: + - ./e2e-files/init.sql:/docker-entrypoint-initdb.d/init.sql + restart: always + environment: + MYSQL_ROOT_PASSWORD: 123456 + MYSQL_DATABASE: seata + healthcheck: + test: '[ "CMD", "mysqladmin" ,"ping", "-h", "localhost" ]' + interval: 5s + timeout: 10s + retries: 10 + + - name: seata-server + docker_service: + hostname: seata + image: apache/seata-server:2.1.0 + environment: + SEATA_PORT: 8091 + STORE_MODE: file + + # Test cases to verify + cases: + - name: rollback test + invoke: 'docker exec test curl http://127.0.0.1:8080/testRollback' + verify: './e2e-files/rollback.yaml' + + - name: commit test + invoke: 'docker exec test curl http://127.0.0.1:8080/testCommit' + verify: './e2e-files/commit.yaml' + +# JDK Version Configuration (via environment variable) +# Set E2E_JDK_BASE_IMAGE environment variable before running prepare-test.sh: +# +# Quick version (uses predefined mapping): +# export E2E_JDK_BASE_IMAGE=11 +# export E2E_JDK_BASE_IMAGE=17 +# +# Full image name: +# export E2E_JDK_BASE_IMAGE=openjdk:11-jdk-alpine +# export E2E_JDK_BASE_IMAGE=azul/zulu-openjdk-alpine:17 +# +# Default (if not set): openjdk:8-jdk-alpine + From 6f2c0d2f33623f00c1ae1e99f10fb96670d5b883 Mon Sep 17 00:00:00 2001 From: slievrly Date: Sat, 27 Dec 2025 11:07:16 +0800 Subject: [PATCH 02/14] add header Signed-off-by: slievrly --- e2e-test/seata-e2e-example.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/e2e-test/seata-e2e-example.yaml b/e2e-test/seata-e2e-example.yaml index 0e8a646de..009d42525 100644 --- a/e2e-test/seata-e2e-example.yaml +++ b/e2e-test/seata-e2e-example.yaml @@ -1,3 +1,20 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + # Seata E2E Configuration Example with Module Type # This file demonstrates how to configure different module types From 4686a87d97114be7894d4aba0ccb8455c733a787 Mon Sep 17 00:00:00 2001 From: slievrly Date: Sat, 27 Dec 2025 11:09:49 +0800 Subject: [PATCH 03/14] update upload-artifact Signed-off-by: slievrly --- .github/workflows/E2E.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/E2E.yml b/.github/workflows/E2E.yml index 5a032cebf..e6a2a6b70 100644 --- a/.github/workflows/E2E.yml +++ b/.github/workflows/E2E.yml @@ -92,7 +92,7 @@ jobs: - name: Upload test logs on failure if: failure() - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: e2e-test-logs-jdk${{ matrix.build_jdk }}-docker-jdk${{ matrix.docker_jdk }} path: | From 641b5ecb28aa55fb2f774cbcd4c18ea9b1fbc14a Mon Sep 17 00:00:00 2001 From: slievrly Date: Sat, 27 Dec 2025 12:06:17 +0800 Subject: [PATCH 04/14] fix Signed-off-by: slievrly --- .../template/application-dockerFile.ftl | 28 ++-- .../resources/template/jar-dockerFile.ftl | 26 ++-- e2e-test/scripts/diagnose-e2e-failure.sh | 138 ++++++++++++++++++ 3 files changed, 165 insertions(+), 27 deletions(-) create mode 100644 e2e-test/scripts/diagnose-e2e-failure.sh diff --git a/e2e-test/e2e-test-builder/src/main/resources/template/application-dockerFile.ftl b/e2e-test/e2e-test-builder/src/main/resources/template/application-dockerFile.ftl index b011bc752..01bee264f 100644 --- a/e2e-test/e2e-test-builder/src/main/resources/template/application-dockerFile.ftl +++ b/e2e-test/e2e-test-builder/src/main/resources/template/application-dockerFile.ftl @@ -20,20 +20,20 @@ RUN apk --no-cache add curl bash COPY ${sourceJar} /app.jar # Create startup script with JDK version logging -RUN echo '#!/bin/bash' > /startup.sh && \ - echo 'echo "=========================================="' >> /startup.sh && \ - echo 'echo "Seata E2E Test Container Starting..."' >> /startup.sh && \ - echo 'echo "=========================================="' >> /startup.sh && \ - echo 'echo "Base Image: ${baseImage!"openjdk:8-jdk-alpine"}"' >> /startup.sh && \ - echo 'echo "Java Version:"' >> /startup.sh && \ - echo 'java -version' >> /startup.sh && \ - echo 'echo "=========================================="' >> /startup.sh && \ - echo 'echo "Container Info:"' >> /startup.sh && \ - echo 'echo "Hostname: $(hostname)"' >> /startup.sh && \ - echo 'echo "Start Time: $(date)"' >> /startup.sh && \ - echo 'echo "=========================================="' >> /startup.sh && \ - echo 'echo "Starting Application..."' >> /startup.sh && \ - echo 'exec java -jar /app.jar' >> /startup.sh && \ +RUN printf '#!/bin/bash\n\ +echo "=========================================="\n\ +echo "Seata E2E Test Container Starting..."\n\ +echo "=========================================="\n\ +echo "Base Image: ${baseImage!"openjdk:8-jdk-alpine"}"\n\ +echo "Java Version:"\n\ +java -version 2>&1\n\ +echo "=========================================="\n\ +echo "Container Info:"\n\ +echo "Hostname: $(hostname)"\n\ +echo "Start Time: $(date)"\n\ +echo "=========================================="\n\ +echo "Starting Application..."\n\ +exec java -jar /app.jar\n' > /startup.sh && \ chmod +x /startup.sh ENTRYPOINT ["/startup.sh"] \ No newline at end of file diff --git a/e2e-test/e2e-test-builder/src/main/resources/template/jar-dockerFile.ftl b/e2e-test/e2e-test-builder/src/main/resources/template/jar-dockerFile.ftl index 83cbc0ffe..e5689cd56 100644 --- a/e2e-test/e2e-test-builder/src/main/resources/template/jar-dockerFile.ftl +++ b/e2e-test/e2e-test-builder/src/main/resources/template/jar-dockerFile.ftl @@ -22,19 +22,19 @@ COPY entrypoint.sh /entrypoint.sh RUN chmod +x /entrypoint.sh # Log JDK version information on container start -RUN echo '#!/bin/bash' > /log-jdk-info.sh && \ - echo 'echo "=========================================="' >> /log-jdk-info.sh && \ - echo 'echo "Seata E2E Test Container (Jar Mode)"' >> /log-jdk-info.sh && \ - echo 'echo "=========================================="' >> /log-jdk-info.sh && \ - echo 'echo "Base Image: ${baseImage!"openjdk:8-jdk-alpine"}"' >> /log-jdk-info.sh && \ - echo 'echo "Java Version:"' >> /log-jdk-info.sh && \ - echo 'java -version' >> /log-jdk-info.sh && \ - echo 'echo "=========================================="' >> /log-jdk-info.sh && \ - echo 'echo "Container Info:"' >> /log-jdk-info.sh && \ - echo 'echo "Hostname: $(hostname)"' >> /log-jdk-info.sh && \ - echo 'echo "Start Time: $(date)"' >> /log-jdk-info.sh && \ - echo 'echo "=========================================="' >> /log-jdk-info.sh && \ - echo '/entrypoint.sh' >> /log-jdk-info.sh && \ +RUN printf '#!/bin/bash\n\ +echo "=========================================="\n\ +echo "Seata E2E Test Container (Jar Mode)"\n\ +echo "=========================================="\n\ +echo "Base Image: ${baseImage!"openjdk:8-jdk-alpine"}"\n\ +echo "Java Version:"\n\ +java -version 2>&1\n\ +echo "=========================================="\n\ +echo "Container Info:"\n\ +echo "Hostname: $(hostname)"\n\ +echo "Start Time: $(date)"\n\ +echo "=========================================="\n\ +exec /entrypoint.sh\n' > /log-jdk-info.sh && \ chmod +x /log-jdk-info.sh ENTRYPOINT ["/log-jdk-info.sh"] \ No newline at end of file diff --git a/e2e-test/scripts/diagnose-e2e-failure.sh b/e2e-test/scripts/diagnose-e2e-failure.sh new file mode 100644 index 000000000..d4586b0e1 --- /dev/null +++ b/e2e-test/scripts/diagnose-e2e-failure.sh @@ -0,0 +1,138 @@ +#!/bin/bash + +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# E2E Test Failure Diagnostic Script + +SCENE_NAME=${1:-"saga-spring-seata-saga"} + +echo "==========================================" +echo "E2E Test Failure Diagnostic Tool" +echo "==========================================" +echo "Diagnosing scene: $SCENE_NAME" +echo "" + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +PROJECT_DIR="$(dirname "$(dirname "$DIR")")" +SCENE_DIR="$PROJECT_DIR/tmp/scene-test/$SCENE_NAME" + +if [ ! -d "$SCENE_DIR" ]; then + echo "[ERROR] Scene directory not found: $SCENE_DIR" + echo "Please run prepare-test.sh first." + exit 1 +fi + +cd "$SCENE_DIR" + +echo "[INFO] Checking docker-compose.yaml..." +if [ -f "docker-compose.yaml" ]; then + echo "✓ docker-compose.yaml exists" + echo "" + echo "--- docker-compose.yaml content (first 30 lines) ---" + head -n 30 docker-compose.yaml + echo "" +else + echo "✗ docker-compose.yaml NOT found!" + exit 1 +fi + +echo "[INFO] Checking generated Dockerfiles..." +IMAGE_DIRS=$(find "$PROJECT_DIR/tmp/images" -type d -name "${SCENE_NAME}*" 2>/dev/null) +if [ -n "$IMAGE_DIRS" ]; then + for img_dir in $IMAGE_DIRS; do + echo "" + echo "--- Dockerfile in $img_dir ---" + if [ -f "$img_dir/Dockerfile" ]; then + cat "$img_dir/Dockerfile" + echo "" + + # Try to build the image + echo "[INFO] Testing Docker image build..." + cd "$img_dir" + docker build --no-cache -t "test-$(basename $img_dir)" . 2>&1 | tail -n 20 + BUILD_RESULT=${PIPESTATUS[0]} + if [ $BUILD_RESULT -eq 0 ]; then + echo "✓ Docker image built successfully" + else + echo "✗ Docker image build FAILED (exit code: $BUILD_RESULT)" + fi + fi + done +fi + +cd "$SCENE_DIR" + +echo "" +echo "[INFO] Validating docker-compose configuration..." +docker-compose config > /dev/null 2>&1 +if [ $? -eq 0 ]; then + echo "✓ docker-compose.yaml syntax is valid" +else + echo "✗ docker-compose.yaml has syntax errors:" + docker-compose config 2>&1 + exit 1 +fi + +echo "" +echo "[INFO] Attempting to start services with detailed logs..." +echo "This will start the containers and show startup logs..." +echo "" + +# Clean up any existing containers +docker-compose down -v 2>/dev/null + +# Try to start with logs +timeout 60s docker-compose up --abort-on-container-exit 2>&1 | tee /tmp/docker-compose-diagnostic.log + +echo "" +echo "==========================================" +echo "Diagnostic Summary" +echo "==========================================" + +# Check for common issues in logs +if grep -q "port is already allocated" /tmp/docker-compose-diagnostic.log; then + echo "⚠ Port conflict detected - some ports are already in use" +fi + +if grep -q "No such file or directory" /tmp/docker-compose-diagnostic.log; then + echo "⚠ Missing file detected - check volume mounts" +fi + +if grep -q "executable file not found" /tmp/docker-compose-diagnostic.log; then + echo "⚠ Script execution error - check entrypoint scripts" +fi + +if grep -q "cannot execute binary file" /tmp/docker-compose-diagnostic.log; then + echo "⚠ Binary compatibility issue - check base image architecture" +fi + +echo "" +echo "[INFO] Full diagnostic log saved to: /tmp/docker-compose-diagnostic.log" +echo "" +echo "To manually inspect:" +echo " cd $SCENE_DIR" +echo " docker-compose up" +echo "" +echo "To check container logs:" +echo " docker-compose logs " +echo "" +echo "To clean up:" +echo " cd $SCENE_DIR" +echo " docker-compose down -v" +echo "" + From 420d30865693be3c965741d06c11f066b9c0d585 Mon Sep 17 00:00:00 2001 From: slievrly Date: Sat, 27 Dec 2025 12:36:45 +0800 Subject: [PATCH 05/14] fix Signed-off-by: slievrly --- .../generator/DockerComposeGenerator.java | 20 ++++++++++- .../generator/DockerFileForJarGenerator.java | 35 +++++++++++++++++-- .../generator/SkyWalkingE2EFileGenerator.java | 19 +++++++++- 3 files changed, 70 insertions(+), 4 deletions(-) diff --git a/e2e-test/e2e-test-builder/src/main/java/org/apache/seata/generator/DockerComposeGenerator.java b/e2e-test/e2e-test-builder/src/main/java/org/apache/seata/generator/DockerComposeGenerator.java index 109695d8b..a737a88f2 100644 --- a/e2e-test/e2e-test-builder/src/main/java/org/apache/seata/generator/DockerComposeGenerator.java +++ b/e2e-test/e2e-test-builder/src/main/java/org/apache/seata/generator/DockerComposeGenerator.java @@ -27,6 +27,7 @@ import java.io.File; import java.io.FileWriter; import java.io.IOException; +import java.nio.file.Files; import java.util.HashMap; import java.util.Map; @@ -58,8 +59,25 @@ public void generateDockerComposeFile(E2EConfig e2EConfig, File file) { Modules modules = e2EConfig.getModules(); Map map = new HashMap<>(); map.put("modules", modules); + + File composeFile = new File(file, COMPOSE_FILE); cfg.getTemplate("dockercompose.ftl") - .process(map, new FileWriter(new File(file, COMPOSE_FILE))); + .process(map, new FileWriter(composeFile)); + + // Log the generated docker-compose.yaml content + LOGGER.info("=========================================="); + LOGGER.info("Generated docker-compose.yaml for scene: {}", e2EConfig.getScene_name()); + LOGGER.info("Location: {}", composeFile.getAbsolutePath()); + LOGGER.info("=========================================="); + + try { + String content = new String(Files.readAllBytes(composeFile.toPath())); + LOGGER.info("Content:\n{}", content); + LOGGER.info("=========================================="); + } catch (IOException ex) { + LOGGER.warn("Could not read docker-compose.yaml content for logging", ex); + } + } catch (TemplateException | IOException e) { LOGGER.error(String.format("generate docker-compose file for %s fail", e2EConfig.getScene_name() + "-" + e2EConfig.getScene_name()), e); diff --git a/e2e-test/e2e-test-builder/src/main/java/org/apache/seata/generator/DockerFileForJarGenerator.java b/e2e-test/e2e-test-builder/src/main/java/org/apache/seata/generator/DockerFileForJarGenerator.java index e30bbc759..fa0c27712 100644 --- a/e2e-test/e2e-test-builder/src/main/java/org/apache/seata/generator/DockerFileForJarGenerator.java +++ b/e2e-test/e2e-test-builder/src/main/java/org/apache/seata/generator/DockerFileForJarGenerator.java @@ -88,8 +88,23 @@ private void generateApplicationDcokerFiles(E2EConfig e2EConfig, File composeDir props.put("sourceJar", module.getName() + ".jar"); props.put("baseImage", baseImage); LOGGER.info("Generating Dockerfile for module {} with base image: {}", module.getName(), baseImage); + + File dockerFile = new File(moduleComposeDir, "Dockerfile"); cfg.getTemplate("application-dockerFile.ftl") - .process(props, new FileWriter(new File(moduleComposeDir, "Dockerfile"))); + .process(props, new FileWriter(dockerFile)); + + // Log the generated Dockerfile content + LOGGER.info("------------------------------------------"); + LOGGER.info("Dockerfile for module: {}", module.getName()); + LOGGER.info("Location: {}", dockerFile.getAbsolutePath()); + LOGGER.info("------------------------------------------"); + try { + String content = new String(Files.readAllBytes(dockerFile.toPath())); + LOGGER.info("Content:\n{}", content); + LOGGER.info("------------------------------------------"); + } catch (IOException ex) { + LOGGER.warn("Could not read Dockerfile content for logging", ex); + } } catch (TemplateException | IOException e) { LOGGER.error(String.format("generate docker file %s fail", e2EConfig.getScene_name() + "-" + module.getName()), e); @@ -105,11 +120,27 @@ private void generateJarDcokerFiles(E2EConfig e2EConfig, File composeDir, Module props.put("sourceJar", module.getName() + ".jar"); props.put("baseImage", baseImage); LOGGER.info("Generating Dockerfile (Jar mode) for module {} with base image: {}", module.getName(), baseImage); + + File dockerFile = new File(moduleComposeDir, "Dockerfile"); cfg.getTemplate("jar-dockerFile.ftl") - .process(props, new FileWriter(new File(moduleComposeDir, "Dockerfile"))); + .process(props, new FileWriter(dockerFile)); + URL entryPoint = this.getClass().getClassLoader().getResource("sh/entrypoint.sh"); Path destPath = Paths.get(moduleComposeDir, "entrypoint.sh"); Files.copy(Paths.get(entryPoint.toURI()), destPath, StandardCopyOption.REPLACE_EXISTING); + + // Log the generated Dockerfile content + LOGGER.info("------------------------------------------"); + LOGGER.info("Dockerfile (Jar mode) for module: {}", module.getName()); + LOGGER.info("Location: {}", dockerFile.getAbsolutePath()); + LOGGER.info("------------------------------------------"); + try { + String content = new String(Files.readAllBytes(dockerFile.toPath())); + LOGGER.info("Content:\n{}", content); + LOGGER.info("------------------------------------------"); + } catch (IOException ex) { + LOGGER.warn("Could not read Dockerfile content for logging", ex); + } } catch (TemplateException | IOException | URISyntaxException e) { LOGGER.error(String.format("generate docker file %s fail", e2EConfig.getScene_name() + "-" + module.getName()), e); diff --git a/e2e-test/e2e-test-builder/src/main/java/org/apache/seata/generator/SkyWalkingE2EFileGenerator.java b/e2e-test/e2e-test-builder/src/main/java/org/apache/seata/generator/SkyWalkingE2EFileGenerator.java index c93eb81c3..b9302bbb9 100644 --- a/e2e-test/e2e-test-builder/src/main/java/org/apache/seata/generator/SkyWalkingE2EFileGenerator.java +++ b/e2e-test/e2e-test-builder/src/main/java/org/apache/seata/generator/SkyWalkingE2EFileGenerator.java @@ -27,6 +27,7 @@ import java.io.File; import java.io.FileWriter; import java.io.IOException; +import java.nio.file.Files; import java.util.HashMap; import java.util.Map; @@ -56,8 +57,24 @@ public void generateSkyWalkingE2EFile(E2EConfig e2EConfig, File file) { Map map = new HashMap<>(); map.put("retry", e2EConfig.getRetry()); map.put("cases", e2EConfig.getCases()); + + File e2eFile = new File(file, ConfigConstants.SKY_WALKING_E2E_FILE); cfg.getTemplate("skywalking-e2e.ftl") - .process(map, new FileWriter(new File(file, ConfigConstants.SKY_WALKING_E2E_FILE))); + .process(map, new FileWriter(e2eFile)); + + // Log the generated e2e.yaml content + LOGGER.info("=========================================="); + LOGGER.info("Generated e2e.yaml for scene: {}", e2EConfig.getScene_name()); + LOGGER.info("Location: {}", e2eFile.getAbsolutePath()); + LOGGER.info("=========================================="); + + try { + String content = new String(Files.readAllBytes(e2eFile.toPath())); + LOGGER.info("Content:\n{}", content); + LOGGER.info("=========================================="); + } catch (IOException ex) { + LOGGER.warn("Could not read e2e.yaml content for logging", ex); + } } catch (TemplateException | IOException e) { LOGGER.error(String.format("generate SkyWalking e2e test file for %s fail", e2EConfig.getScene_name() + "-" + e2EConfig.getScene_name()), e); From 15f54df07398390a2234ce69c7cf2a3a9bfe0748 Mon Sep 17 00:00:00 2001 From: slievrly Date: Sat, 27 Dec 2025 14:31:38 +0800 Subject: [PATCH 06/14] fix Signed-off-by: slievrly --- .../controller/SkyWalkingController.java | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/e2e-test/e2e-test-runner/src/main/java/org/apache/seata/controller/SkyWalkingController.java b/e2e-test/e2e-test-runner/src/main/java/org/apache/seata/controller/SkyWalkingController.java index 5b33c962c..a67b80922 100644 --- a/e2e-test/e2e-test-runner/src/main/java/org/apache/seata/controller/SkyWalkingController.java +++ b/e2e-test/e2e-test-runner/src/main/java/org/apache/seata/controller/SkyWalkingController.java @@ -106,6 +106,10 @@ private static int runTest(File file) { if (exitCode != 0) { LOGGER.warn(String.format(" Seate e2e test %s by SkyWalking-E2E fail with exit code %d", file.getName(), exitCode)); + + // Print diagnostic information on failure + printDiagnosticInfo(file); + return exitCode; } } catch (Exception e) { @@ -115,4 +119,53 @@ private static int runTest(File file) { return 0; } + + private static void printDiagnosticInfo(File testDir) { + LOGGER.error("=========================================="); + LOGGER.error("DIAGNOSTIC INFORMATION FOR FAILED TEST"); + LOGGER.error("Test Directory: {}", testDir.getAbsolutePath()); + LOGGER.error("=========================================="); + + // Print docker-compose.yaml + File composeFile = new File(testDir, "docker-compose.yaml"); + if (composeFile.exists()) { + try { + String content = new String(java.nio.file.Files.readAllBytes(composeFile.toPath())); + LOGGER.error("docker-compose.yaml content:\n{}", content); + } catch (Exception e) { + LOGGER.error("Failed to read docker-compose.yaml", e); + } + } else { + LOGGER.error("docker-compose.yaml NOT FOUND!"); + } + + LOGGER.error("------------------------------------------"); + + // Print e2e.yaml + File e2eFile = new File(testDir, "e2e.yaml"); + if (e2eFile.exists()) { + try { + String content = new String(java.nio.file.Files.readAllBytes(e2eFile.toPath())); + LOGGER.error("e2e.yaml content:\n{}", content); + } catch (Exception e) { + LOGGER.error("Failed to read e2e.yaml", e); + } + } + + LOGGER.error("------------------------------------------"); + + // Try to get docker-compose logs + try { + LOGGER.error("Attempting to get docker-compose logs..."); + ProcessBuilder logsBuilder = new ProcessBuilder("docker-compose", "logs", "--tail=50"); + logsBuilder.directory(testDir); + Process logsProcess = logsBuilder.start(); + printProcessLog(LOGGER, logsProcess); + logsProcess.waitFor(); + } catch (Exception e) { + LOGGER.error("Failed to get docker-compose logs", e); + } + + LOGGER.error("=========================================="); + } } From 858e4f0511682df415bf35e7f9932aa8f8e4f2a2 Mon Sep 17 00:00:00 2001 From: slievrly Date: Sun, 8 Feb 2026 22:09:03 +0800 Subject: [PATCH 07/14] fix jdk version Signed-off-by: slievrly --- .../main/java/org/apache/seata/config/ConfigConstants.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/e2e-test/e2e-test-builder/src/main/java/org/apache/seata/config/ConfigConstants.java b/e2e-test/e2e-test-builder/src/main/java/org/apache/seata/config/ConfigConstants.java index b08f57a1d..12c298dbd 100644 --- a/e2e-test/e2e-test-builder/src/main/java/org/apache/seata/config/ConfigConstants.java +++ b/e2e-test/e2e-test-builder/src/main/java/org/apache/seata/config/ConfigConstants.java @@ -40,9 +40,9 @@ public class ConfigConstants { // Predefined JDK image mapping private static final Map JDK_IMAGE_MAP = new HashMap() {{ - put("8", "openjdk:8-jdk-alpine"); - put("11", "openjdk:11-jdk-alpine"); - put("17", "openjdk:17-jdk-alpine"); + put("8", "eclipse-temurin:8-jdk-alpine"); + put("11", "eclipse-temurin:8-jdk-alpine"); + put("17", "eclipse-temurin:17-jdk-alpine"); put("21", "eclipse-temurin:21-jdk-alpine"); // Support for different distributions put("8-zulu", "azul/zulu-openjdk-alpine:8"); From 3c3cabe48f33fd1ac6a3423587e3e48ae9042ab2 Mon Sep 17 00:00:00 2001 From: slievrly Date: Sun, 8 Feb 2026 22:12:40 +0800 Subject: [PATCH 08/14] fix jdk version Signed-off-by: slievrly --- .../java/org/apache/seata/config/ConfigConstants.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/e2e-test/e2e-test-builder/src/main/java/org/apache/seata/config/ConfigConstants.java b/e2e-test/e2e-test-builder/src/main/java/org/apache/seata/config/ConfigConstants.java index 12c298dbd..dc2d6ae78 100644 --- a/e2e-test/e2e-test-builder/src/main/java/org/apache/seata/config/ConfigConstants.java +++ b/e2e-test/e2e-test-builder/src/main/java/org/apache/seata/config/ConfigConstants.java @@ -45,10 +45,10 @@ public class ConfigConstants { put("17", "eclipse-temurin:17-jdk-alpine"); put("21", "eclipse-temurin:21-jdk-alpine"); // Support for different distributions - put("8-zulu", "azul/zulu-openjdk-alpine:8"); - put("11-zulu", "azul/zulu-openjdk-alpine:11"); - put("17-zulu", "azul/zulu-openjdk-alpine:17"); - put("21-zulu", "azul/zulu-openjdk-alpine:21"); + put("8-zulu", "azul/zulu-openjdk:8"); + put("11-zulu", "azul/zulu-openjdk:11"); + put("17-zulu", "azul/zulu-openjdk:17"); + put("21-zulu", "azul/zulu-openjdk:21"); }}; /** From 0d564606238a8ba161b535eb4146be1cd9243ba8 Mon Sep 17 00:00:00 2001 From: slievrly Date: Sun, 8 Feb 2026 22:16:52 +0800 Subject: [PATCH 09/14] fix jdk version Signed-off-by: slievrly --- .github/workflows/E2E.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/E2E.yml b/.github/workflows/E2E.yml index 664b3fd4e..671f6e794 100644 --- a/.github/workflows/E2E.yml +++ b/.github/workflows/E2E.yml @@ -23,7 +23,7 @@ jobs: matrix: os: [ ubuntu-latest ] # Build JDK version - used for Maven compilation - build_jdk: [ 8, 11 ] + build_jdk: [ 8, 11, 17 ] # Docker JDK version - used in Docker images for runtime docker_jdk: [ 8, 11, 17 ] # Exclude some combinations to reduce test time @@ -31,6 +31,16 @@ jobs: # When building with JDK 8, skip testing with JDK 17 - build_jdk: 8 docker_jdk: 17 + - build_jdk: 8 + docker_jdk: 11 + - build_jdk: 11 + docker_jdk: 8 + - build_jdk: 11 + docker_jdk: 17 + - build_jdk: 17 + docker_jdk: 8 + - build_jdk: 17 + docker_jdk: 11 fail-fast: false max-parallel: 2 steps: From a6802e4120ca15d8a77a9a2abbb27fd5b429145f Mon Sep 17 00:00:00 2001 From: slievrly Date: Sun, 8 Feb 2026 22:39:10 +0800 Subject: [PATCH 10/14] optimize max-parallel value for 3jdk Signed-off-by: slievrly --- .github/workflows/E2E.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/E2E.yml b/.github/workflows/E2E.yml index 671f6e794..fa1d5ca88 100644 --- a/.github/workflows/E2E.yml +++ b/.github/workflows/E2E.yml @@ -42,7 +42,7 @@ jobs: - build_jdk: 17 docker_jdk: 11 fail-fast: false - max-parallel: 2 + max-parallel: 3 steps: - name: Uninstall Docker Compose v2 run: sudo rm -f /usr/local/bin/docker-compose From 0dd0d85d3d17e0cb31c87429fea25c097b208eb0 Mon Sep 17 00:00:00 2001 From: slievrly Date: Sun, 8 Feb 2026 22:44:17 +0800 Subject: [PATCH 11/14] optimize: add arm runner Signed-off-by: slievrly --- .github/workflows/E2E.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/E2E.yml b/.github/workflows/E2E.yml index fa1d5ca88..0884f3e40 100644 --- a/.github/workflows/E2E.yml +++ b/.github/workflows/E2E.yml @@ -21,7 +21,7 @@ jobs: DEBIAN_FRONTEND: noninteractive strategy: matrix: - os: [ ubuntu-latest ] + os: [ ubuntu-latest, ubuntu-24.04-arm] # Build JDK version - used for Maven compilation build_jdk: [ 8, 11, 17 ] # Docker JDK version - used in Docker images for runtime From 9f321ad39a36a6d550d09e9401991e38d51bb9d8 Mon Sep 17 00:00:00 2001 From: slievrly Date: Sun, 8 Feb 2026 22:51:04 +0800 Subject: [PATCH 12/14] optimize: add arm runner Signed-off-by: slievrly --- .github/workflows/E2E.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/E2E.yml b/.github/workflows/E2E.yml index 0884f3e40..339afb199 100644 --- a/.github/workflows/E2E.yml +++ b/.github/workflows/E2E.yml @@ -15,7 +15,7 @@ on: [ push,pull_request ] jobs: run_e2e: - name: Run E2E Test (Build JDK${{ matrix.build_jdk }}, Docker JDK${{ matrix.docker_jdk }}) + name: Run E2E Test (Build Arch${{ matrix.os }},JDK${{ matrix.build_jdk }}, Docker JDK${{ matrix.docker_jdk }}) runs-on: ${{ matrix.os }} env: DEBIAN_FRONTEND: noninteractive From 41730b2567bd64e142d29c8d23b4171b88cb3f59 Mon Sep 17 00:00:00 2001 From: slievrly Date: Sun, 8 Feb 2026 23:22:07 +0800 Subject: [PATCH 13/14] echo url Signed-off-by: slievrly --- .github/workflows/E2E.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/E2E.yml b/.github/workflows/E2E.yml index 339afb199..991d8b2b8 100644 --- a/.github/workflows/E2E.yml +++ b/.github/workflows/E2E.yml @@ -50,7 +50,11 @@ jobs: - name: Install Docker Compose v1 run: | DOCKER_COMPOSE_VERSION=1.29.2 - sudo curl -L "https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose + OS=$(uname -s) + ARCH=$(uname -m) + DOWNLOAD_URL="https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-${OS}-${ARCH}" + echo "download url: ${DOWNLOAD_URL}" >> $GITHUB_STEP_SUMMARY + sudo curl -L ${DOWNLOAD_URL} -o /usr/local/bin/docker-compose sudo chmod +x /usr/local/bin/docker-compose - name: Verify Docker Compose v1 installation From 7530e81cd558b15eca9b35a54af95c67a3fad2fa Mon Sep 17 00:00:00 2001 From: slievrly Date: Sun, 8 Feb 2026 23:49:53 +0800 Subject: [PATCH 14/14] echo url Signed-off-by: slievrly --- .github/workflows/E2E.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/E2E.yml b/.github/workflows/E2E.yml index 991d8b2b8..202b24bdb 100644 --- a/.github/workflows/E2E.yml +++ b/.github/workflows/E2E.yml @@ -50,9 +50,7 @@ jobs: - name: Install Docker Compose v1 run: | DOCKER_COMPOSE_VERSION=1.29.2 - OS=$(uname -s) - ARCH=$(uname -m) - DOWNLOAD_URL="https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-${OS}-${ARCH}" + DOWNLOAD_URL="https://github.com/docker/compose/releases/download/${VERSION}/docker-compose-$(uname -s)-$(uname -m)" echo "download url: ${DOWNLOAD_URL}" >> $GITHUB_STEP_SUMMARY sudo curl -L ${DOWNLOAD_URL} -o /usr/local/bin/docker-compose sudo chmod +x /usr/local/bin/docker-compose