Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/workflows/e2e-vitest-scenarios.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -794,6 +794,8 @@ jobs:
needs: generate-matrix
if: ${{ (inputs.jobs == '' && inputs.scenarios == '') || contains(format(',{0},', inputs.jobs), ',gpu-e2e-vitest,') || contains(format(',{0},', inputs.scenarios), ',gpu-e2e,') }}
runs-on: linux-amd64-gpu-rtxpro6000-latest-1
# The 55 minute install command includes a cold 40 minute model pull;
# 35 minutes remain for runner setup, assertions, artifacts, and cleanup.
timeout-minutes: 90
env:
FREE_STANDING_VITEST_JOB: "1"
Expand All @@ -804,6 +806,7 @@ jobs:
NEMOCLAW_NON_INTERACTIVE: "1"
NEMOCLAW_ACCEPT_THIRD_PARTY_SOFTWARE: "1"
NEMOCLAW_PROVIDER: "ollama"
NEMOCLAW_OLLAMA_PULL_TIMEOUT: "2400"
NEMOCLAW_SANDBOX_NAME: "e2e-gpu-ollama"
OPENSHELL_GATEWAY: "nemoclaw"
steps:
Expand Down Expand Up @@ -5664,6 +5667,19 @@ jobs:
with:
persist-credentials: false

- name: Configure isolated Docker auth directory
run: echo "DOCKER_CONFIG=${RUNNER_TEMP}/docker-config-spark-install" >> "$GITHUB_ENV"

- name: Authenticate to Docker Hub
if: github.ref == 'refs/heads/main'
# Authentication only accelerates pulls; anonymous pulls remain valid.
continue-on-error: true
uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4.2.0
with:
registry: docker.io
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
- name: Set up Node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.0.0
with:
Expand Down Expand Up @@ -5696,6 +5712,15 @@ jobs:
if-no-files-found: ignore
retention-days: 14

- name: Clean up Docker auth
if: always()
run: |
set -euo pipefail
if [[ -n "${DOCKER_CONFIG:-}" && "${DOCKER_CONFIG}" == "${RUNNER_TEMP}/docker-config-spark-install" ]]; then
docker logout docker.io || true
rm -rf -- "${DOCKER_CONFIG}"
fi

# ── PR result comment (mirrors nightly-e2e.yaml's report-to-pr) ───────────
# Posts a results table on the open PR for the dispatching branch (or the
# PR identified by `inputs.pr_number`). `if: always()` so the comment lands
Expand Down
13 changes: 12 additions & 1 deletion .github/workflows/nightly-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,15 @@ jobs:
github_token: true
secrets: *nightly-e2e-default-secrets
openclaw-tui-chat-correlation-e2e:
# Keep this strict hosted-correlation probe out of the peak inference burst.
# Selective dispatches skip unselected dependencies, so always() preserves
# targeted execution while the full gate waits for the peak hosted jobs.
needs:
- token-rotation-e2e
- channels-stop-start-openclaw-e2e
- channels-stop-start-hermes-e2e
if: >-
always() &&
github.repository == 'NVIDIA/NemoClaw' &&
(github.event_name != 'workflow_dispatch' ||
inputs.jobs == '' ||
Expand Down Expand Up @@ -2242,13 +2250,16 @@ jobs:
inputs.jobs == '' ||
contains(format(',{0},', inputs.jobs), ',gpu-e2e,'))
runs-on: linux-amd64-gpu-rtxpro6000-latest-1
timeout-minutes: 30
# A cold runner may spend up to 40 minutes pulling the 35B model;
# 15 minutes remain for install/assertions and 5 minutes for cleanup.
timeout-minutes: 60
env:
NEMOCLAW_NON_INTERACTIVE: "1"
NEMOCLAW_ACCEPT_THIRD_PARTY_SOFTWARE: "1"
NEMOCLAW_SANDBOX_NAME: "e2e-gpu-ollama"
NEMOCLAW_RECREATE_SANDBOX: "1"
NEMOCLAW_PROVIDER: "ollama"
NEMOCLAW_OLLAMA_PULL_TIMEOUT: "2400"
steps:
- *target-ref-checkout

