Skip to content

Fix RocketMQ logging e2e bootstrap startup#1

Closed
Aias00 wants to merge 1 commit into
eye-gu:fix-6338from
Aias00:fix/pr-6339-ci-80239448309
Closed

Fix RocketMQ logging e2e bootstrap startup#1
Aias00 wants to merge 1 commit into
eye-gu:fix-6338from
Aias00:fix/pr-6339-ci-80239448309

Conversation

@Aias00

@Aias00 Aias00 commented Jun 9, 2026

Copy link
Copy Markdown

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 PR apache#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.

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: apache#6339

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 9, 2026 05:43

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Updates the RocketMQ logging E2E docker-compose script to improve startup sequencing and fail fast on unhealthy services.

Changes:

  • Extracted the sync compose file path into a variable for reuse.
  • Added explicit healthcheck failure handling (|| exit 1) for admin/bootstrap/example services.
  • Added a second docker compose up call targeting shenyu-bootstrap after the admin healthcheck.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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
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
docker compose -f "${PRGDIR}"/shenyu-examples-http-compose.yml up -d --quiet-pull
sleep 30s
sh "$SHENYU_TESTCASE_DIR"/k8s/script/healthcheck.sh http://localhost:31189/actuator/health
sh "$SHENYU_TESTCASE_DIR"/k8s/script/healthcheck.sh http://localhost:31189/actuator/health || exit 1
sh "$SHENYU_TESTCASE_DIR"/k8s/script/healthcheck.sh http://localhost:31095/actuator/health
sh "$SHENYU_TESTCASE_DIR"/k8s/script/healthcheck.sh http://localhost:31195/actuator/health
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
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
docker compose -f "${PRGDIR}"/shenyu-examples-http-compose.yml up -d --quiet-pull
sleep 30s
sh "$SHENYU_TESTCASE_DIR"/k8s/script/healthcheck.sh http://localhost:31189/actuator/health
sh "$SHENYU_TESTCASE_DIR"/k8s/script/healthcheck.sh http://localhost:31189/actuator/health || exit 1
@Aias00 Aias00 closed this Jun 9, 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.

2 participants