Skip to content

fix(ci): build multinode test image from the PR's own distribution - #6905

Closed
warku123 wants to merge 2 commits into
tronprotocol:developfrom
warku123:fix/multinode-ci-image-jars
Closed

fix(ci): build multinode test image from the PR's own distribution#6905
warku123 wants to merge 2 commits into
tronprotocol:developfrom
warku123:fix/multinode-ci-image-jars

Conversation

@warku123

@warku123 warku123 commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

  • Fixes the multinode integration-test CI failure dependency failed to start: container tron-mn-node1 is unhealthy.
  • The "Build local java-tron Docker image" step in .github/workflows/integration-test-multinode.yml now builds the image's /java-tron/lib from the PR's own distribution zip (framework/build/distributions/java-tron-1.0.0.zip) instead of only copying FullNode.jar into the base image
  • Renames the build step "Build FullNode.jar" to "Build all java-tron module jars" to match what ./gradlew clean build -x test actually does
  • The "Collect witness node logs" step now also copies /java-tron/logs/ (the real application log, tron.log) out of each container into the CI artifacts

Why are these changes required?

The image-build step only replaced FullNode.jar inside tronprotocol/java-tron:latest, leaving the base image's stale module jars on the classpath. When a PR adds a cross-module API (for example framework code calling a new method in common), the node dies during Spring startup with java.lang.NoSuchMethodError: org.tron.common.parameter.CommonParameter.isAdminRpcEnable()Z while the JVM process survives, so the container stays Up but port 50051 is never bound; the healthcheck then exhausts its 180s window and the stack fails with container tron-mn-node1 is unhealthy. Earlier PRs never hit this because they introduced no new cross-module method signatures.

Building from the PR's own dist zip makes every jar (module jars and third-party dependencies) come from a single dependency resolution, and it auto-adapts to modules being added or renamed and to dependency-version bumps by the PR itself.

Additionally, docker logs only captures container stdout (Logback initialization noise); java-tron writes its real application log to /java-tron/logs/tron.log inside the container, which CI never collected, making this class of failure undiagnosable from CI artifacts.

This PR has been tested by:

  • Manual Testing: reproduced the exact CI failure on an x86_64 host with the CI's docker-in-docker invocation (node1 unhealthy after the 180s healthcheck window, NoSuchMethodError in tron.log), then re-ran with an image built from the PR's full distribution: all three nodes became healthy in seconds, RpcApiService started, listening on 50051 appeared in tron.log, and the test suite proceeded normally

Follow up

Extra details

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 tronprotocol#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.
@warku123 warku123 closed this Aug 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant