fix(deploy): curl -s 改为 curl -sf,修复 HTTP 404 不被检测的问题
curl -s 只是静默输出,HTTP 404 仍然返回 exit code 0,导致就绪 检查在 Kafka Connect REST API 未初始化完时就通过了。 -f 标志让 curl 在 HTTP 4xx/5xx 时返回非零 exit code。 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
d8ef156b5e
commit
cb8c69788b
|
|
@ -205,7 +205,7 @@ up() {
|
|||
# Note: check /connectors not / — Jetty responds on / before Kafka Connect REST is initialized
|
||||
log_info "Waiting for Debezium Connect REST API to be ready..."
|
||||
for i in {1..60}; do
|
||||
if curl -s http://localhost:8084/connectors > /dev/null 2>&1; then
|
||||
if curl -sf http://localhost:8084/connectors > /dev/null 2>&1; then
|
||||
log_info "Debezium Connect REST API is ready!"
|
||||
break
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ echo "Force: $FORCE"
|
|||
echo ""
|
||||
echo "Waiting for Debezium Connect REST API to be ready..."
|
||||
for i in $(seq 1 $MAX_RETRIES); do
|
||||
if curl -s "$CONNECT_URL/connectors" > /dev/null 2>&1; then
|
||||
if curl -sf "$CONNECT_URL/connectors" > /dev/null 2>&1; then
|
||||
echo "Debezium Connect REST API is ready!"
|
||||
break
|
||||
fi
|
||||
|
|
@ -70,7 +70,7 @@ done
|
|||
# Check existing connectors
|
||||
echo ""
|
||||
echo "Checking existing connectors..."
|
||||
EXISTING=$(curl -s "$CONNECT_URL/connectors")
|
||||
EXISTING=$(curl -sf "$CONNECT_URL/connectors" 2>/dev/null || echo "[]")
|
||||
echo "Existing connectors: $EXISTING"
|
||||
|
||||
# Substitute environment variables in JSON config
|
||||
|
|
|
|||
Loading…
Reference in New Issue