ci(release): make Open WebUI release smoke deterministic · openclaw/openclaw@5832839
steipete
·
2026-05-10
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -712,6 +712,9 @@ OpenClaw gateway container with the OpenAI-compatible HTTP endpoints enabled,
|
712 | 712 | starts a pinned Open WebUI container against that gateway, signs in through |
713 | 713 | Open WebUI, verifies `/api/models` exposes `openclaw/default`, then sends a |
714 | 714 | real chat request through Open WebUI's `/api/chat/completions` proxy. |
| 715 | +Set `OPENWEBUI_SMOKE_MODE=models` for release-path CI checks that should stop |
| 716 | +after Open WebUI sign-in and model discovery, without waiting on a live model |
| 717 | +completion. |
715 | 718 | The first run can be noticeably slower because Docker may need to pull the |
716 | 719 | Open WebUI image and Open WebUI may need to finish its own cold-start setup. |
717 | 720 | This lane expects a usable live model key, and `OPENCLAW_PROFILE_FILE` |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -8,12 +8,17 @@ const prompt = process.env.OPENWEBUI_PROMPT ?? "";
|
8 | 8 | const modelAttempts = Number.parseInt(process.env.OPENWEBUI_MODEL_ATTEMPTS ?? "72", 10); |
9 | 9 | const modelRetryMs = Number.parseInt(process.env.OPENWEBUI_MODEL_RETRY_MS ?? "5000", 10); |
10 | 10 | const fetchTimeoutMs = Number.parseInt(process.env.OPENWEBUI_FETCH_TIMEOUT_MS ?? "720000", 10); |
| 11 | +const smokeMode = |
| 12 | +process.env.OPENWEBUI_SMOKE_MODE ?? process.env.OPENCLAW_OPENWEBUI_SMOKE_MODE ?? "chat"; |
11 | 13 | |
12 | 14 | setGlobalDispatcher(new Agent({ bodyTimeout: fetchTimeoutMs, headersTimeout: fetchTimeoutMs })); |
13 | 15 | |
14 | 16 | if (!baseUrl || !email || !password || !expectedNonce || !prompt) { |
15 | 17 | throw new Error("Missing required OPENWEBUI_* environment variables"); |
16 | 18 | } |
| 19 | +if (smokeMode !== "models" && smokeMode !== "chat") { |
| 20 | +throw new Error(`Unsupported OPENWEBUI_SMOKE_MODE: ${smokeMode}`); |
| 21 | +} |
17 | 22 | |
18 | 23 | function getCookieHeader(res) { |
19 | 24 | const raw = res.headers.get("set-cookie"); |
@@ -105,6 +110,10 @@ if (!targetModel) {
|
105 | 110 | `openclaw model missing from Open WebUI model list after retry: ${JSON.stringify(modelIds)} (${lastModelsError})`, |
106 | 111 | ); |
107 | 112 | } |
| 113 | +if (smokeMode === "models") { |
| 114 | +console.log(JSON.stringify({ ok: true, mode: smokeMode, model: targetModel }, null, 2)); |
| 115 | +process.exit(0); |
| 116 | +} |
108 | 117 | |
109 | 118 | const chatRes = await fetch(`${baseUrl}/api/chat/completions`, { |
110 | 119 | method: "POST", |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -8,7 +8,7 @@ const LIVE_CLI_TIMEOUT_MS = 20 * 60 * 1000;
|
8 | 8 | const LIVE_PROFILE_TIMEOUT_MS = 30 * 60 * 1000; |
9 | 9 | const OPENWEBUI_TIMEOUT_MS = 20 * 60 * 1000; |
10 | 10 | const RELEASE_OPENWEBUI_COMMAND = |
11 | | -"OPENCLAW_OPENWEBUI_MODEL=openai/gpt-5.4-mini OPENCLAW_OPENWEBUI_PROVIDER_TIMEOUT_SECONDS=300 OPENCLAW_SKIP_DOCKER_BUILD=1 pnpm test:docker:openwebui"; |
| 11 | +"OPENCLAW_OPENWEBUI_MODEL=openai/gpt-5.4-mini OPENWEBUI_SMOKE_MODE=models OPENCLAW_OPENWEBUI_PROVIDER_TIMEOUT_SECONDS=300 OPENCLAW_SKIP_DOCKER_BUILD=1 pnpm test:docker:openwebui"; |
12 | 12 | export const BUNDLED_PLUGIN_INSTALL_UNINSTALL_SHARDS = 24; |
13 | 13 | const upgradeSurvivorCommand = "OPENCLAW_SKIP_DOCKER_BUILD=1 pnpm test:docker:upgrade-survivor"; |
14 | 14 | const updateRestartAuthCommand = |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -331,7 +331,7 @@ describe("scripts/lib/docker-e2e-plan", () => {
|
331 | 331 | }, |
332 | 332 | { |
333 | 333 | command: |
334 | | -"OPENCLAW_OPENWEBUI_MODEL=openai/gpt-5.4-mini OPENCLAW_OPENWEBUI_PROVIDER_TIMEOUT_SECONDS=300 OPENCLAW_SKIP_DOCKER_BUILD=1 pnpm test:docker:openwebui", |
| 334 | +"OPENCLAW_OPENWEBUI_MODEL=openai/gpt-5.4-mini OPENWEBUI_SMOKE_MODE=models OPENCLAW_OPENWEBUI_PROVIDER_TIMEOUT_SECONDS=300 OPENCLAW_SKIP_DOCKER_BUILD=1 pnpm test:docker:openwebui", |
335 | 335 | imageKind: "functional", |
336 | 336 | live: true, |
337 | 337 | name: "openwebui", |
@@ -654,7 +654,7 @@ describe("scripts/lib/docker-e2e-plan", () => {
|
654 | 654 | expect(plan.lanes.map(summarizeLane)).toEqual([ |
655 | 655 | { |
656 | 656 | command: |
657 | | -"OPENCLAW_OPENWEBUI_MODEL=openai/gpt-5.4-mini OPENCLAW_OPENWEBUI_PROVIDER_TIMEOUT_SECONDS=300 OPENCLAW_SKIP_DOCKER_BUILD=1 pnpm test:docker:openwebui", |
| 657 | +"OPENCLAW_OPENWEBUI_MODEL=openai/gpt-5.4-mini OPENWEBUI_SMOKE_MODE=models OPENCLAW_OPENWEBUI_PROVIDER_TIMEOUT_SECONDS=300 OPENCLAW_SKIP_DOCKER_BUILD=1 pnpm test:docker:openwebui", |
658 | 658 | imageKind: "functional", |
659 | 659 | live: true, |
660 | 660 | name: "openwebui", |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。