apache / apache/shenyu

[BUG] — 11 integrated-test `healthcheck.sh` scripts never exit non-zero (health gate is a no-op)

Open
#6,680 1 comment 0 reactions 0 assignees View on GitHub
in: test priority: high type: build
Dominant language
Java
Stars
8.8k
Forks
3.1k
Avg merge
7d 1h
Merged PRs (30d)
85

Description

- severity: High; files: `shenyu-integrated-test/shenyu-integrated-test-{apache-dubbo,combination,grpc,http,https,rewrite,sdk-apache-dubbo,sdk-http,sofa,spring-cloud,websocket}/script/healthcheck.sh` (verified: `grep -c exit` = 0 in all of them)
- description: Each script loops `for loop in seq 1 30` and `break`s on HTTP 200, but after the loop it only does `sleep 3; echo` and returns. There is NO `exit 1` on failure. The CI step "Wait for docker compose start up completely" (`integrated-test.yml:158-159`, calls `bash .../healthcheck.sh`) ALWAYS succeeds. Unhealthy/never-started services proceed to the "Run test" step, producing misleading downstream test failures instead of a clear "services did not start" failure. (Contrast: the shared `shenyu-integrated-test/k8s-ingress-healthcheck.sh` correctly does `set -euo pipefail` + `exit "${failed}"`; the k8s-ingress-* per-module scripts delegate to it.)
- impact: CI masks real startup failures across ~11 test matrices; wasted debug time; false confidence.
- suggested_fix: Track a `failed=0` flag, set it when the 30-try loop exhausts without 200, and `exit "${failed}"` at the end (mirror `k8s-ingress-healthcheck.sh`).
- confidence: High

---
_Identified during the 2026-08-02 deep re-scan; full list in [`docs/scan2-2026-08-02/00-consolidated-critical-high.md`](docs/scan2-2026-08-02/00-consolidated-critical-high.md)._

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the 11 listed shenyu-integrated-test/*/script/healthcheck.sh files and compare them with shenyu-integrated-test/k8s-ingress-healthcheck.sh. Then inspect integrated-test.yml:158-159, which invokes the scripts. Done means an exhausted 30-try health check returns non-zero so the CI health gate stops, while a successful HTTP 200 check still permits the Run test step.

Written by the indexing model from the issue text.

Assessment

Tech stack
bash, github-actions, shell
Domain
ci-cd, testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
76/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.