Skip to content

Commit ecf51ae

Browse files
committed
fix(ci): finish release E2E with bounded parallel shards
1 parent b5ae14d commit ecf51ae

4 files changed

Lines changed: 76 additions & 14 deletions

File tree

‎.github/workflows/openclaw-live-and-e2e-checks-reusable.yml‎

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1036,11 +1036,35 @@ jobs:
10361036
done
10371037
10381038
validate_repo_e2e:
1039+
name: Repo E2E (${{ matrix.name }})
10391040
needs: validate_selected_ref
10401041
if: inputs.include_repo_e2e && inputs.live_suite_filter == ''
10411042
continue-on-error: ${{ inputs.advisory }}
10421043
runs-on: ${{ inputs.use_github_hosted_runners && 'ubuntu-24.04' || 'blacksmith-32vcpu-ubuntu-2404' }}
10431044
timeout-minutes: 90
1045+
strategy:
1046+
fail-fast: false
1047+
max-parallel: 6
1048+
matrix:
1049+
include:
1050+
- name: Gateway 1/4
1051+
command: pnpm test:e2e:gateway --shard=1/4
1052+
- name: Gateway 2/4
1053+
command: pnpm test:e2e:gateway --shard=2/4
1054+
- name: Gateway 3/4
1055+
command: pnpm test:e2e:gateway --shard=3/4
1056+
- name: Gateway 4/4
1057+
command: pnpm test:e2e:gateway --shard=4/4
1058+
- name: UI 1/4
1059+
command: pnpm test:ui:e2e --shard=1/4
1060+
- name: UI 2/4
1061+
command: pnpm test:ui:e2e --shard=2/4
1062+
- name: UI 3/4
1063+
command: pnpm test:ui:e2e --shard=3/4
1064+
- name: UI 4/4
1065+
command: pnpm test:ui:e2e --shard=4/4
1066+
- name: Agent plugin Gateway
1067+
command: pnpm test:e2e:agent-plugin-gateway
10441068
env:
10451069
OPENCLAW_BUILD_PRIVATE_QA: "1"
10461070
OPENCLAW_ENABLE_PRIVATE_QA_CLI: "1"
@@ -1075,7 +1099,7 @@ jobs:
10751099
env:
10761100
OPENCLAW_E2E_WORKERS: "2"
10771101
OPENCLAW_E2E_USE_PREBUILT_DIST: "1"
1078-
run: pnpm test:e2e
1102+
run: ${{ matrix.command }}
10791103

10801104
validate_special_e2e:
10811105
needs: validate_selected_ref

‎docs/ci.md‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -821,6 +821,21 @@ A lane heavier than its effective cap can still start from an empty pool, then r
821821

822822
### Reusable live/E2E workflow
823823

