Skip to content

Fix RocketMQ logging e2e bootstrap startup#6379

Merged
Aias00 merged 20 commits into
apache:masterfrom
Aias00:fix/pr-6339-ci-80239448309
Jun 12, 2026
Merged

Fix RocketMQ logging e2e bootstrap startup#6379
Aias00 merged 20 commits into
apache:masterfrom
Aias00:fix/pr-6339-ci-80239448309

Conversation

@Aias00

@Aias00 Aias00 commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

What changed

  • Recover the RocketMQ logging e2e compose flow when the initial sync stack start leaves shenyu-bootstrap created but not started.
  • Wait for shenyu-admin health first, then explicitly start shenyu-bootstrap.
  • Fail immediately when required healthchecks fail instead of continuing to Maven with an unavailable gateway.

Why

GitHub Actions job 80239448309 for #6339 failed in the zookeeper sync round. The log showed dependency failed to start: container shenyu-admin is unhealthy, then shenyu-bootstrap stayed in Created state and Maven failed because http://localhost:31195 was 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-compile
  • docker compose -f shenyu-e2e/shenyu-e2e-case/compose/sync/shenyu-sync-zookeeper.yml config --quiet
  • docker compose -f shenyu-e2e/shenyu-e2e-case/shenyu-e2e-case-logging-rocketmq/compose/shenyu-rocketmq-compose.yml config --quiet
  • docker 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-compile
  • git diff --check

Not tested

Full Docker Compose e2e was not run locally because the CI-built images apache/shenyu-admin:latest, apache/shenyu-bootstrap:latest, and shenyu-examples-http:latest are not present locally.

Related: #6339

eye-gu and others added 16 commits May 12, 2026 11:14
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
Copilot AI review requested due to automatic review settings June 10, 2026 01:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-admin health, explicitly starting shenyu-bootstrap, and failing fast on healthcheck failures.
  • Refactor OpenAPI document generation to produce requestParameters/responseParameters across 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
@Aias00 Aias00 merged commit ca83c69 into apache:master Jun 12, 2026
39 checks passed
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.

4 participants