From ed3750460cc606a01e5be4fed7678cb3ed199d6b Mon Sep 17 00:00:00 2001 From: warku123 Date: Wed, 5 Aug 2026 15:28:38 +0800 Subject: [PATCH 1/5] ci(integration): run single-node suite as smoke only, disable multinode CI Both integration suites are currently unstable per the integration-test team, so gate PRs on the smoke subset only: - single-node: pass --smoke to run only the smoke test subset - multinode: comment out push/pull_request triggers, keep workflow_dispatch for manual runs --- .../workflows/integration-test-multinode.yml | 19 +++++++++++-------- .../integration-test-single-node.yml | 4 +++- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/.github/workflows/integration-test-multinode.yml b/.github/workflows/integration-test-multinode.yml index fadfc2168d2..e549f2cf974 100644 --- a/.github/workflows/integration-test-multinode.yml +++ b/.github/workflows/integration-test-multinode.yml @@ -1,14 +1,17 @@ name: Integration Test Multinode (Full) on: - push: - branches: [ 'master', 'release_**' ] - pull_request: - branches: [ 'develop', 'release_**' ] - types: [ opened, synchronize, reopened ] - paths-ignore: [ '**/*.md', '.gitignore', '**/.gitignore', '.editorconfig', - '.gitattributes', 'docs/**', 'CHANGELOG', '.github/ISSUE_TEMPLATE/**', - '.github/PULL_REQUEST_TEMPLATE/**', '.github/CODEOWNERS' ] + # Disabled: the multinode integration suite is currently unstable (see the + # integration-test team). Re-enable the push/pull_request triggers below + # once the suite is fixed. + # push: + # branches: [ 'master', 'release_**' ] + # pull_request: + # branches: [ 'develop', 'release_**' ] + # types: [ opened, synchronize, reopened ] + # paths-ignore: [ '**/*.md', '.gitignore', '**/.gitignore', '.editorconfig', + # '.gitattributes', 'docs/**', 'CHANGELOG', '.github/ISSUE_TEMPLATE/**', + # '.github/PULL_REQUEST_TEMPLATE/**', '.github/CODEOWNERS' ] workflow_dispatch: concurrency: diff --git a/.github/workflows/integration-test-single-node.yml b/.github/workflows/integration-test-single-node.yml index b0c10247a7f..c07b968244f 100644 --- a/.github/workflows/integration-test-single-node.yml +++ b/.github/workflows/integration-test-single-node.yml @@ -58,7 +58,9 @@ jobs: -e JAVA_HOME_17=/opt/java/openjdk \ -v "${{ github.workspace }}/build/libs/FullNode.jar:/javatron/FullNode.jar:ro" \ troninfra/troninfra-ci:latest \ - --clean + # Smoke only: the full single-node suite is currently unstable + # (per the integration-test team), so run the smoke subset. + --clean --smoke - name: Extract test reports from container if: always() From e3eecec624a6675df6ab0bd76b43d08f4af56839 Mon Sep 17 00:00:00 2001 From: warku123 Date: Wed, 5 Aug 2026 15:32:28 +0800 Subject: [PATCH 2/5] ci(integration): rename single-node workflow/steps to Smoke --- .github/workflows/integration-test-single-node.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/integration-test-single-node.yml b/.github/workflows/integration-test-single-node.yml index c07b968244f..5d54ef7490f 100644 --- a/.github/workflows/integration-test-single-node.yml +++ b/.github/workflows/integration-test-single-node.yml @@ -1,4 +1,4 @@ -name: Integration Test Single Node (Full) +name: Integration Test Single Node (Smoke) on: push: @@ -17,7 +17,7 @@ concurrency: jobs: integration: - name: Integration Test Single Node Full (JDK 8 / x86_64) + name: Integration Test Single Node Smoke (JDK 8 / x86_64) runs-on: ubuntu-latest timeout-minutes: 45 @@ -46,7 +46,7 @@ jobs: - name: Pull integration-test image run: docker pull troninfra/troninfra-ci:latest - - name: Run integration tests + - name: Run integration smoke tests run: | # JAVA_HOME=JDK 8 so FullNode runs on the same JVM family as # production (a few assertions check `java.version` starts with @@ -62,7 +62,7 @@ jobs: # (per the integration-test team), so run the smoke subset. --clean --smoke - - name: Extract test reports from container + - name: Extract smoke test reports from container if: always() run: | mkdir -p integration-reports @@ -73,10 +73,10 @@ jobs: docker cp integration-test:/app/node/data/logs/tron.log integration-reports/ 2>/dev/null || true docker rm -f integration-test 2>/dev/null || true - - name: Upload test reports + - name: Upload smoke test reports if: always() uses: actions/upload-artifact@v6 with: - name: integration-test-report + name: integration-smoke-test-report path: integration-reports/ if-no-files-found: warn From d1a71adea09e9e2c124102c4650526be80aace0d Mon Sep 17 00:00:00 2001 From: warku123 Date: Wed, 5 Aug 2026 15:58:17 +0800 Subject: [PATCH 3/5] ci(integration): fix --smoke arg swallowed by inline comment The shell comment lines between the image name and --clean --smoke caused the args to be dropped, so the container ran the default full :test suite (1691 tests) instead of smokeTest. Move the rationale into the step name/comments above the command so the args are passed cleanly. --- .github/workflows/integration-test-single-node.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/integration-test-single-node.yml b/.github/workflows/integration-test-single-node.yml index 5d54ef7490f..3c56843c799 100644 --- a/.github/workflows/integration-test-single-node.yml +++ b/.github/workflows/integration-test-single-node.yml @@ -58,8 +58,6 @@ jobs: -e JAVA_HOME_17=/opt/java/openjdk \ -v "${{ github.workspace }}/build/libs/FullNode.jar:/javatron/FullNode.jar:ro" \ troninfra/troninfra-ci:latest \ - # Smoke only: the full single-node suite is currently unstable - # (per the integration-test team), so run the smoke subset. --clean --smoke - name: Extract smoke test reports from container From bff3b1faa1b90b36254f09a70ba2bbd034e36fdd Mon Sep 17 00:00:00 2001 From: warku123 Date: Wed, 5 Aug 2026 12:05:40 +0800 Subject: [PATCH 4/5] fix(ci): build multinode test image from the PR's own distribution The multinode CI image step only swapped FullNode.jar into the base image, leaving stale module jars (common, chainbase, ...) from tronprotocol/java-tron:latest on the classpath. Any PR adding a cross-module API then crashes the node at Spring startup with NoSuchMethodError while the container stays Up, surfacing only as 'container tron-mn-node1 is unhealthy' (first hit by PR #82). Build the image lib/ from the PR's own dist zip instead, so all module jars and third-party dependencies come from one dependency resolution. This also auto-adapts to modules being added or renamed and to dependency-version bumps by the PR itself. Also copy /java-tron/logs out of the containers when collecting CI artifacts: docker logs only captures Logback stdout noise, while the real application log (tron.log) lives inside the container, without which node startup failures are undiagnosable. --- .../workflows/integration-test-multinode.yml | 27 ++++++++++++++++--- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/.github/workflows/integration-test-multinode.yml b/.github/workflows/integration-test-multinode.yml index e549f2cf974..bb2edb3b571 100644 --- a/.github/workflows/integration-test-multinode.yml +++ b/.github/workflows/integration-test-multinode.yml @@ -43,16 +43,30 @@ jobs: key: ${{ runner.os }}-gradle-multinode-${{ hashFiles('**/*.gradle', '**/gradle-wrapper.properties') }} restore-keys: ${{ runner.os }}-gradle-multinode- - - name: Build FullNode.jar + - name: Build all java-tron module jars run: ./gradlew clean build -x test --no-daemon - - name: Build local java-tron Docker image (wraps PR-built FullNode.jar) + - name: Build local java-tron Docker image (wraps PR-built jars) run: | + # Build the image from the PR's own distribution: the dist zip's + # lib/ contains every runtime jar this build produces (all module + # jars plus third-party dependencies from one dependency + # resolution). Swapping only FullNode.jar keeps the base image's + # stale jars on the classpath, and the node then dies during Spring + # startup with NoSuchMethodError while the container stays "Up", + # surfacing only as "container tron-mn-node1 is unhealthy". + # Using the dist also auto-adapts to modules being added, renamed, + # or dependency-version bumps by the PR itself. mkdir -p /tmp/tron-image - cp build/libs/FullNode.jar /tmp/tron-image/ + unzip -q framework/build/distributions/java-tron-1.0.0.zip \ + 'java-tron-1.0.0/lib/*' -d /tmp/tron-image + mv /tmp/tron-image/java-tron-1.0.0/lib /tmp/tron-image/lib + rmdir /tmp/tron-image/java-tron-1.0.0 + cp framework/build/libs/FullNode.jar /tmp/tron-image/lib/ cat > /tmp/tron-image/Dockerfile <<'EOF' FROM tronprotocol/java-tron:latest - COPY FullNode.jar /java-tron/lib/FullNode.jar + RUN rm -rf /java-tron/lib + COPY lib/ /java-tron/lib/ EOF docker build -t java-tron-local:pr /tmp/tron-image @@ -104,6 +118,11 @@ jobs: mkdir -p integration-reports/node-logs for c in tron-mn-node1 tron-mn-node2 tron-mn-node3 tron-mn-mongodb; do docker logs "$c" > "integration-reports/node-logs/${c}.log" 2>&1 || true + # docker logs only captures stdout (Logback init noise); java-tron + # writes its real application log to /java-tron/logs/tron.log inside + # the container. Copy it out — without it a node startup failure + # is undiagnosable from CI artifacts. + docker cp "$c":/java-tron/logs/. "integration-reports/node-logs/${c}-applogs/" 2>/dev/null || true done - name: Tear down compose stack From 08d798921a288b233f8f0b0abc98cf927ccdb6ea Mon Sep 17 00:00:00 2001 From: warku123 Date: Wed, 5 Aug 2026 22:47:04 +0800 Subject: [PATCH 5/5] ci: remove multinode integration workflow entirely Per reviewer request: the multinode integration CI is not kept upstream. The full workflow (including the dist-libs image build fix) is preserved on the fork branch backup/integration-test-multinode. --- .../workflows/integration-test-multinode.yml | 141 ------------------ 1 file changed, 141 deletions(-) delete mode 100644 .github/workflows/integration-test-multinode.yml diff --git a/.github/workflows/integration-test-multinode.yml b/.github/workflows/integration-test-multinode.yml deleted file mode 100644 index bb2edb3b571..00000000000 --- a/.github/workflows/integration-test-multinode.yml +++ /dev/null @@ -1,141 +0,0 @@ -name: Integration Test Multinode (Full) - -on: - # Disabled: the multinode integration suite is currently unstable (see the - # integration-test team). Re-enable the push/pull_request triggers below - # once the suite is fixed. - # push: - # branches: [ 'master', 'release_**' ] - # pull_request: - # branches: [ 'develop', 'release_**' ] - # types: [ opened, synchronize, reopened ] - # paths-ignore: [ '**/*.md', '.gitignore', '**/.gitignore', '.editorconfig', - # '.gitattributes', 'docs/**', 'CHANGELOG', '.github/ISSUE_TEMPLATE/**', - # '.github/PULL_REQUEST_TEMPLATE/**', '.github/CODEOWNERS' ] - workflow_dispatch: - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -jobs: - multinode-full: - name: Integration Test Multinode Full (JDK 8 / x86_64) - runs-on: ubuntu-latest - timeout-minutes: 60 - - steps: - - name: Checkout java-tron - uses: actions/checkout@v5 - - - name: Set up JDK 8 - uses: actions/setup-java@v5 - with: - java-version: '8' - distribution: 'temurin' - - - name: Cache Gradle packages - uses: actions/cache@v5 - with: - path: | - ~/.gradle/caches - ~/.gradle/wrapper - key: ${{ runner.os }}-gradle-multinode-${{ hashFiles('**/*.gradle', '**/gradle-wrapper.properties') }} - restore-keys: ${{ runner.os }}-gradle-multinode- - - - name: Build all java-tron module jars - run: ./gradlew clean build -x test --no-daemon - - - name: Build local java-tron Docker image (wraps PR-built jars) - run: | - # Build the image from the PR's own distribution: the dist zip's - # lib/ contains every runtime jar this build produces (all module - # jars plus third-party dependencies from one dependency - # resolution). Swapping only FullNode.jar keeps the base image's - # stale jars on the classpath, and the node then dies during Spring - # startup with NoSuchMethodError while the container stays "Up", - # surfacing only as "container tron-mn-node1 is unhealthy". - # Using the dist also auto-adapts to modules being added, renamed, - # or dependency-version bumps by the PR itself. - mkdir -p /tmp/tron-image - unzip -q framework/build/distributions/java-tron-1.0.0.zip \ - 'java-tron-1.0.0/lib/*' -d /tmp/tron-image - mv /tmp/tron-image/java-tron-1.0.0/lib /tmp/tron-image/lib - rmdir /tmp/tron-image/java-tron-1.0.0 - cp framework/build/libs/FullNode.jar /tmp/tron-image/lib/ - cat > /tmp/tron-image/Dockerfile <<'EOF' - FROM tronprotocol/java-tron:latest - RUN rm -rf /java-tron/lib - COPY lib/ /java-tron/lib/ - EOF - docker build -t java-tron-local:pr /tmp/tron-image - - - name: Pull integration-test image - run: docker pull troninfra/troninfra-ci:latest - - - name: Extract compose configs to host (for DinD path-alignment) - run: | - # start-multinode.sh builds HOST_COMPOSE_DIR as: - # ${HOST_WORKDIR}/docker/multi-node - # so the files must live at $HOST_WORKDIR/docker/multi-node/ on the - # host. Set HOST_WORKDIR to the workspace root and extract - # /app/docker/ 1:1 into workspace/docker/ — the subdirectories - # (multi-node/, single-node/) don't collide with java-tron's own - # docker/ files. - docker create --name it-extract troninfra/troninfra-ci:latest - docker cp it-extract:/app/docker/. "${{ github.workspace }}/docker/" - docker rm -f it-extract - - - name: Run multinode full tests - run: | - # --network host: multinode tests talk to nodes via 127.0.0.1:50051 etc. - # DinD socket + HOST_WORKDIR path-alignment lets the container orchestrate - # the 3-witness compose stack via the host daemon. - # Don't override --workdir so the container's default /app entrypoint works. - docker run --name integration-multinode \ - --network host \ - -v /var/run/docker.sock:/var/run/docker.sock \ - -v "${{ github.workspace }}:${{ github.workspace }}" \ - -v "${{ github.workspace }}/docker/multi-node:/app/docker/multi-node" \ - -e HOST_WORKDIR="${{ github.workspace }}" \ - -e TRON_IMAGE=java-tron-local:pr \ - -e JAVA_HOME=/usr/lib/jvm/temurin-8 \ - -e JAVA_HOME_17=/opt/java/openjdk \ - troninfra/troninfra-ci:latest \ - --multinode --clean - - - name: Extract test reports from container - if: always() - run: | - mkdir -p integration-reports - docker cp integration-multinode:/app/build/reports/. integration-reports/reports/ 2>/dev/null || true - docker cp integration-multinode:/app/build/test-results/. integration-reports/test-results/ 2>/dev/null || true - docker cp integration-multinode:/app/build/test-output.log integration-reports/ 2>/dev/null || true - - - name: Collect witness node logs - if: always() - run: | - mkdir -p integration-reports/node-logs - for c in tron-mn-node1 tron-mn-node2 tron-mn-node3 tron-mn-mongodb; do - docker logs "$c" > "integration-reports/node-logs/${c}.log" 2>&1 || true - # docker logs only captures stdout (Logback init noise); java-tron - # writes its real application log to /java-tron/logs/tron.log inside - # the container. Copy it out — without it a node startup failure - # is undiagnosable from CI artifacts. - docker cp "$c":/java-tron/logs/. "integration-reports/node-logs/${c}-applogs/" 2>/dev/null || true - done - - - name: Tear down compose stack - if: always() - run: | - docker rm -f tron-mn-node1 tron-mn-node2 tron-mn-node3 tron-mn-mongodb 2>/dev/null || true - docker network rm multi-node_tron-net 2>/dev/null || true - docker rm -f integration-multinode 2>/dev/null || true - - - name: Upload test reports - if: always() - uses: actions/upload-artifact@v6 - with: - name: integration-multinode-report - path: integration-reports/ - if-no-files-found: warn