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

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
Aias00 added a commit that referenced this pull request Jul 8, 2026
…ndbox/proxyGateway (apache#6388)

* goalx: snapshot before shenyu-analysis

* chore(ci): optimize workflow build cache and mvnd parallelism

* chore: update LICENSE with new dependencies and versions

* [fix] Add missing permission annotations to /appAuth/updateSk and /sandbox/proxyGateway

- Add @RequiresPermissions("system:authen:edit") to AppAuthController.updateSk()
  This endpoint was the only one in the controller without a permission check,
  allowing any authenticated user to rotate arbitrary appAuth secrets.
- Change /appAuth/updateSk from GET to POST to prevent appSecret from
  appearing in URLs, browser history, and server access logs.
- Add @RequiresPermissions("system:authen:list") to SandboxController.proxyGateway()
  This endpoint generates server-side signed requests using stored appSecrets.
  Without permission checks, any authenticated user could abuse it to forge
  signed requests after compromising an appKey via the updateSk vulnerability.

These fixes address an authorization bypass where a low-privileged dashboard
user could chain updateSk + proxyGateway to impersonate arbitrary application
identities and send authenticated requests to allowlisted internal services.

Co-Authored-By: Claude <[email protected]>

* [fix] Address PR review: use request body for updateSk, fix sandbox permission, revert unrelated LICENSE changes

- Change /appAuth/updateSk to accept UpdateSkDTO as @RequestBody instead
  of @RequestParam, preventing appSecret from appearing in URLs, browser
  history, and server access logs (Copilot review comment #1)
- Change /sandbox/proxyGateway permission from system:authen:list to
  system:authen:modify — a write/signing endpoint should not be guarded
  by a read permission (Copilot review comment apache#3)
- Revert unrelated LICENSE file changes that were accidentally included
  (Copilot review comment apache#2 — re2j license issue is pre-existing)

Co-Authored-By: Claude <[email protected]>

---------

Co-authored-by: Claude <[email protected]>
Co-authored-by: xiaoyu <[email protected]>
eye-gu pushed a commit that referenced this pull request Sep 30, 2026
…ndbox/proxyGateway (apache#6388)

* goalx: snapshot before shenyu-analysis

* chore(ci): optimize workflow build cache and mvnd parallelism

* chore: update LICENSE with new dependencies and versions

* [fix] Add missing permission annotations to /appAuth/updateSk and /sandbox/proxyGateway

- Add @RequiresPermissions("system:authen:edit") to AppAuthController.updateSk()
  This endpoint was the only one in the controller without a permission check,
  allowing any authenticated user to rotate arbitrary appAuth secrets.
- Change /appAuth/updateSk from GET to POST to prevent appSecret from
  appearing in URLs, browser history, and server access logs.
- Add @RequiresPermissions("system:authen:list") to SandboxController.proxyGateway()
  This endpoint generates server-side signed requests using stored appSecrets.
  Without permission checks, any authenticated user could abuse it to forge
  signed requests after compromising an appKey via the updateSk vulnerability.

These fixes address an authorization bypass where a low-privileged dashboard
user could chain updateSk + proxyGateway to impersonate arbitrary application
identities and send authenticated requests to allowlisted internal services.

Co-Authored-By: Claude <[email protected]>

* [fix] Address PR review: use request body for updateSk, fix sandbox permission, revert unrelated LICENSE changes

- Change /appAuth/updateSk to accept UpdateSkDTO as @RequestBody instead
  of @RequestParam, preventing appSecret from appearing in URLs, browser
  history, and server access logs (Copilot review comment #1)
- Change /sandbox/proxyGateway permission from system:authen:list to
  system:authen:modify — a write/signing endpoint should not be guarded
  by a read permission (Copilot review comment apache#3)
- Revert unrelated LICENSE file changes that were accidentally included
  (Copilot review comment apache#2 — re2j license issue is pre-existing)

Co-Authored-By: Claude <[email protected]>

---------

Co-authored-by: Claude <[email protected]>
Co-authored-by: xiaoyu <[email protected]>
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