824+
Repository E2E runs as nine independent jobs: four native Gateway shards, four
825+
duration-weighted Control UI shards, and the standalone agent-plugin Gateway
826+
test. At most six run concurrently, and a failure does not cancel the remaining
827+
jobs. Every job checks out the same selected source and prepares its own full
828+
private-QA build, Chromium, and sandbox image. Gateway shards retain the existing
829+
four fresh-process boundaries and two-worker limit; UI shards retain serial
830+
files within each process. No tests are filtered out, and the existing
831+
90-minute job deadline is unchanged. Local `pnpm test:e2e` remains sequential.
832+
833+
This trades nine builds and eight additional jobs per invocation for a shorter
834+
critical path and complete results from every E2E surface. Release checks use
835+
GitHub-hosted runners, so this adds no Blacksmith registrations there. A
836+
standalone dispatch using Blacksmith can register nine runners per invocation;
837+
the six-job concurrency cap does not reduce that total registration budget.
838+
824839
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. `scripts/docker-e2e.mjs` then 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`, then validates the tarball inventory. The default `no-push-artifact` path builds package-digest-tagged bare/functional images through Blacksmith's Docker layer cache, packs the exact image bytes into an immutable workflow artifact, and has each consumer verify and load that artifact. `existing-only` instead requires explicit `docker_e2e_bare_image`/`docker_e2e_functional_image` GHCR refs and never builds or pushes. Those registry pulls use a bounded 180-second per-attempt timeout so a stuck stream retries quickly instead of consuming most of the CI critical path. After successful scheduled validation, `openclaw-scheduled-live-checks.yml` passes the immutable tested-image manifest to the separate package-write publisher; read-only release and prerelease callers never traverse that writer.
825840

826841
### Release-path chunks

‎test/scripts/ci-workflow-guards.test.ts‎

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4819,18 +4819,41 @@ server.listen(0, "127.0.0.1", () => {
48194819
const releaseChecks = parse(
48204820
readFileSync(".github/workflows/openclaw-live-and-e2e-checks-reusable.yml", "utf8"),
48214821
);
4822-
expect(releaseChecks.jobs.validate_repo_e2e.env).toMatchObject({
4822+
const repoE2e = releaseChecks.jobs.validate_repo_e2e;
4823+
expect(repoE2e.env).toMatchObject({
48234824
OPENCLAW_BUILD_PRIVATE_QA: "1",
48244825
OPENCLAW_ENABLE_PRIVATE_QA_CLI: "1",
4825-
});
4826-
expect(releaseChecks.jobs.validate_repo_e2e["timeout-minutes"]).toBe(90);
4827-
const repoE2eSteps = releaseChecks.jobs.validate_repo_e2e.steps as WorkflowStep[];
4826+
OPENCLAW_VITEST_MAX_WORKERS: "2",
4827+
});
4828+
expect(repoE2e["timeout-minutes"]).toBe(90);
4829+
expect(repoE2e.strategy).toMatchObject({ "fail-fast": false, "max-parallel": 6 });
4830+
const repoE2eRows = repoE2e.strategy.matrix.include as Array<{
4831+
name: string;
4832+
command: string;
4833+
}>;
4834+
expect(repoE2eRows.map((row) => row.command)).toEqual([
4835+
...Array.from({ length: 4 }, (_, index) => `pnpm test:e2e:gateway --shard=${index + 1}/4`),
4836+
...Array.from({ length: 4 }, (_, index) => `pnpm test:ui:e2e --shard=${index + 1}/4`),
4837+
"pnpm test:e2e:agent-plugin-gateway",
4838+
]);
4839+
expect(new Set(repoE2eRows.map((row) => row.name)).size).toBe(9);
4840+
expect(repoE2e.name).toBe("Repo E2E (${{ matrix.name }})");
4841+
expect(repoE2e.if).toBe("inputs.include_repo_e2e && inputs.live_suite_filter == ''");
4842+
expect(repoE2e["continue-on-error"]).toBe("${{ inputs.advisory }}");
4843+
const repoE2eSteps = repoE2e.steps as WorkflowStep[];
4844+
expect(repoE2eSteps.find((step) => step.name === "Checkout selected ref")?.with?.ref).toBe(
4845+
"${{ needs.validate_selected_ref.outputs.selected_sha }}",
4846+
);
48284847
const sandboxSetupIndex = repoE2eSteps.findIndex(
48294848
(step) => step.name === "Build sandbox image" && step.run === "scripts/sandbox-setup.sh",
48304849
);
48314850
const repoE2eIndex = repoE2eSteps.findIndex((step) => step.name === "Run repo E2E suite");
48324851
expect(sandboxSetupIndex).toBeGreaterThanOrEqual(0);
48334852
expect(repoE2eIndex).toBeGreaterThan(sandboxSetupIndex);
4853+
expect(repoE2eSteps[repoE2eIndex]).toMatchObject({
4854+
run: "${{ matrix.command }}",
4855+
env: { OPENCLAW_E2E_WORKERS: "2", OPENCLAW_E2E_USE_PREBUILT_DIST: "1" },
4856+
});
48344857
const targetedGroupStep = releaseChecks.jobs.plan_docker_lane_groups.steps.find(
48354858
(step: WorkflowStep) => step.name === "Build targeted Docker lane groups",
48364859
);

‎test/scripts/package-acceptance-workflow.test.ts‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4364,15 +4364,15 @@ describe("package artifact reuse", () => {
43644364
);
43654365
expect(workflow).toContain("bash .release-harness/scripts/ci-live-command-retry.sh");
43664366
expect(workflow).toContain("use_github_hosted_runners:");
4367-
expect(workflow).toMatch(
4368-
/validate_repo_e2e:[\s\S]*?runs-on: \$\{\{ inputs\.use_github_hosted_runners && 'ubuntu-24\.04' \|\| 'blacksmith-8vcpu-ubuntu-2404' \}\}/u,
4369-
);
4370-
expect(workflow).toMatch(
4371-
/validate_special_e2e:[\s\S]*?runs-on: \$\{\{ inputs\.use_github_hosted_runners && 'ubuntu-24\.04' \|\| 'blacksmith-8vcpu-ubuntu-2404' \}\}/u,
4372-
);
4373-
expect(workflow).toMatch(
4374-
/validate_live_provider_suites:[\s\S]*?runs-on: \$\{\{ inputs\.use_github_hosted_runners && 'ubuntu-24\.04' \|\| 'blacksmith-8vcpu-ubuntu-2404' \}\}/u,
4375-
);
4367+
for (const [jobName, runner] of [
4368+
["validate_repo_e2e", "blacksmith-32vcpu-ubuntu-2404"],
4369+
["validate_special_e2e", "blacksmith-32vcpu-ubuntu-2404"],
4370+
["validate_live_provider_suites", "blacksmith-8vcpu-ubuntu-2404"],
4371+
] as const) {
4372+
expect(workflowJob(LIVE_E2E_WORKFLOW, jobName)["runs-on"]).toBe(
4373+
`\${{ inputs.use_github_hosted_runners && 'ubuntu-24.04' || '${runner}' }}`,
4374+
);
4375+
}
43764376
expect(workflow).toContain("suite_id: native-live-src-gateway-core");
43774377
expect(workflow).toContain("suite_id: native-live-src-gateway-backends");
43784378
expect(workflow).toContain(

0 commit comments

Comments
 (0)