Expand Down
84 changes: 84 additions & 0 deletions test/e2e-release-gate-workflow.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
// SPDX-License-Identifier: Apache-2.0

import { readFileSync } from "node:fs";

import { describe, expect, it } from "vitest";

import {
loadE2eWorkflowContract,
readYaml,
type WorkflowJob,
} from "./helpers/e2e-workflow-contract";

const { nightlyWorkflow } = loadE2eWorkflowContract();
const vitestWorkflow = readYaml<{ jobs: Record<string, WorkflowJob> }>(
".github/workflows/e2e-vitest-scenarios.yaml",
);

describe("release gate workflow resource contracts", () => {
it("runs the strict hosted TUI correlation probe after peak hosted lifecycle jobs", () => {
const job = nightlyWorkflow.jobs["openclaw-tui-chat-correlation-e2e"];
const dependencies = [
"token-rotation-e2e",
"channels-stop-start-openclaw-e2e",
"channels-stop-start-hermes-e2e",
];

expect(job.needs).toEqual(dependencies);
for (const dependency of dependencies) expect(nightlyWorkflow.jobs).toHaveProperty(dependency);
expect(job.if).toContain("always()");
expect(job.if).toContain(",openclaw-tui-chat-correlation-e2e,");
});

it("budgets cold Ollama pulls in both retained and Vitest GPU lanes", () => {
const nightlyJob = nightlyWorkflow.jobs["gpu-e2e"];
const vitestJob = vitestWorkflow.jobs["gpu-e2e-vitest"];
const liveTest = readFileSync(
new URL("./e2e-scenario/live/gpu-e2e.test.ts", import.meta.url),
"utf8",
);

expect(nightlyJob["timeout-minutes"]).toBe(60);
expect(nightlyJob.env?.NEMOCLAW_OLLAMA_PULL_TIMEOUT).toBe("2400");
expect(vitestJob["timeout-minutes"]).toBe(90);
expect(vitestJob.env?.NEMOCLAW_OLLAMA_PULL_TIMEOUT).toBe("2400");
expect(liveTest).toContain("timeoutMs: 55 * 60_000");
});

it("authenticates Spark image pulls with an isolated Docker config", () => {
const steps = vitestWorkflow.jobs["spark-install-vitest"].steps ?? [];
const stepIndex = (name: string) => steps.findIndex((step) => step.name === name);
const configure = steps.find(
(step) => step.name === "Configure isolated Docker auth directory",
);
const auth = steps.find((step) => step.name === "Authenticate to Docker Hub");
const cleanup = steps.find((step) => step.name === "Clean up Docker auth");

expect(configure?.run).toBe(
'echo "DOCKER_CONFIG=${RUNNER_TEMP}/docker-config-spark-install" >> "$GITHUB_ENV"',
);
expect(auth?.uses).toBe("docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee");
expect(auth?.if).toBe("github.ref == 'refs/heads/main'");
expect(auth?.["continue-on-error"]).toBe(true);
expect(auth?.with).toMatchObject({
registry: "docker.io",
username: "${{ secrets.DOCKERHUB_USERNAME }}",
password: "${{ secrets.DOCKERHUB_TOKEN }}",
});
expect(auth?.env).toBeUndefined();
expect(auth?.run).toBeUndefined();
expect(stepIndex("Configure isolated Docker auth directory")).toBeLessThan(
stepIndex("Authenticate to Docker Hub"),
);
expect(stepIndex("Authenticate to Docker Hub")).toBeLessThan(
stepIndex("Run Spark install live test"),
);
expect(cleanup?.if).toBe("always()");
expect(cleanup?.run).toContain(
'"${DOCKER_CONFIG}" == "${RUNNER_TEMP}/docker-config-spark-install"',
);
expect(cleanup?.run).toContain("docker logout docker.io || true");
expect(cleanup?.run).toContain('rm -rf -- "${DOCKER_CONFIG}"');
});
});
5 changes: 3 additions & 2 deletions test/e2e-scenario/fixtures/availability-env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@ const AVAILABILITY_PROBE_EXTRA_ENV_KEYS = [
"DOCKER_CERT_PATH",
"DOCKER_API_VERSION",
"XDG_RUNTIME_DIR",
"NEMOCLAW_OLLAMA_PULL_TIMEOUT",
];

