Fix RocketMQ logging e2e bootstrap startup#1
Closed
Aias00 wants to merge 1 commit into
Closed
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
There was a problem hiding this comment.
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 upcall targetingshenyu-bootstrapafter 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 |
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 PR apache#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.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: apache#6339