Fix RocketMQ logging e2e bootstrap startup#6379
Merged
Merged
Conversation
The RocketMQ logging e2e script runs three sync modes in sequence. In the zookeeper round, Docker Compose can return before shenyu-admin has recovered from an initial unhealthy state, leaving shenyu-bootstrap created but not started. The script previously ignored both that compose failure and later healthcheck failures, so Maven reported the gateway as unavailable instead of recovering the service stack first. Constraint: CI builds the required latest Docker images before this script runs Rejected: Increase fixed sleeps only | it would hide the dependency failure without ensuring bootstrap starts Confidence: medium Scope-risk: narrow Directive: Keep bootstrap startup gated on admin health for this e2e script Tested: bash -n e2e-logging-rocketmq-compose.sh; e2e RocketMQ test-compile; RocketMQ logging plugin test-compile; docker compose config for zookeeper, RocketMQ, and HTTP example compose files; git diff --check Not-tested: Full Docker Compose e2e locally because CI-built apache/shenyu-admin:latest, apache/shenyu-bootstrap:latest, and shenyu-examples-http:latest images are not present
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates CI/e2e Docker Compose bootstrapping for the RocketMQ logging e2e flow and also introduces broader changes around API-doc generation (including RPC/gRPC/protobuf handling), related tests/build tooling, and some client/admin behavior updates.
Changes:
- Make RocketMQ logging e2e compose startup more resilient by waiting for
shenyu-adminhealth, explicitly startingshenyu-bootstrap, and failing fast on healthcheck failures. - Refactor OpenAPI document generation to produce
requestParameters/responseParametersacross RPC types, adding gRPC and protobuf-aware parsing plus extensive new tests. - Adjust related components/tests (SOFA client listener metadata path building, admin API document parsing, and Maven build/test proto generation).
Reviewed changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| shenyu-examples/.../DubboProtobufServiceImpl.java (3 files) | Adds @ApiModule/@ApiDoc annotations to Dubbo protobuf example services. |
| shenyu-e2e/.../e2e-logging-rocketmq-compose.sh | Improves compose startup sequencing and healthcheck failure handling for e2e runs. |
| shenyu-client/shenyu-client-sofa/.../SofaServiceEventListener.java | Refactors SOFA listener registration flow (class handling and corrected class detection). |
| shenyu-client/shenyu-client-sofa/.../SofaServiceEventListenerTest.java | Updates test to align with new SOFA metadata path generation. |
| shenyu-client/shenyu-client-core/src/main/java/.../OpenApiUtils.java | Major OpenAPI doc-generation refactor: new JSON shape and RPC/gRPC/protobuf parameter/return parsing. |
| shenyu-client/shenyu-client-core/src/test/java/.../OpenApiUtilsTest.java | Adds comprehensive tests for OpenApiUtils behavior, including gRPC and protobuf. |
| shenyu-client/shenyu-client-core/src/test/java/.../NoHttpApiDocRegistrarTest.java | Expands registrar tests to validate RPC/gRPC document generation content. |
| shenyu-client/shenyu-client-core/src/test/java/.../ApiDocRegistrarImplTest.java | Adds focused tests around registrar document dispatch by RPC type and custom document passthrough. |
| shenyu-client/shenyu-client-core/src/test/proto/test.proto | Adds test proto schema used to validate protobuf field parsing. |
| shenyu-client/shenyu-client-core/pom.xml | Adds test deps and protobuf test compilation plugin configuration. |
| shenyu-client/shenyu-client-core/src/main/java/.../ApiDocRegistrarImpl.java | Delegates document generation to OpenApiUtils dispatch based on RpcTypeEnum. |
| shenyu-client/shenyu-client-core/src/main/java/.../AbstractApiDocRegistrar.java | Delegates document generation to OpenApiUtils with RPC type. |
| shenyu-client/shenyu-client-core/src/main/java/.../AbstractContextRefreshedEventListener.java | Updates API-doc JSON generation call to include RPC type. |
| shenyu-admin/src/main/java/.../ApiServiceImpl.java | Parses document into request/response params when document is present (not limited by ApiSource). |
| shenyu-admin/src/test/java/.../ApiServiceTest.java | Adds tests for findById behavior with blank vs non-blank document. |
| pom.xml | Adds protobuf/os-maven plugin version properties and excludes generated sources from checkstyle. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
133
to
154
| @@ -89,34 +149,182 @@ | |||
| parameter.setIn("query"); | |||
| parameter.setRequired(required); | |||
| parameter.setName(name); | |||
| parameter.setSchema(new Schema("string", null)); | |||
| parameter.setType("string"); | |||
| list.add(parameter); | |||
| } | |||
Comment on lines
+758
to
+762
| } else if (type instanceof GenericArrayType) { | ||
| Schema elementSchema = parseSchema(((GenericArrayType) type).getGenericComponentType(), depth + 1, typeVariableMap); | ||
| Schema schema = new Schema("array", null); | ||
| schema.setRefs(Collections.singletonList(elementSchema)); | ||
| return schema; |
Comment on lines
+778
to
+782
| if (clazz.isArray()) { | ||
| Schema elementSchema = parseSchema(clazz.getComponentType(), depth + 1, typeVariableMap); | ||
| Schema schema = new Schema("array", null); | ||
| schema.setRefs(Collections.singletonList(elementSchema)); | ||
| return schema; |
Comment on lines
+39
to
+41
| sh "$SHENYU_TESTCASE_DIR"/k8s/script/healthcheck.sh http://localhost:31095/actuator/health || exit 1 | ||
| docker compose -f "${sync_compose_file}" up -d shenyu-bootstrap | ||
| sh "$SHENYU_TESTCASE_DIR"/k8s/script/healthcheck.sh http://localhost:31195/actuator/health || exit 1 |
Comment on lines
33
to
+37
| for sync in "${SYNC_ARRAY[@]}"; do | ||
| sync_compose_file="$SHENYU_TESTCASE_DIR"/compose/sync/shenyu-sync-"${sync}".yml | ||
| echo -e "------------------\n" | ||
| echo "[Start ${sync} synchronous] create shenyu-admin-${sync}.yml shenyu-bootstrap-${sync}.yml " | ||
| docker compose -f "$SHENYU_TESTCASE_DIR"/compose/sync/shenyu-sync-"${sync}".yml up -d --quiet-pull | ||
| docker compose -f "${sync_compose_file}" up -d --quiet-pull || true |
Wweiei
approved these changes
Jun 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
shenyu-bootstrapcreated but not started.shenyu-adminhealth first, then explicitly startshenyu-bootstrap.Why
GitHub Actions job
80239448309for #6339 failed in the zookeeper sync round. The log showeddependency failed to start: container shenyu-admin is unhealthy, thenshenyu-bootstrapstayed inCreatedstate and Maven failed becausehttp://localhost:31195was unavailable.This branch is based on #6339 and adds one CI recovery commit on top.
Verification
bash -n shenyu-e2e/shenyu-e2e-case/shenyu-e2e-case-logging-rocketmq/compose/script/e2e-logging-rocketmq-compose.sh./mvnw -B -f ./shenyu-e2e/pom.xml -pl shenyu-e2e-case/shenyu-e2e-case-logging-rocketmq -am -DskipTests test-compiledocker compose -f shenyu-e2e/shenyu-e2e-case/compose/sync/shenyu-sync-zookeeper.yml config --quietdocker compose -f shenyu-e2e/shenyu-e2e-case/shenyu-e2e-case-logging-rocketmq/compose/shenyu-rocketmq-compose.yml config --quietdocker compose -f shenyu-e2e/shenyu-e2e-case/shenyu-e2e-case-logging-rocketmq/compose/shenyu-examples-http-compose.yml config --quiet./mvnw -B -pl shenyu-plugin/shenyu-plugin-logging/shenyu-plugin-logging-rocketmq -am -DskipTests test-compilegit diff --checkNot tested
Full Docker Compose e2e was not run locally because the CI-built images
apache/shenyu-admin:latest,apache/shenyu-bootstrap:latest, andshenyu-examples-http:latestare not present locally.Related: #6339