export function buildAvailabilityProbeEnv(
base: NodeJS.ProcessEnv = process.env,
): NodeJS.ProcessEnv {
// Availability probes run outside live scenario phases, but they need
// the same child-env and PATH policy. Add only Docker
// discovery knobs on top of the shared fixture boundary.
// the same child-env and PATH policy. Add Docker discovery knobs and the
// workflow-owned local-model pull budget on top of the shared boundary.
return buildChildEnv(base, {
additionalAllowedEnv: AVAILABILITY_PROBE_EXTRA_ENV_KEYS,
fixtureOverlay: {},
Expand Down
7 changes: 5 additions & 2 deletions test/e2e-scenario/live/gpu-e2e-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,12 @@ function tcpPort(value: string | undefined, fallback: string): string {
return raw;
}

export function env(extra: NodeJS.ProcessEnv = {}): NodeJS.ProcessEnv {
export function env(
extra: NodeJS.ProcessEnv = {},
base: NodeJS.ProcessEnv = process.env,
): NodeJS.ProcessEnv {
return {
...buildAvailabilityProbeEnv(),
...buildAvailabilityProbeEnv(base),
NEMOCLAW_ACCEPT_THIRD_PARTY_SOFTWARE: "1",
NEMOCLAW_NON_INTERACTIVE: "1",
NEMOCLAW_PROVIDER: "ollama",
Expand Down
2 changes: 1 addition & 1 deletion test/e2e-scenario/live/gpu-e2e.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ test.skipIf(!shouldRunLiveE2EScenarios())(
artifactName: "install-gpu-ollama",
cwd: REPO_ROOT,
env: env(),
timeoutMs: 45 * 60_000,
timeoutMs: 55 * 60_000,
});
expect(install.exitCode, resultText(install)).toBe(0);
await artifacts.writeText("install-gpu-ollama.log", resultText(install));
Expand Down
18 changes: 18 additions & 0 deletions test/e2e-scenario/support-tests/gpu-e2e-helpers.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
// SPDX-License-Identifier: Apache-2.0

import { describe, expect, it } from "vitest";

import { env } from "../live/gpu-e2e-helpers.ts";

describe("GPU E2E helpers", () => {
it("forwards the workflow-owned Ollama model pull timeout", () => {
expect(env({}, { NEMOCLAW_OLLAMA_PULL_TIMEOUT: "2400" }).NEMOCLAW_OLLAMA_PULL_TIMEOUT).toBe(
"2400",
);
});

it("does not synthesize an Ollama model pull timeout outside workflow configuration", () => {
expect(env({}, {}).NEMOCLAW_OLLAMA_PULL_TIMEOUT).toBeUndefined();
});
});
3 changes: 3 additions & 0 deletions test/helpers/e2e-workflow-contract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import YAML from "yaml";
const REPO_ROOT = join(dirname(fileURLToPath(import.meta.url)), "..", "..");

export type WorkflowJob = {
if?: string;
needs?: string | string[];
"runs-on"?: string;
"timeout-minutes"?: number;
uses?: string;
Expand All @@ -23,6 +25,7 @@ export type WorkflowJob = {
};

export type WorkflowStep = {
"continue-on-error"?: boolean;
id?: string;
name?: string;
if?: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import os from "node:os";
import path from "node:path";
import { describe, it } from "vitest";

const REPO_ROOT = path.join(import.meta.dirname, "../../..");
const REPO_ROOT = path.join(import.meta.dirname, "../..");

describe("inference selection validation", () => {
it("preserves non-zero exit signaling when non-interactive endpoint validation fails (#5721)", () => {
Expand Down
Loading