惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

月光博客
月光博客
雷峰网
雷峰网
S
SegmentFault 最新的问题
博客园 - 【当耐特】
博客园_首页
量子位
爱范儿
爱范儿
博客园 - 叶小钗
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Jina AI
Jina AI
V
V2EX
美团技术团队
V
Visual Studio Blog
博客园 - 三生石上(FineUI控件)
IT之家
IT之家
Hugging Face - Blog
Hugging Face - Blog
Apple Machine Learning Research
Apple Machine Learning Research
小众软件
小众软件
博客园 - 聂微东
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
The Cloudflare Blog
宝玉的分享
宝玉的分享
WordPress大学
WordPress大学
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
test: bound Docker smoke host commands · openclaw/opencla...
steipete · 2026-04-25 · via Recent Commits to openclaw:main

@@ -19,6 +19,12 @@ ADMIN_PASSWORD="${OPENCLAW_OPENWEBUI_ADMIN_PASSWORD:-OpenWebUI-E2E-Password-$(da

1919

NET_NAME="openclaw-openwebui-e2e-$$"

2020

GW_NAME="openclaw-openwebui-gateway-$$"

2121

OW_NAME="openclaw-openwebui-$$"

22+

DOCKER_COMMAND_TIMEOUT="${OPENCLAW_OPENWEBUI_DOCKER_COMMAND_TIMEOUT:-60s}"

23+

DOCKER_PULL_TIMEOUT="${OPENCLAW_OPENWEBUI_DOCKER_PULL_TIMEOUT:-300s}"

24+25+

docker_cmd() {

26+

timeout "$DOCKER_COMMAND_TIMEOUT" "$@"

27+

}

22282329

OPENAI_API_KEY_VALUE="${OPENAI_API_KEY:-}"

2430

if [[ "$OPENAI_API_KEY_VALUE" == "undefined" || "$OPENAI_API_KEY_VALUE" == "null" ]]; then

@@ -34,22 +40,22 @@ if [[ -z "$OPENAI_API_KEY_VALUE" ]]; then

3440

fi

35413642

cleanup() {

37-

docker rm -f "$OW_NAME" >/dev/null 2>&1 || true

38-

docker rm -f "$GW_NAME" >/dev/null 2>&1 || true

39-

docker network rm "$NET_NAME" >/dev/null 2>&1 || true

43+

docker_cmd docker rm -f "$OW_NAME" >/dev/null 2>&1 || true

44+

docker_cmd docker rm -f "$GW_NAME" >/dev/null 2>&1 || true

45+

docker_cmd docker network rm "$NET_NAME" >/dev/null 2>&1 || true

4046

}

4147

trap cleanup EXIT

42484349

docker_e2e_build_or_reuse "$IMAGE_NAME" openwebui

44504551

echo "Pulling Open WebUI image: $OPENWEBUI_IMAGE"

46-

docker pull "$OPENWEBUI_IMAGE" >/dev/null

52+

timeout "$DOCKER_PULL_TIMEOUT" docker pull "$OPENWEBUI_IMAGE" >/dev/null

47534854

echo "Creating Docker network..."

49-

docker network create "$NET_NAME" >/dev/null

55+

docker_cmd docker network create "$NET_NAME" >/dev/null

50565157

echo "Starting gateway container..."

52-

docker run -d \

58+

docker_cmd docker run -d \

5359

--name "$GW_NAME" \

5460

--network "$NET_NAME" \

5561

-e "OPENCLAW_GATEWAY_TOKEN=$TOKEN" \

@@ -115,10 +121,10 @@ EOF

115121

echo "Waiting for gateway HTTP surface..."

116122

gateway_ready=0

117123

for _ in $(seq 1 240); do

118-

if [ "$(docker inspect -f '{{.State.Running}}' "$GW_NAME" 2>/dev/null || echo false)" != "true" ]; then

124+

if [ "$(docker_cmd docker inspect -f '{{.State.Running}}' "$GW_NAME" 2>/dev/null || echo false)" != "true" ]; then

119125

break

120126

fi

121-

if docker exec "$GW_NAME" bash -lc "node --input-type=module -e '

127+

if docker_cmd docker exec "$GW_NAME" bash -lc "node --input-type=module -e '

122128

const res = await fetch(\"http://127.0.0.1:$PORT/v1/models\", {

123129

headers: { authorization: \"Bearer $TOKEN\" },

124130

}).catch(() => null);

@@ -132,16 +138,16 @@ done

132138133139

if [ "$gateway_ready" -ne 1 ]; then

134140

echo "Gateway failed to start"

135-

docker inspect "$GW_NAME" --format '{{json .State}}' 2>/dev/null || true

136-

if [ "$(docker inspect -f '{{.State.Running}}' "$GW_NAME" 2>/dev/null || echo false)" = "true" ]; then

137-

docker exec "$GW_NAME" bash -lc 'tail -n 200 /tmp/openwebui-gateway.log' || true

141+

docker_cmd docker inspect "$GW_NAME" --format '{{json .State}}' 2>/dev/null || true

142+

if [ "$(docker_cmd docker inspect -f '{{.State.Running}}' "$GW_NAME" 2>/dev/null || echo false)" = "true" ]; then

143+

docker_cmd docker exec "$GW_NAME" bash -lc 'tail -n 200 /tmp/openwebui-gateway.log' || true

138144

fi

139-

docker logs "$GW_NAME" 2>&1 | tail -n 200 || true

145+

docker_cmd docker logs "$GW_NAME" 2>&1 | tail -n 200 || true

140146

exit 1

141147

fi

142148143149

echo "Starting Open WebUI container..."

144-

docker run -d \

150+

docker_cmd docker run -d \

