From 6cea2769760fe330b9bbb3b7854257041052773f Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Wed, 29 Apr 2026 11:33:19 +0100 Subject: [PATCH] ci: shard release docker plugin validation --- .../openclaw-live-and-e2e-checks-reusable.yml | 12 ++++ docs/ci.md | 4 +- docs/reference/RELEASING.md | 13 ++-- scripts/ci-docker-pull-retry.sh | 4 +- .../bundled-plugin-install-uninstall/sweep.sh | 4 ++ scripts/lib/docker-e2e-scenarios.mjs | 16 +++-- test/scripts/docker-e2e-plan.test.ts | 70 ++++++++++++++++--- .../package-acceptance-workflow.test.ts | 4 ++ .../plugin-prerelease-test-plan.test.ts | 13 ++-- 9 files changed, 107 insertions(+), 33 deletions(-) diff --git a/.github/workflows/openclaw-live-and-e2e-checks-reusable.yml b/.github/workflows/openclaw-live-and-e2e-checks-reusable.yml index eb9b001d5b5..56b53a09478 100644 --- a/.github/workflows/openclaw-live-and-e2e-checks-reusable.yml +++ b/.github/workflows/openclaw-live-and-e2e-checks-reusable.yml @@ -475,6 +475,18 @@ jobs: - chunk_id: plugins-runtime-install-d label: plugins/runtime install D timeout_minutes: 120 + - chunk_id: plugins-runtime-install-e + label: plugins/runtime install E + timeout_minutes: 120 + - chunk_id: plugins-runtime-install-f + label: plugins/runtime install F + timeout_minutes: 120 + - chunk_id: plugins-runtime-install-g + label: plugins/runtime install G + timeout_minutes: 120 + - chunk_id: plugins-runtime-install-h + label: plugins/runtime install H + timeout_minutes: 120 - chunk_id: bundled-channels-core label: bundled channels core timeout_minutes: 90 diff --git a/docs/ci.md b/docs/ci.md index 087783be62a..239a64ba431 100644 --- a/docs/ci.md +++ b/docs/ci.md @@ -401,9 +401,9 @@ act as if every scoped area changed. CI workflow edits validate the Node CI graph plus workflow linting, but do not force Windows, Android, or macOS native builds by themselves; those platform lanes stay scoped to platform source changes. CI routing-only edits, selected cheap core-test fixture edits, and narrow plugin contract helper/test-routing edits use a fast Node-only manifest path: preflight, security, and a single `checks-fast-core` task. That path avoids build artifacts, Node 22 compatibility, channel contracts, full core shards, bundled-plugin shards, and additional guard matrices when the changed files are limited to the routing or helper surfaces that the fast task exercises directly. Windows Node checks are scoped to Windows-specific process/path wrappers, npm/pnpm/UI runner helpers, package manager config, and the CI workflow surfaces that execute that lane; unrelated source, plugin, install-smoke, and test-only changes stay on the Linux Node lanes so they do not reserve a 16-vCPU Windows worker for coverage that is already exercised by the normal test shards. -The separate `install-smoke` workflow reuses the same scope script through its own `preflight` job. It splits smoke coverage into `run_fast_install_smoke` and `run_full_install_smoke`. Pull requests run the fast path for Docker/package surfaces, bundled plugin package/manifest changes, and core plugin/channel/gateway/Plugin SDK surfaces that the Docker smoke jobs exercise. Source-only bundled plugin changes, test-only edits, and docs-only edits do not reserve Docker workers. The fast path builds the root Dockerfile image once, checks the CLI, runs the agents delete shared-workspace CLI smoke, runs the container gateway-network e2e, verifies a bundled extension build arg, and runs the bounded bundled-plugin Docker profile under a 240-second aggregate command timeout with each scenario's Docker run capped separately. The full path keeps QR package install and installer Docker/update coverage for nightly scheduled runs, manual dispatches, workflow-call release checks, and pull requests that truly touch installer/package/Docker surfaces. `main` pushes, including merge commits, do not force the full path; when changed-scope logic would request full coverage on a push, the workflow keeps the fast Docker smoke and leaves the full install smoke to nightly or release validation. The slow Bun global install image-provider smoke is separately gated by `run_bun_global_install_smoke`; it runs on the nightly schedule and from the release checks workflow, and manual `install-smoke` dispatches can opt into it, but pull requests and `main` pushes do not run it. QR and installer Docker tests keep their own install-focused Dockerfiles. Local `test:docker:all` prebuilds one shared live-test image, packs OpenClaw once as an npm tarball, and builds two shared `scripts/e2e/Dockerfile` images: a bare Node/Git runner for installer/update/plugin-dependency lanes and a functional image that installs the same tarball into `/app` for normal functionality lanes. Docker lane definitions live in `scripts/lib/docker-e2e-scenarios.mjs`, planner logic lives in `scripts/lib/docker-e2e-plan.mjs`, and the runner only executes the selected plan. The scheduler selects the image per lane with `OPENCLAW_DOCKER_E2E_BARE_IMAGE` and `OPENCLAW_DOCKER_E2E_FUNCTIONAL_IMAGE`, then runs lanes with `OPENCLAW_SKIP_DOCKER_BUILD=1`; tune the default main-pool slot count of 10 with `OPENCLAW_DOCKER_ALL_PARALLELISM` and the provider-sensitive tail-pool slot count of 10 with `OPENCLAW_DOCKER_ALL_TAIL_PARALLELISM`. Heavy lane caps default to `OPENCLAW_DOCKER_ALL_LIVE_LIMIT=9`, `OPENCLAW_DOCKER_ALL_NPM_LIMIT=10`, and `OPENCLAW_DOCKER_ALL_SERVICE_LIMIT=7` so npm install and multi-service lanes do not overcommit Docker while lighter lanes still fill available slots. A single lane heavier than the effective caps can still start from an empty pool, then runs alone until it releases capacity. Lane starts are staggered by 2 seconds by default to avoid local Docker daemon create storms; override with `OPENCLAW_DOCKER_ALL_START_STAGGER_MS=0` or another millisecond value. The local aggregate preflights Docker, removes stale OpenClaw E2E containers, emits active-lane status, persists lane timings for longest-first ordering, and supports `OPENCLAW_DOCKER_ALL_DRY_RUN=1` for scheduler inspection. It stops scheduling new pooled lanes after the first failure by default, and each lane has a 120-minute fallback timeout overrideable with `OPENCLAW_DOCKER_ALL_LANE_TIMEOUT_MS`; selected live/tail lanes use tighter per-lane caps. `OPENCLAW_DOCKER_ALL_LANES=` runs exact scheduler lanes, including release-only lanes such as `install-e2e` and split bundled update lanes such as `bundled-channel-update-acpx`, while skipping the cleanup smoke so agents can reproduce one failed lane. The reusable live/E2E workflow asks `scripts/test-docker-all.mjs --plan-json` which package, image kind, live image, lane, and credential coverage is required, then `scripts/docker-e2e.mjs` converts that plan into GitHub outputs and summaries. It either packs OpenClaw through `scripts/package-openclaw-for-docker.mjs`, downloads a current-run package artifact, or downloads a package artifact from `package_artifact_run_id`; validates the tarball inventory; builds and pushes package-digest-tagged bare/functional GHCR Docker E2E images through Blacksmith's Docker layer cache when the plan needs package-installed lanes; and reuses provided `docker_e2e_bare_image`/`docker_e2e_functional_image` inputs or existing package-digest images instead of rebuilding. The `Package Acceptance` workflow is the high-level package gate: it resolves a candidate from npm, a trusted `package_ref`, an HTTPS tarball plus SHA-256, or a prior workflow artifact, then passes that single `package-under-test` artifact into the reusable Docker E2E workflow. It keeps `workflow_ref` separate from `package_ref` so current acceptance logic can validate older trusted commits without checking out old workflow code. Release checks run a custom Package Acceptance delta for the target ref: bundled-channel compat, offline plugin fixtures, and Telegram package QA against the resolved tarball. The release-path Docker suite runs smaller chunked jobs with `OPENCLAW_SKIP_DOCKER_BUILD=1` so each chunk pulls only the image kind it needs and executes multiple lanes through the same weighted scheduler (`OPENCLAW_DOCKER_ALL_PROFILE=release-path`, `OPENCLAW_DOCKER_ALL_CHUNK=core|package-update-openai|package-update-anthropic|package-update-core|plugins-runtime-plugins|plugins-runtime-services|plugins-runtime-install-a|plugins-runtime-install-b|plugins-runtime-install-c|plugins-runtime-install-d|bundled-channels`). OpenWebUI is folded into `plugins-runtime-services` when full release-path coverage requests it, and keeps a standalone `openwebui` chunk only for OpenWebUI-only dispatches. The legacy aggregate chunk names `package-update`, `plugins-runtime-core`, `plugins-runtime`, and `plugins-integrations` still work for manual reruns, but the release workflow uses the split chunks so installer E2E and bundled plugin install/uninstall sweeps do not dominate the critical path. The `install-e2e` lane alias remains the aggregate manual rerun alias for both provider installer lanes. The `bundled-channels` chunk runs split `bundled-channel-*` and `bundled-channel-update-*` lanes rather than the serial all-in-one `bundled-channel-deps` lane. Each chunk uploads `.artifacts/docker-tests/` with lane logs, timings, `summary.json`, `failures.json`, phase timings, scheduler plan JSON, slow-lane tables, and per-lane rerun commands. The workflow `docker_lanes` input runs selected lanes against the prepared images instead of the chunk jobs, which keeps failed-lane debugging bounded to one targeted Docker job and prepares, downloads, or reuses the package artifact for that run; if a selected lane is a live Docker lane, the targeted job builds the live-test image locally for that rerun. Generated per-lane GitHub rerun commands include `package_artifact_run_id`, `package_artifact_name`, and prepared image inputs when those values exist, so a failed lane can reuse the exact package and images from the failed run. Use `pnpm test:docker:rerun ` to download Docker artifacts from a GitHub run and print combined/per-lane targeted rerun commands; use `pnpm test:docker:timings ` for slow-lane and phase critical-path summaries. The scheduled live/E2E workflow runs the full release-path Docker suite daily. The bundled update matrix is split by update target so repeated npm update and doctor repair passes can shard with other bundled checks. +The separate `install-smoke` workflow reuses the same scope script through its own `preflight` job. It splits smoke coverage into `run_fast_install_smoke` and `run_full_install_smoke`. Pull requests run the fast path for Docker/package surfaces, bundled plugin package/manifest changes, and core plugin/channel/gateway/Plugin SDK surfaces that the Docker smoke jobs exercise. Source-only bundled plugin changes, test-only edits, and docs-only edits do not reserve Docker workers. The fast path builds the root Dockerfile image once, checks the CLI, runs the agents delete shared-workspace CLI smoke, runs the container gateway-network e2e, verifies a bundled extension build arg, and runs the bounded bundled-plugin Docker profile under a 240-second aggregate command timeout with each scenario's Docker run capped separately. The full path keeps QR package install and installer Docker/update coverage for nightly scheduled runs, manual dispatches, workflow-call release checks, and pull requests that truly touch installer/package/Docker surfaces. `main` pushes, including merge commits, do not force the full path; when changed-scope logic would request full coverage on a push, the workflow keeps the fast Docker smoke and leaves the full install smoke to nightly or release validation. The slow Bun global install image-provider smoke is separately gated by `run_bun_global_install_smoke`; it runs on the nightly schedule and from the release checks workflow, and manual `install-smoke` dispatches can opt into it, but pull requests and `main` pushes do not run it. QR and installer Docker tests keep their own install-focused Dockerfiles. Local `test:docker:all` prebuilds one shared live-test image, packs OpenClaw once as an npm tarball, and builds two shared `scripts/e2e/Dockerfile` images: a bare Node/Git runner for installer/update/plugin-dependency lanes and a functional image that installs the same tarball into `/app` for normal functionality lanes. Docker lane definitions live in `scripts/lib/docker-e2e-scenarios.mjs`, planner logic lives in `scripts/lib/docker-e2e-plan.mjs`, and the runner only executes the selected plan. The scheduler selects the image per lane with `OPENCLAW_DOCKER_E2E_BARE_IMAGE` and `OPENCLAW_DOCKER_E2E_FUNCTIONAL_IMAGE`, then runs lanes with `OPENCLAW_SKIP_DOCKER_BUILD=1`; tune the default main-pool slot count of 10 with `OPENCLAW_DOCKER_ALL_PARALLELISM` and the provider-sensitive tail-pool slot count of 10 with `OPENCLAW_DOCKER_ALL_TAIL_PARALLELISM`. Heavy lane caps default to `OPENCLAW_DOCKER_ALL_LIVE_LIMIT=9`, `OPENCLAW_DOCKER_ALL_NPM_LIMIT=10`, and `OPENCLAW_DOCKER_ALL_SERVICE_LIMIT=7` so npm install and multi-service lanes do not overcommit Docker while lighter lanes still fill available slots. A single lane heavier than the effective caps can still start from an empty pool, then runs alone until it releases capacity. Lane starts are staggered by 2 seconds by default to avoid local Docker daemon create storms; override with `OPENCLAW_DOCKER_ALL_START_STAGGER_MS=0` or another millisecond value. The local aggregate preflights Docker, removes stale OpenClaw E2E containers, emits active-lane status, persists lane timings for longest-first ordering, and supports `OPENCLAW_DOCKER_ALL_DRY_RUN=1` for scheduler inspection. It stops scheduling new pooled lanes after the first failure by default, and each lane has a 120-minute fallback timeout overrideable with `OPENCLAW_DOCKER_ALL_LANE_TIMEOUT_MS`; selected live/tail lanes use tighter per-lane caps. `OPENCLAW_DOCKER_ALL_LANES=` runs exact scheduler lanes, including release-only lanes such as `install-e2e` and split bundled update lanes such as `bundled-channel-update-acpx`, while skipping the cleanup smoke so agents can reproduce one failed lane. The reusable live/E2E workflow asks `scripts/test-docker-all.mjs --plan-json` which package, image kind, live image, lane, and credential coverage is required, then `scripts/docker-e2e.mjs` converts that plan into GitHub outputs and summaries. It either packs OpenClaw through `scripts/package-openclaw-for-docker.mjs`, downloads a current-run package artifact, or downloads a package artifact from `package_artifact_run_id`; validates the tarball inventory; builds and pushes package-digest-tagged bare/functional GHCR Docker E2E images through Blacksmith's Docker layer cache when the plan needs package-installed lanes; and reuses provided `docker_e2e_bare_image`/`docker_e2e_functional_image` inputs or existing package-digest images instead of rebuilding. Docker image pulls are retried with a bounded 180-second per-attempt timeout so a stuck registry/cache stream retries quickly instead of consuming most of the CI critical path. The `Package Acceptance` workflow is the high-level package gate: it resolves a candidate from npm, a trusted `package_ref`, an HTTPS tarball plus SHA-256, or a prior workflow artifact, then passes that single `package-under-test` artifact into the reusable Docker E2E workflow. It keeps `workflow_ref` separate from `package_ref` so current acceptance logic can validate older trusted commits without checking out old workflow code. Release checks run a custom Package Acceptance delta for the target ref: bundled-channel compat, offline plugin fixtures, and Telegram package QA against the resolved tarball. The release-path Docker suite runs smaller chunked jobs with `OPENCLAW_SKIP_DOCKER_BUILD=1` so each chunk pulls only the image kind it needs and executes multiple lanes through the same weighted scheduler (`OPENCLAW_DOCKER_ALL_PROFILE=release-path`, `OPENCLAW_DOCKER_ALL_CHUNK=core|package-update-openai|package-update-anthropic|package-update-core|plugins-runtime-plugins|plugins-runtime-services|plugins-runtime-install-a|plugins-runtime-install-b|plugins-runtime-install-c|plugins-runtime-install-d|plugins-runtime-install-e|plugins-runtime-install-f|plugins-runtime-install-g|plugins-runtime-install-h|bundled-channels`). OpenWebUI is folded into `plugins-runtime-services` when full release-path coverage requests it, and keeps a standalone `openwebui` chunk only for OpenWebUI-only dispatches. The legacy aggregate chunk names `package-update`, `plugins-runtime-core`, `plugins-runtime`, and `plugins-integrations` still work for manual reruns, but the release workflow uses the split chunks so installer E2E and bundled plugin install/uninstall sweeps do not dominate the critical path. The `install-e2e` lane alias remains the aggregate manual rerun alias for both provider installer lanes. The `bundled-channels` chunk runs split `bundled-channel-*` and `bundled-channel-update-*` lanes rather than the serial all-in-one `bundled-channel-deps` lane. Each chunk uploads `.artifacts/docker-tests/` with lane logs, timings, `summary.json`, `failures.json`, phase timings, scheduler plan JSON, slow-lane tables, and per-lane rerun commands. The workflow `docker_lanes` input runs selected lanes against the prepared images instead of the chunk jobs, which keeps failed-lane debugging bounded to one targeted Docker job and prepares, downloads, or reuses the package artifact for that run; if a selected lane is a live Docker lane, the targeted job builds the live-test image locally for that rerun. Generated per-lane GitHub rerun commands include `package_artifact_run_id`, `package_artifact_name`, and prepared image inputs when those values exist, so a failed lane can reuse the exact package and images from the failed run. Use `pnpm test:docker:rerun ` to download Docker artifacts from a GitHub run and print combined/per-lane targeted rerun commands; use `pnpm test:docker:timings ` for slow-lane and phase critical-path summaries. The scheduled live/E2E workflow runs the full release-path Docker suite daily. The bundled update matrix is split by update target so repeated npm update and doctor repair passes can shard with other bundled checks. -Current release Docker chunks are `core`, `package-update-openai`, `package-update-anthropic`, `package-update-core`, `plugins-runtime-plugins`, `plugins-runtime-services`, `plugins-runtime-install-a`, `plugins-runtime-install-b`, `plugins-runtime-install-c`, `plugins-runtime-install-d`, `bundled-channels-core`, `bundled-channels-update-a`, `bundled-channels-update-b`, and `bundled-channels-contracts`. The aggregate `bundled-channels` chunk remains available for manual one-shot reruns, and `plugins-runtime-core`, `plugins-runtime`, and `plugins-integrations` remain aggregate plugin/runtime aliases, but the release workflow uses the split chunks so channel smokes, update targets, plugin runtime checks, and bundled plugin install/uninstall sweeps can run in parallel. Targeted `docker_lanes` dispatches also split multiple selected lanes into parallel jobs after one shared package/image preparation step, and bundled-channel update lanes retry once for transient npm network failures. +Current release Docker chunks are `core`, `package-update-openai`, `package-update-anthropic`, `package-update-core`, `plugins-runtime-plugins`, `plugins-runtime-services`, `plugins-runtime-install-a`, `plugins-runtime-install-b`, `plugins-runtime-install-c`, `plugins-runtime-install-d`, `plugins-runtime-install-e`, `plugins-runtime-install-f`, `plugins-runtime-install-g`, `plugins-runtime-install-h`, `bundled-channels-core`, `bundled-channels-update-a`, `bundled-channels-update-discord`, `bundled-channels-update-b`, and `bundled-channels-contracts`. The aggregate `bundled-channels` chunk remains available for manual one-shot reruns, and `plugins-runtime-core`, `plugins-runtime`, and `plugins-integrations` remain aggregate plugin/runtime aliases, but the release workflow uses the split chunks so channel smokes, update targets, plugin runtime checks, and bundled plugin install/uninstall sweeps can run in parallel. Targeted `docker_lanes` dispatches also split multiple selected lanes into parallel jobs after one shared package/image preparation step, and bundled-channel update lanes retry once for transient npm network failures. Local changed-lane logic lives in `scripts/changed-lanes.mjs` and is executed by `scripts/check-changed.mjs`. That local check gate is stricter about architecture boundaries than the broad CI platform scope: core production changes run core prod and core test typecheck plus core lint/guards, core test-only changes run only core test typecheck plus core lint, extension production changes run extension prod and extension test typecheck plus extension lint, and extension test-only changes run extension test typecheck plus extension lint. Public Plugin SDK or plugin-contract changes expand to extension typecheck because extensions depend on those core contracts, but Vitest extension sweeps are explicit test work. Release metadata-only version bumps run targeted version/config/root-dependency checks. Unknown root/config changes fail safe to all check lanes. Local changed-test routing lives in `scripts/test-projects.test-support.mjs` and diff --git a/docs/reference/RELEASING.md b/docs/reference/RELEASING.md index b37c59199a6..94912c4c489 100644 --- a/docs/reference/RELEASING.md +++ b/docs/reference/RELEASING.md @@ -349,16 +349,21 @@ Release Docker coverage includes: - full install smoke with the slow Bun global install smoke enabled - repository E2E lanes - release-path Docker chunks: `core`, `package-update-openai`, - `package-update-anthropic`, `package-update-core`, `plugins-runtime-core`, + `package-update-anthropic`, `package-update-core`, `plugins-runtime-plugins`, + `plugins-runtime-services`, `plugins-runtime-install-a`, `plugins-runtime-install-b`, + `plugins-runtime-install-c`, `plugins-runtime-install-d`, + `plugins-runtime-install-e`, `plugins-runtime-install-f`, + `plugins-runtime-install-g`, `plugins-runtime-install-h`, `bundled-channels-core`, `bundled-channels-update-a`, - `bundled-channels-update-b`, and `bundled-channels-contracts` -- OpenWebUI coverage inside the `plugins-runtime-core` chunk when requested + `bundled-channels-update-discord`, `bundled-channels-update-b`, and + `bundled-channels-contracts` +- OpenWebUI coverage inside the `plugins-runtime-services` chunk when requested - split bundled-channel dependency lanes across channel-smoke, update-target, and setup/runtime contract chunks instead of one large bundled-channel job - split bundled plugin install/uninstall lanes `bundled-plugin-install-uninstall-0` through - `bundled-plugin-install-uninstall-7` + `bundled-plugin-install-uninstall-23` - live/E2E provider suites and Docker live model coverage when release checks include live suites diff --git a/scripts/ci-docker-pull-retry.sh b/scripts/ci-docker-pull-retry.sh index 9b01e43169e..c699f1f569c 100644 --- a/scripts/ci-docker-pull-retry.sh +++ b/scripts/ci-docker-pull-retry.sh @@ -8,8 +8,8 @@ fi image="$1" attempts="${OPENCLAW_DOCKER_PULL_ATTEMPTS:-3}" -timeout_seconds="${OPENCLAW_DOCKER_PULL_TIMEOUT_SECONDS:-480}" -retry_delay_seconds="${OPENCLAW_DOCKER_PULL_RETRY_DELAY_SECONDS:-20}" +timeout_seconds="${OPENCLAW_DOCKER_PULL_TIMEOUT_SECONDS:-180}" +retry_delay_seconds="${OPENCLAW_DOCKER_PULL_RETRY_DELAY_SECONDS:-5}" if ! [[ "$attempts" =~ ^[1-9][0-9]*$ ]]; then echo "OPENCLAW_DOCKER_PULL_ATTEMPTS must be a positive integer, got: $attempts" >&2 diff --git a/scripts/e2e/lib/bundled-plugin-install-uninstall/sweep.sh b/scripts/e2e/lib/bundled-plugin-install-uninstall/sweep.sh index 1c03b529970..4399ab296bd 100644 --- a/scripts/e2e/lib/bundled-plugin-install-uninstall/sweep.sh +++ b/scripts/e2e/lib/bundled-plugin-install-uninstall/sweep.sh @@ -32,11 +32,13 @@ for plugin_entry in "${plugin_entries[@]}"; do IFS=$'\t' read -r plugin_id plugin_dir requires_config <<<"$plugin_entry" install_log="/tmp/openclaw-install-${plugin_index}.log" uninstall_log="/tmp/openclaw-uninstall-${plugin_index}.log" + plugin_started_at="$(date +%s)" echo "Installing bundled plugin: $plugin_id ($plugin_dir)" node "$OPENCLAW_ENTRY" plugins install "$plugin_id" >"$install_log" 2>&1 || { cat "$install_log" exit 1 } + install_finished_at="$(date +%s)" node "$probe" assert-installed "$plugin_id" "$plugin_dir" "$requires_config" echo "Uninstalling bundled plugin: $plugin_id ($plugin_dir)" @@ -44,7 +46,9 @@ for plugin_entry in "${plugin_entries[@]}"; do cat "$uninstall_log" exit 1 } + uninstall_finished_at="$(date +%s)" node "$probe" assert-uninstalled "$plugin_id" "$plugin_dir" + echo "Bundled plugin lifecycle timing: $plugin_id install=$((install_finished_at - plugin_started_at))s uninstall=$((uninstall_finished_at - install_finished_at))s total=$((uninstall_finished_at - plugin_started_at))s" plugin_index=$((plugin_index + 1)) done diff --git a/scripts/lib/docker-e2e-scenarios.mjs b/scripts/lib/docker-e2e-scenarios.mjs index e718c0cf5ab..59e39918abc 100644 --- a/scripts/lib/docker-e2e-scenarios.mjs +++ b/scripts/lib/docker-e2e-scenarios.mjs @@ -9,7 +9,7 @@ const LIVE_ACP_TIMEOUT_MS = 20 * 60 * 1000; const LIVE_CLI_TIMEOUT_MS = 20 * 60 * 1000; const LIVE_PROFILE_TIMEOUT_MS = 20 * 60 * 1000; const OPENWEBUI_TIMEOUT_MS = 20 * 60 * 1000; -export const BUNDLED_PLUGIN_INSTALL_UNINSTALL_SHARDS = 8; +export const BUNDLED_PLUGIN_INSTALL_UNINSTALL_SHARDS = 24; export const LIVE_RETRY_PATTERNS = [ /529\b/i, @@ -180,7 +180,7 @@ const bundledPluginInstallUninstallLanes = Array.from( `bundled-plugin-install-uninstall-${index}`, `OPENCLAW_BUNDLED_PLUGIN_SWEEP_TOTAL=${BUNDLED_PLUGIN_INSTALL_UNINSTALL_SHARDS} OPENCLAW_BUNDLED_PLUGIN_SWEEP_INDEX=${index} OPENCLAW_SKIP_DOCKER_BUILD=1 pnpm test:docker:bundled-plugin-install-uninstall`, { - estimateSeconds: 280, + estimateSeconds: 120, resources: ["npm"], stateScenario: "empty", weight: 1, @@ -563,10 +563,14 @@ const primaryReleasePathChunks = { "package-update-core": releasePathPackageUpdateCoreLanes, "plugins-runtime-plugins": releasePathPluginRuntimePluginLanes, "plugins-runtime-services": releasePathPluginRuntimeServiceLanes, - "plugins-runtime-install-a": bundledPluginInstallUninstallLanes.slice(0, 2), - "plugins-runtime-install-b": bundledPluginInstallUninstallLanes.slice(2, 4), - "plugins-runtime-install-c": bundledPluginInstallUninstallLanes.slice(4, 6), - "plugins-runtime-install-d": bundledPluginInstallUninstallLanes.slice(6), + "plugins-runtime-install-a": bundledPluginInstallUninstallLanes.slice(0, 3), + "plugins-runtime-install-b": bundledPluginInstallUninstallLanes.slice(3, 6), + "plugins-runtime-install-c": bundledPluginInstallUninstallLanes.slice(6, 9), + "plugins-runtime-install-d": bundledPluginInstallUninstallLanes.slice(9, 12), + "plugins-runtime-install-e": bundledPluginInstallUninstallLanes.slice(12, 15), + "plugins-runtime-install-f": bundledPluginInstallUninstallLanes.slice(15, 18), + "plugins-runtime-install-g": bundledPluginInstallUninstallLanes.slice(18, 21), + "plugins-runtime-install-h": bundledPluginInstallUninstallLanes.slice(21), "bundled-channels-core": [releasePathBundledChannelLanes[0], ...bundledChannelSmokeLanes], "bundled-channels-update-a": [bundledChannelUpdateLanes[0], bundledChannelUpdateLanes[4]], "bundled-channels-update-discord": [bundledChannelUpdateLanes[1]], diff --git a/test/scripts/docker-e2e-plan.test.ts b/test/scripts/docker-e2e-plan.test.ts index 1eb8b7520ca..ac889e955ba 100644 --- a/test/scripts/docker-e2e-plan.test.ts +++ b/test/scripts/docker-e2e-plan.test.ts @@ -5,6 +5,7 @@ import { parseLaneSelection, resolveDockerE2ePlan, } from "../../scripts/lib/docker-e2e-plan.mjs"; +import { BUNDLED_PLUGIN_INSTALL_UNINSTALL_SHARDS } from "../../scripts/lib/docker-e2e-scenarios.mjs"; const orderLanes = (lanes: T[]) => lanes; @@ -47,7 +48,7 @@ describe("scripts/lib/docker-e2e-plan", () => { expect(plan.lanes.map((lane) => lane.name)).toContain("bundled-channel-feishu"); expect(plan.lanes.map((lane) => lane.name)).toContain("bundled-channel-update-acpx"); expect(plan.lanes.map((lane) => lane.name)).toContain("bundled-plugin-install-uninstall-0"); - expect(plan.lanes.map((lane) => lane.name)).toContain("bundled-plugin-install-uninstall-7"); + expect(plan.lanes.map((lane) => lane.name)).toContain("bundled-plugin-install-uninstall-23"); expect(plan.lanes.filter((lane) => lane.name === "install-e2e-openai")).toHaveLength(1); expect( plan.lanes.filter((lane) => lane.name === "bundled-plugin-install-uninstall-0"), @@ -119,6 +120,26 @@ describe("scripts/lib/docker-e2e-plan", () => { profile: RELEASE_PATH_PROFILE, releaseChunk: "plugins-runtime-install-d", }); + const pluginsRuntimeInstallE = planFor({ + includeOpenWebUI: true, + profile: RELEASE_PATH_PROFILE, + releaseChunk: "plugins-runtime-install-e", + }); + const pluginsRuntimeInstallF = planFor({ + includeOpenWebUI: true, + profile: RELEASE_PATH_PROFILE, + releaseChunk: "plugins-runtime-install-f", + }); + const pluginsRuntimeInstallG = planFor({ + includeOpenWebUI: true, + profile: RELEASE_PATH_PROFILE, + releaseChunk: "plugins-runtime-install-g", + }); + const pluginsRuntimeInstallH = planFor({ + includeOpenWebUI: true, + profile: RELEASE_PATH_PROFILE, + releaseChunk: "plugins-runtime-install-h", + }); const bundledChannelsCore = planFor({ includeOpenWebUI: true, profile: RELEASE_PATH_PROFILE, @@ -190,18 +211,42 @@ describe("scripts/lib/docker-e2e-plan", () => { expect(pluginsRuntimeInstallA.lanes.map((lane) => lane.name)).toEqual([ "bundled-plugin-install-uninstall-0", "bundled-plugin-install-uninstall-1", + "bundled-plugin-install-uninstall-2", ]); expect(pluginsRuntimeInstallB.lanes.map((lane) => lane.name)).toEqual([ - "bundled-plugin-install-uninstall-2", "bundled-plugin-install-uninstall-3", - ]); - expect(pluginsRuntimeInstallC.lanes.map((lane) => lane.name)).toEqual([ "bundled-plugin-install-uninstall-4", "bundled-plugin-install-uninstall-5", ]); - expect(pluginsRuntimeInstallD.lanes.map((lane) => lane.name)).toEqual([ + expect(pluginsRuntimeInstallC.lanes.map((lane) => lane.name)).toEqual([ "bundled-plugin-install-uninstall-6", "bundled-plugin-install-uninstall-7", + "bundled-plugin-install-uninstall-8", + ]); + expect(pluginsRuntimeInstallD.lanes.map((lane) => lane.name)).toEqual([ + "bundled-plugin-install-uninstall-9", + "bundled-plugin-install-uninstall-10", + "bundled-plugin-install-uninstall-11", + ]); + expect(pluginsRuntimeInstallE.lanes.map((lane) => lane.name)).toEqual([ + "bundled-plugin-install-uninstall-12", + "bundled-plugin-install-uninstall-13", + "bundled-plugin-install-uninstall-14", + ]); + expect(pluginsRuntimeInstallF.lanes.map((lane) => lane.name)).toEqual([ + "bundled-plugin-install-uninstall-15", + "bundled-plugin-install-uninstall-16", + "bundled-plugin-install-uninstall-17", + ]); + expect(pluginsRuntimeInstallG.lanes.map((lane) => lane.name)).toEqual([ + "bundled-plugin-install-uninstall-18", + "bundled-plugin-install-uninstall-19", + "bundled-plugin-install-uninstall-20", + ]); + expect(pluginsRuntimeInstallH.lanes.map((lane) => lane.name)).toEqual([ + "bundled-plugin-install-uninstall-21", + "bundled-plugin-install-uninstall-22", + "bundled-plugin-install-uninstall-23", ]); expect(bundledChannelsCore.lanes.map((lane) => lane.name)).toEqual([ "plugin-update", @@ -274,7 +319,7 @@ describe("scripts/lib/docker-e2e-plan", () => { expect.arrayContaining([ "plugins", "bundled-plugin-install-uninstall-0", - "bundled-plugin-install-uninstall-7", + "bundled-plugin-install-uninstall-23", "openwebui", ]), ); @@ -468,9 +513,12 @@ describe("scripts/lib/docker-e2e-plan", () => { const plan = planFor({ selectedLaneNames }); expect(selectedLaneNames).toEqual( - Array.from({ length: 8 }, (_, index) => `bundled-plugin-install-uninstall-${index}`), + Array.from( + { length: BUNDLED_PLUGIN_INSTALL_UNINSTALL_SHARDS }, + (_, index) => `bundled-plugin-install-uninstall-${index}`, + ), ); - expect(plan.lanes).toHaveLength(8); + expect(plan.lanes).toHaveLength(BUNDLED_PLUGIN_INSTALL_UNINSTALL_SHARDS); expect(plan.lanes[0]).toEqual( expect.objectContaining({ command: expect.stringContaining("OPENCLAW_BUNDLED_PLUGIN_SWEEP_INDEX=0"), @@ -480,12 +528,12 @@ describe("scripts/lib/docker-e2e-plan", () => { resources: expect.arrayContaining(["docker", "npm"]), }), ); - expect(plan.lanes[7]).toEqual( + expect(plan.lanes[23]).toEqual( expect.objectContaining({ - command: expect.stringContaining("OPENCLAW_BUNDLED_PLUGIN_SWEEP_INDEX=7"), + command: expect.stringContaining("OPENCLAW_BUNDLED_PLUGIN_SWEEP_INDEX=23"), imageKind: "functional", live: false, - name: "bundled-plugin-install-uninstall-7", + name: "bundled-plugin-install-uninstall-23", resources: expect.arrayContaining(["docker", "npm"]), }), ); diff --git a/test/scripts/package-acceptance-workflow.test.ts b/test/scripts/package-acceptance-workflow.test.ts index c42297392b2..6c2b9404753 100644 --- a/test/scripts/package-acceptance-workflow.test.ts +++ b/test/scripts/package-acceptance-workflow.test.ts @@ -99,6 +99,10 @@ describe("package artifact reuse", () => { expect(pullHelper).toContain("OPENCLAW_DOCKER_PULL_ATTEMPTS"); expect(pullHelper).toContain("OPENCLAW_DOCKER_PULL_TIMEOUT_SECONDS"); + expect(pullHelper).toContain('timeout_seconds="${OPENCLAW_DOCKER_PULL_TIMEOUT_SECONDS:-180}"'); + expect(pullHelper).toContain( + 'retry_delay_seconds="${OPENCLAW_DOCKER_PULL_RETRY_DELAY_SECONDS:-5}"', + ); expect(pullHelper).toContain( 'timeout --foreground --kill-after=30s "${timeout_seconds}s" docker pull "$image"', ); diff --git a/test/scripts/plugin-prerelease-test-plan.test.ts b/test/scripts/plugin-prerelease-test-plan.test.ts index bad03042ea1..db707158746 100644 --- a/test/scripts/plugin-prerelease-test-plan.test.ts +++ b/test/scripts/plugin-prerelease-test-plan.test.ts @@ -3,6 +3,7 @@ import { readFileSync } from "node:fs"; import { describe, expect, it } from "vitest"; import { parse } from "yaml"; import { findLaneByName } from "../../scripts/lib/docker-e2e-plan.mjs"; +import { BUNDLED_PLUGIN_INSTALL_UNINSTALL_SHARDS } from "../../scripts/lib/docker-e2e-scenarios.mjs"; import { PLUGIN_PRERELEASE_REQUIRED_SURFACES, assertPluginPrereleaseTestPlanComplete, @@ -46,14 +47,10 @@ describe("scripts/lib/plugin-prerelease-test-plan.mjs", () => { "gateway-network", "mcp-channels", "cron-mcp-cleanup", - "bundled-plugin-install-uninstall-0", - "bundled-plugin-install-uninstall-1", - "bundled-plugin-install-uninstall-2", - "bundled-plugin-install-uninstall-3", - "bundled-plugin-install-uninstall-4", - "bundled-plugin-install-uninstall-5", - "bundled-plugin-install-uninstall-6", - "bundled-plugin-install-uninstall-7", + ...Array.from( + { length: BUNDLED_PLUGIN_INSTALL_UNINSTALL_SHARDS }, + (_, index) => `bundled-plugin-install-uninstall-${index}`, + ), ]); for (const lane of plan.dockerLanes) {