145151

--name "$OW_NAME" \

146152

--network "$NET_NAME" \

147153

-e ENV=prod \

@@ -167,10 +173,10 @@ docker run -d \

167173

echo "Waiting for Open WebUI..."

168174

ow_ready=0

169175

for _ in $(seq 1 240); do

170-

if [ "$(docker inspect -f '{{.State.Running}}' "$OW_NAME" 2>/dev/null || echo false)" != "true" ]; then

176+

if [ "$(docker_cmd docker inspect -f '{{.State.Running}}' "$OW_NAME" 2>/dev/null || echo false)" != "true" ]; then

171177

break

172178

fi

173-

if docker exec "$GW_NAME" bash -lc "node --input-type=module -e '

179+

if docker_cmd docker exec "$GW_NAME" bash -lc "node --input-type=module -e '

174180

const res = await fetch(\"http://$OW_NAME:$WEBUI_PORT/\").catch(() => null);

175181

process.exit(res && res.status < 500 ? 0 : 1);

176182

' >/dev/null 2>&1"; then

@@ -182,17 +188,17 @@ done

182188183189

if [ "$ow_ready" -ne 1 ]; then

184190

echo "Open WebUI failed to start"

185-

docker logs "$OW_NAME" 2>&1 | tail -n 200 || true

191+

docker_cmd docker logs "$OW_NAME" 2>&1 | tail -n 200 || true

186192

exit 1

187193

fi

188194189195

echo "Waiting for gateway model endpoint after Open WebUI startup..."

190196

gateway_model_ready=0

191197

for _ in $(seq 1 90); do

192-

if [ "$(docker inspect -f '{{.State.Running}}' "$GW_NAME" 2>/dev/null || echo false)" != "true" ]; then

198+

if [ "$(docker_cmd docker inspect -f '{{.State.Running}}' "$GW_NAME" 2>/dev/null || echo false)" != "true" ]; then

193199

break

194200

fi

195-

if docker exec "$GW_NAME" bash -lc "node --input-type=module -e '

201+

if docker_cmd docker exec "$GW_NAME" bash -lc "node --input-type=module -e '

196202

const controller = new AbortController();

197203

const timeout = setTimeout(() => controller.abort(), 8000);

198204

try {

@@ -215,17 +221,17 @@ done

215221216222

if [ "$gateway_model_ready" -ne 1 ]; then

217223

echo "Gateway model endpoint did not stay reachable after Open WebUI startup"

218-

docker inspect "$GW_NAME" --format '{{json .State}}' 2>/dev/null || true

219-

if [ "$(docker inspect -f '{{.State.Running}}' "$GW_NAME" 2>/dev/null || echo false)" = "true" ]; then

220-

docker exec "$GW_NAME" bash -lc 'tail -n 200 /tmp/openwebui-gateway.log' || true

224+

docker_cmd docker inspect "$GW_NAME" --format '{{json .State}}' 2>/dev/null || true

225+

if [ "$(docker_cmd docker inspect -f '{{.State.Running}}' "$GW_NAME" 2>/dev/null || echo false)" = "true" ]; then

226+

docker_cmd docker exec "$GW_NAME" bash -lc 'tail -n 200 /tmp/openwebui-gateway.log' || true

221227

fi

222-

docker logs "$GW_NAME" 2>&1 | tail -n 200 || true

223-

docker logs "$OW_NAME" 2>&1 | tail -n 200 || true

228+

docker_cmd docker logs "$GW_NAME" 2>&1 | tail -n 200 || true

229+

docker_cmd docker logs "$OW_NAME" 2>&1 | tail -n 200 || true

224230

exit 1

225231

fi

226232227233

echo "Running Open WebUI -> OpenClaw smoke..."

228-

if ! docker exec \

234+

if ! docker_cmd docker exec \

229235

-e "OPENWEBUI_BASE_URL=http://$OW_NAME:$WEBUI_PORT" \

230236

-e "OPENWEBUI_ADMIN_EMAIL=$ADMIN_EMAIL" \

231237

-e "OPENWEBUI_ADMIN_PASSWORD=$ADMIN_PASSWORD" \

@@ -237,13 +243,13 @@ if ! docker exec \

237243

node /app/scripts/e2e/openwebui-probe.mjs >/tmp/openwebui-probe.log 2>&1; then

238244

cat /tmp/openwebui-probe.log 2>/dev/null || true

239245

echo "Open WebUI probe failed; gateway log tail:"

240-

docker inspect "$GW_NAME" --format '{{json .State}}' 2>/dev/null || true

241-

if [ "$(docker inspect -f '{{.State.Running}}' "$GW_NAME" 2>/dev/null || echo false)" = "true" ]; then

242-

docker exec "$GW_NAME" bash -lc 'tail -n 200 /tmp/openwebui-gateway.log' || true

246+

docker_cmd docker inspect "$GW_NAME" --format '{{json .State}}' 2>/dev/null || true

247+

if [ "$(docker_cmd docker inspect -f '{{.State.Running}}' "$GW_NAME" 2>/dev/null || echo false)" = "true" ]; then

248+

docker_cmd docker exec "$GW_NAME" bash -lc 'tail -n 200 /tmp/openwebui-gateway.log' || true

243249

fi

244-

docker logs "$GW_NAME" 2>&1 | tail -n 200 || true

250+

docker_cmd docker logs "$GW_NAME" 2>&1 | tail -n 200 || true

245251

echo "Open WebUI container logs:"

246-

docker logs "$OW_NAME" 2>&1 | tail -n 200 || true

252+

docker_cmd docker logs "$OW_NAME" 2>&1 | tail -n 200 || true

247253

exit 1

248254

fi

249255