Repository navigation
fix(ci): enable NVIDIA self-hosted runners for PR E2E tests - #2374
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughAdds a GitHub Actions job that downloads and loads a sandbox image, runs host- and container-level filesystem diagnostics (including symlink/rename/copy experiments via a new shell+Node script), and executes the E2E suite inside the container while preserving diagnostic output on failure. Changes
Sequence Diagram(s)sequenceDiagram
participant Runner as Runner (self-hosted / github-hosted)
participant Artifact as GitHub Artifact
participant Host as Host Shell
participant Container as Container Runtime
participant Node as Node.js (in-container)
Runner->>Artifact: download `sandbox-test-image`
Runner->>Host: emit host & Docker diagnostics
Runner->>Host: `docker load` image
Host->>Container: start container (mount workspace & script)
Runner->>Container: run shell diagnostics (`diag-container-fs.sh`)
Container->>Node: execute embedded Node.js fs tests
Node-->>Container: return structured success/error
Runner->>Container: run E2E suite (continue-on-error)
Container-->>Runner: logs and diagnostic output
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
7e58a6f to
239a30c
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/pr-self-hosted.yaml:
- Around line 173-208: The repro script is copying the wrong source tree
(openclaw-data) whereas rollbackFromSnapshot() copies snapshotDir/openclaw;
update the test to copy the exact same path rollbackFromSnapshot uses—e.g., set
snapshot = base + "/openclaw-data/openclaw" (or call fs.cpSync(snapshot +
"/openclaw", ...)) so fs.cpSync copies the symlinked openclaw tree rather than
the raw openclaw-data directory; adjust the subsequent reads
(fs.readdirSync(base + "/openclaw")) expectations accordingly.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: ae9c15dc-2da7-447e-ba9f-b8f487480357
📒 Files selected for processing (1)
.github/workflows/pr-self-hosted.yaml
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (1)
.github/workflows/pr-self-hosted.yaml (1)
173-208:⚠️ Potential issue | 🟠 MajorNode repro is still copying the wrong source tree for rollback simulation.
Line 200 sets
snapshotto.../openclaw-data, but the rollback path being diagnosed restores from a snapshotopenclawtree. This can mask symlink-specific failures and produce false negatives in the diagnostic signal.Align repro with real rollback path
- const base = "/tmp/diag-node"; - fs.mkdirSync(base + "/openclaw-data/workspace", { recursive: true }); - fs.writeFileSync(base + "/openclaw-data/openclaw.json", JSON.stringify({ test: true })); - fs.writeFileSync(base + "/openclaw-data/workspace/notes.md", "hello"); - fs.mkdirSync(base + "/openclaw", { recursive: true }); - fs.symlinkSync(base + "/openclaw-data/openclaw.json", base + "/openclaw/openclaw.json"); - fs.symlinkSync(base + "/openclaw-data/workspace", base + "/openclaw/workspace"); + const base = "/tmp/diag-node"; + const liveDir = base + "/home/.openclaw"; + const archiveDir = base + "/home/.openclaw.archived"; + const realData = base + "/real-data"; + const snapshot = base + "/snapshot/openclaw"; + + fs.mkdirSync(realData + "/workspace", { recursive: true }); + fs.writeFileSync(realData + "/openclaw.json", JSON.stringify({ test: true })); + fs.writeFileSync(realData + "/workspace/notes.md", "hello"); + + fs.mkdirSync(snapshot, { recursive: true }); + fs.symlinkSync(realData + "/openclaw.json", snapshot + "/openclaw.json"); + fs.symlinkSync(realData + "/workspace", snapshot + "/workspace"); + + fs.mkdirSync(liveDir, { recursive: true }); + fs.writeFileSync(liveDir + "/stale.txt", "old"); @@ - fs.renameSync(base + "/openclaw", base + "/openclaw.archived"); + fs.renameSync(liveDir, archiveDir); @@ - const snapshot = base + "/openclaw-data"; try { - fs.cpSync(snapshot, base + "/openclaw", { recursive: true }); + fs.cpSync(snapshot, liveDir, { recursive: true }); console.log("PASS: cpSync succeeded"); - const files = fs.readdirSync(base + "/openclaw"); + const files = fs.readdirSync(liveDir);🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/pr-self-hosted.yaml around lines 173 - 208, The repro sets snapshot to base + "/openclaw-data" but the real rollback restores from the snapshot tree at base + "/openclaw"; update the snapshot variable (and the subsequent fs.cpSync call that uses it) to point to base + "/openclaw" so the cpSync in the Node script copies the same snapshot tree the real rollback uses (preserving symlink-related behavior and avoiding false negatives).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/pr-self-hosted.yaml:
- Around line 121-123: The docker info filtering command can cause the job to
fail when grep finds no matches; update the pipeline so the grep non-match is
non-fatal by appending a fallback (e.g., make the command 'docker info 2>&1 |
grep -E "Storage Driver|Server Version|Operating System|Kernel
Version|Cgroup|Runtime" || true') or temporarily disable errexit around that
command, ensuring subsequent diagnostics and E2E comparison still run; modify
the invocation of 'docker info ... | grep -E ...' accordingly.
---
Duplicate comments:
In @.github/workflows/pr-self-hosted.yaml:
- Around line 173-208: The repro sets snapshot to base + "/openclaw-data" but
the real rollback restores from the snapshot tree at base + "/openclaw"; update
the snapshot variable (and the subsequent fs.cpSync call that uses it) to point
to base + "/openclaw" so the cpSync in the Node script copies the same snapshot
tree the real rollback uses (preserving symlink-related behavior and avoiding
false negatives).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: e7576003-a988-4433-ab16-d004fbcfca8f
📒 Files selected for processing (1)
.github/workflows/pr-self-hosted.yaml
There was a problem hiding this comment.
♻️ Duplicate comments (2)
.github/workflows/pr-self-hosted.yaml (2)
199-208:⚠️ Potential issue | 🟠 MajorThe Node.js repro copies the wrong source tree.
The diagnostic copies from
openclaw-data(containing regular files), butrollbackFromSnapshot()insnapshot.tscopies fromsnapshotDir/openclawwhich preserves symlinks. If the failure is triggered specifically when copying symlink entries, this test may produce a false negative.To match the actual rollback code path, copy the symlinked tree:
Suggested adjustment
- const snapshot = base + "/openclaw-data"; + const snapshot = base + "/openclaw.archived"; try { fs.cpSync(snapshot, base + "/openclaw", { recursive: true });This way
cpSynccopies from the renamed directory that contains the actual symlinks, mirroring whatrollbackFromSnapshot()does when restoring from a snapshot.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/pr-self-hosted.yaml around lines 199 - 208, The repro is copying from "openclaw-data" which contains regular files, but rollbackFromSnapshot() in snapshot.ts restores from snapshotDir/openclaw (the symlink-preserving tree); update the test to copy from the same symlinked source used by rollbackFromSnapshot() (use snapshot = base + "/openclaw" or otherwise point to snapshotDir/openclaw) so cpSync exercises symlink entries the same way the real rollback code does.
121-123:⚠️ Potential issue | 🟡 MinorMake Docker info filtering non-fatal to avoid losing later diagnostics.
The
grepcommand will exit with code 1 if no lines match, which can fail this step under Actions' defaultbash -ebehavior and skip subsequent diagnostics.Suggested fix
- docker info 2>&1 | grep -E "Storage Driver|Server Version|Operating System|Kernel Version|Cgroup|Runtime" + docker info 2>&1 | grep -E "Storage Driver|Server Version|Operating System|Kernel Version|Cgroup|Runtime" || true🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/pr-self-hosted.yaml around lines 121 - 123, The grep filter on the docker info line is currently fatal if nothing matches; update the pipeline so the grep failure cannot abort the step—locate the line containing the command "docker info 2>&1 | grep -E \"Storage Driver|Server Version|Operating System|Kernel Version|Cgroup|Runtime\"" and make it tolerant of no matches by either allowing a non-zero exit (for example using a shell OR-true fallback) or by temporarily disabling errexit for that command so subsequent diagnostics still run.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Duplicate comments:
In @.github/workflows/pr-self-hosted.yaml:
- Around line 199-208: The repro is copying from "openclaw-data" which contains
regular files, but rollbackFromSnapshot() in snapshot.ts restores from
snapshotDir/openclaw (the symlink-preserving tree); update the test to copy from
the same symlinked source used by rollbackFromSnapshot() (use snapshot = base +
"/openclaw" or otherwise point to snapshotDir/openclaw) so cpSync exercises
symlink entries the same way the real rollback code does.
- Around line 121-123: The grep filter on the docker info line is currently
fatal if nothing matches; update the pipeline so the grep failure cannot abort
the step—locate the line containing the command "docker info 2>&1 | grep -E
\"Storage Driver|Server Version|Operating System|Kernel
Version|Cgroup|Runtime\"" and make it tolerant of no matches by either allowing
a non-zero exit (for example using a shell OR-true fallback) or by temporarily
disabling errexit for that command so subsequent diagnostics still run.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 6d7ca443-ddea-400a-b5f5-d078df2b03ca
📒 Files selected for processing (1)
.github/workflows/pr-self-hosted.yaml
There was a problem hiding this comment.
♻️ Duplicate comments (2)
test/diag-container-fs.sh (1)
69-72:⚠️ Potential issue | 🟠 MajorUse the same cp source tree as real rollback to avoid false negatives.
Line 69 sets
snapshotto"/openclaw-data"(regular tree), but rollback copiessnapshotDir/openclaw(symlink-containing tree). This can hide the actual failure mode you’re diagnosing.Proposed fix
- const snapshot = base + "/openclaw-data"; + // Mirror rollbackFromSnapshot(): source is snapshotDir/openclaw + const snapshot = base + "/snapshot/openclaw"; + fs.mkdirSync(base + "/snapshot", { recursive: true }); + fs.cpSync(base + "/openclaw", snapshot, { recursive: true }); try { fs.cpSync(snapshot, base + "/openclaw", { recursive: true });🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@test/diag-container-fs.sh` around lines 69 - 72, The test uses the wrong source tree for the copy: change the snapshot variable assignment so it points to the same symlink-containing tree used by rollback (the snapshotDir/openclaw tree) instead of base + "/openclaw-data"; update the snapshot definition (the snapshot variable near base) so the subsequent fs.cpSync(snapshot, base + "/openclaw", { recursive: true }) exercises the same symlinks as the real rollback path..github/workflows/pr-self-hosted.yaml (1)
121-123:⚠️ Potential issue | 🟡 MinorMake the
docker infogrep non-fatal to preserve downstream diagnostics.Line 122 can terminate this step on pattern mismatch, which skips later diagnostics on that runner.
Proposed fix
- docker info 2>&1 | grep -E "Storage Driver|Server Version|Operating System|Kernel Version|Cgroup|Runtime" + docker info 2>&1 | grep -E "Storage Driver|Server Version|Operating System|Kernel Version|Cgroup|Runtime" || true🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/pr-self-hosted.yaml around lines 121 - 123, The docker inspection step uses `docker info` piped to `grep -E` and can cause the job to fail if the patterns don't match; make that pipeline non-fatal so downstream diagnostics still run by altering the `docker info | grep -E "Storage Driver|Server Version|Operating System|Kernel Version|Cgroup|Runtime"` invocation to tolerate no matches (e.g., use a shell fallback such as appending a true-returning fallback like "|| true" or temporarily disabling pipefail/set -e around that command) while preserving the command's printed output.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Duplicate comments:
In @.github/workflows/pr-self-hosted.yaml:
- Around line 121-123: The docker inspection step uses `docker info` piped to
`grep -E` and can cause the job to fail if the patterns don't match; make that
pipeline non-fatal so downstream diagnostics still run by altering the `docker
info | grep -E "Storage Driver|Server Version|Operating System|Kernel
Version|Cgroup|Runtime"` invocation to tolerate no matches (e.g., use a shell
fallback such as appending a true-returning fallback like "|| true" or
temporarily disabling pipefail/set -e around that command) while preserving the
command's printed output.
In `@test/diag-container-fs.sh`:
- Around line 69-72: The test uses the wrong source tree for the copy: change
the snapshot variable assignment so it points to the same symlink-containing
tree used by rollback (the snapshotDir/openclaw tree) instead of base +
"/openclaw-data"; update the snapshot definition (the snapshot variable near
base) so the subsequent fs.cpSync(snapshot, base + "/openclaw", { recursive:
true }) exercises the same symlinks as the real rollback path.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: b7735d2e-78c8-4056-bdef-c9b6877d2995
📒 Files selected for processing (2)
.github/workflows/pr-self-hosted.yamltest/diag-container-fs.sh
There was a problem hiding this comment.
♻️ Duplicate comments (2)
.github/workflows/pr-self-hosted.yaml (2)
121-123:⚠️ Potential issue | 🟡 MinorDon't let
grepabort the rest of the diagnostics.If
docker infoprints none of those fields,grepexits 1 and the defaultbash -eshell stops this matrix leg before the container repro and E2E comparison run.Suggested hardening
- docker info 2>&1 | grep -E "Storage Driver|Server Version|Operating System|Kernel Version|Cgroup|Runtime" + docker info 2>&1 | grep -E "Storage Driver|Server Version|Operating System|Kernel Version|Cgroup|Runtime" || true🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/pr-self-hosted.yaml around lines 121 - 123, The diagnostics step uses `docker info | grep -E ...` which can return exit code 1 and abort the job under bash -e; change the pipeline so a missing match does not cause failure — for example, ensure the `docker info`/`grep` invocation (the line that runs docker info and pipes to grep) is made safe by appending a no-fail fallback (e.g., using `|| true`) or by disabling `set -e` around that command; update the command that runs `docker info 2>&1 | grep -E "Storage Driver|Server Version|Operating System|Kernel Version|Cgroup|Runtime"` so it never returns non-zero when there are no matches.
134-139:⚠️ Potential issue | 🟠 MajorThis job is still invoking a false-negative rollback repro.
The script mounted here (
test/diag-container-fs.sh:46-107) renames the symlinkedopenclawtree, but then copies backopenclaw-data, which contains regular files/directories. The real rollback path copiessnapshotDir/openclaw, so this matrix is not exercising the samefs.cpSyncsource tree and can miss the symlink-copy failure you're trying to diagnose.Adjustment to make the repro match the production path
- const base = "/tmp/diag-node"; - fs.mkdirSync(base + "/openclaw-data/workspace", { recursive: true }); - fs.writeFileSync(base + "/openclaw-data/openclaw.json", JSON.stringify({ test: true })); - fs.writeFileSync(base + "/openclaw-data/workspace/notes.md", "hello"); - fs.mkdirSync(base + "/openclaw", { recursive: true }); - fs.symlinkSync(base + "/openclaw-data/openclaw.json", base + "/openclaw/openclaw.json"); - fs.symlinkSync(base + "/openclaw-data/workspace", base + "/openclaw/workspace"); + const base = "/tmp/diag-node"; + const liveDir = base + "/home/.openclaw"; + const archiveDir = base + "/home/.openclaw.archived"; + const realData = base + "/real-data"; + const snapshot = base + "/snapshot/openclaw"; + + fs.mkdirSync(realData + "/workspace", { recursive: true }); + fs.writeFileSync(realData + "/openclaw.json", JSON.stringify({ test: true })); + fs.writeFileSync(realData + "/workspace/notes.md", "hello"); + + fs.mkdirSync(snapshot, { recursive: true }); + fs.symlinkSync(realData + "/openclaw.json", snapshot + "/openclaw.json"); + fs.symlinkSync(realData + "/workspace", snapshot + "/workspace"); + + fs.mkdirSync(liveDir, { recursive: true }); - fs.renameSync(base + "/openclaw", base + "/openclaw.archived"); + fs.renameSync(liveDir, archiveDir); - const snapshot = base + "/openclaw-data"; - fs.cpSync(snapshot, base + "/openclaw", { recursive: true }); + fs.cpSync(snapshot, liveDir, { recursive: true });🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/pr-self-hosted.yaml around lines 134 - 139, The workflow mounts and runs test/diag-container-fs.sh but that script renames the symlinked openclaw tree and then copies back openclaw-data (regular files), so the repro diverges from the real rollback which copies snapshotDir/openclaw; update the job or the script so the container exercise matches production: change the mounted script invocation or edit test/diag-container-fs.sh (around the rename/copy section) to perform the same copy source used in rollback (snapshotDir/openclaw) instead of openclaw-data, ensuring the fs.cpSync-like path that handles symlinks is exercised and the symlink-copy failure can be reproduced.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Duplicate comments:
In @.github/workflows/pr-self-hosted.yaml:
- Around line 121-123: The diagnostics step uses `docker info | grep -E ...`
which can return exit code 1 and abort the job under bash -e; change the
pipeline so a missing match does not cause failure — for example, ensure the
`docker info`/`grep` invocation (the line that runs docker info and pipes to
grep) is made safe by appending a no-fail fallback (e.g., using `|| true`) or by
disabling `set -e` around that command; update the command that runs `docker
info 2>&1 | grep -E "Storage Driver|Server Version|Operating System|Kernel
Version|Cgroup|Runtime"` so it never returns non-zero when there are no matches.
- Around line 134-139: The workflow mounts and runs test/diag-container-fs.sh
but that script renames the symlinked openclaw tree and then copies back
openclaw-data (regular files), so the repro diverges from the real rollback
which copies snapshotDir/openclaw; update the job or the script so the container
exercise matches production: change the mounted script invocation or edit
test/diag-container-fs.sh (around the rename/copy section) to perform the same
copy source used in rollback (snapshotDir/openclaw) instead of openclaw-data,
ensuring the fs.cpSync-like path that handles symlinks is exercised and the
symlink-copy failure can be reproduced.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: c0049c6e-8570-4ad8-8bf2-bcf3a506adaa
📒 Files selected for processing (1)
.github/workflows/pr-self-hosted.yaml
6c4f484 to
9549040
Compare
Add a diagnose-snapshot-rollback matrix job that runs in parallel on linux-amd64-cpu4, cpu8, cpu16, and ubuntu-latest. It collects: - Host kernel, Docker storage driver, and filesystem info - Container-internal mount table and filesystem types - Symlink rename/copy behavior (shell and Node.js) - The full E2E test suite (continue-on-error for diagnosis) This will identify why rollbackFromSnapshot() fails on NVIDIA self-hosted runners but passes on GitHub-hosted ubuntu-latest. The root cause is suspected to be a Docker storage driver or overlayfs behavior difference affecting renameSync/cpSync on symlink directories. Temporary diagnostic — will be removed once root cause is fixed. Signed-off-by: Julie Yaunches <[email protected]>
…ine) The inline bash -c '...' with embedded Node.js caused 'cannot execute binary file' on all runners. Switch to writing the diagnostic script to a temp file and mounting it into the container. Signed-off-by: Julie Yaunches <[email protected]>
The heredoc approach failed because YAML indentation added leading spaces to the script content, breaking the shebang. Move the diagnostic script to test/diag-container-fs.sh and mount it into the container as a read-only volume. Signed-off-by: Julie Yaunches <[email protected]>
…/bash) The test sandbox image has ENTRYPOINT ["/bin/bash"], so running 'docker run ... bash /tmp/script.sh' becomes '/bin/bash bash /tmp/script.sh' which tries to execute the bash binary as a script. Drop the explicit bash arg so it becomes '/bin/bash /tmp/diag-container-fs.sh'. Signed-off-by: Julie Yaunches <[email protected]>
The isolated /tmp symlink test passes everywhere but the real E2E rollback fails on NVIDIA runners. Add Test 4 that replicates the exact E2E flow — createSnapshot + manual renameSync/cpSync on the actual $HOME/.openclaw directory with full error stack capture. This will show the exact syscall, error code, and path that fails. Signed-off-by: Julie Yaunches <[email protected]>
NVIDIA self-hosted runners use Docker with the containerd overlayfs snapshotter, which places directories on different overlay layers. rename(2) returns EXDEV when source and dest span layers, breaking rollbackFromSnapshot() and cutoverHost(). Add moveSync() helper that tries renameSync first (fast same-device path), then falls back to cpSync + rmSync on EXDEV. This also fixes the secondary ERR_FS_CP_EINVAL error — since the rename now succeeds, .openclaw is fully removed before cpSync restores from the snapshot. Both functions (cutoverHost, rollbackFromSnapshot) now use moveSync instead of bare renameSync. Root cause diagnosed via PR #2374 diagnostic matrix: - NVIDIA runners: overlayfs (containerd snapshotter v1) → EXDEV - GitHub runners: overlay2 (legacy Docker) → rename works Signed-off-by: Julie Yaunches <[email protected]>
Now that the EXDEV cross-device rename is fixed in snapshot.ts, move test-e2e-sandbox back to linux-amd64-cpu4 (NVIDIA self-hosted). Remove the diagnose-snapshot-rollback matrix job and the test/diag-container-fs.sh diagnostic script — root cause identified and fix verified on all runner types. All three E2E jobs now run on NVIDIA self-hosted runners: - build-sandbox-images: linux-amd64-cpu4 - test-e2e-sandbox: linux-amd64-cpu4 - test-e2e-gateway-isolation: linux-amd64-cpu4 Signed-off-by: Julie Yaunches <[email protected]>
Signed-off-by: Julie Yaunches <[email protected]>
4fc8bdb to
cf7d05a
Compare
…ners (#2397) ## Summary Remove duplicate sandbox image builds and E2E tests from `pr.yaml`. These jobs now run exclusively on NVIDIA self-hosted runners via `pr-self-hosted.yaml`, which was enabled in #2374. ## Before (duplicate work on every PR) | Job | `pr.yaml` (GitHub-hosted) | `pr-self-hosted.yaml` (NVIDIA) | |-----|--------------------------|-------------------------------| | build-sandbox-images | ✅ `ubuntu-latest` ~6m | ✅ `linux-amd64-cpu4` ~3m | | build-sandbox-images-arm64 | ✅ `ubuntu-24.04-arm` ~2m | ❌ missing | | test-e2e-sandbox | ✅ `ubuntu-latest` ~1m | ✅ `linux-amd64-cpu4` ~1m | | test-e2e-gateway-isolation | ✅ `ubuntu-latest` ~1m | ✅ `linux-amd64-cpu4` ~1m | | test-e2e-port-overrides | ✅ `ubuntu-latest` ~1m | ❌ missing | **Total: ~12m GitHub-hosted + ~5m NVIDIA = ~17m of compute per PR** ## After (single run on NVIDIA runners) | Job | `pr.yaml` (GitHub-hosted) | `pr-self-hosted.yaml` (NVIDIA) | |-----|--------------------------|-------------------------------| | build-sandbox-images | ❌ removed | ✅ `linux-amd64-cpu4` ~3m | | build-sandbox-images-arm64 | ❌ removed | ✅ `linux-arm64-cpu4` (new) | | test-e2e-sandbox | ❌ removed | ✅ `linux-amd64-cpu4` ~1m | | test-e2e-gateway-isolation | ❌ removed | ✅ `linux-amd64-cpu4` ~1m | | test-e2e-port-overrides | ❌ removed | ✅ `linux-amd64-cpu4` (new) | **Total: ~6m on NVIDIA runners only — 65% less total compute** ## Performance: build-sandbox-images Measured across recent PRs: | Runner | Avg duration | Samples | |--------|-------------|---------| | GitHub `ubuntu-latest` | **362s** (~6m) | PR 2147: 371s, PR 2328: 373s, PR 2366: 353s | | NVIDIA `linux-amd64-cpu4` | **187s** (~3m) | PR 2147: 190s, PR 2393: 176s, PR 2328: 187s, PR 2366: 198s, PR 2113: 180s | | **Improvement** | **48% faster** | | ## Changes ### `.github/workflows/pr.yaml` - Remove `sandbox-images-and-e2e` reusable workflow call (was running on GitHub-hosted runners) - Keep: `changes`, `checks`, `test-e2e-ollama-proxy` (lightweight, GitHub-hosted) ### `.github/workflows/pr-self-hosted.yaml` - Add `build-sandbox-images-arm64` on `linux-arm64-cpu4` - Add `test-e2e-port-overrides` on `linux-amd64-cpu4` ### Not deleted - `sandbox-images-and-e2e.yaml` reusable workflow — still used by `main.yaml` (post-merge CI) ## Type of Change - [x] Code change (feature, bug fix, or refactor) ## AI Disclosure - [x] AI-assisted — tool: Claude Code (pi agent) --- Signed-off-by: Julie Yaunches <[email protected]> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Reorganized CI/CD pipeline to improve build and test management. * Added support for arm64 Docker image builds. * Enhanced E2E testing coverage with port override test execution. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Signed-off-by: Julie Yaunches <[email protected]>
) ## Summary Fix snapshot rollback failure on NVIDIA self-hosted runners and move all E2E jobs back to self-hosted. ## Root Cause NVIDIA self-hosted runners use Docker with the **containerd overlayfs snapshotter** (`io.containerd.snapshotter.v1`), while GitHub-hosted runners use the legacy **`overlay2`** driver. On the containerd snapshotter, directories can span different overlay layers, causing `rename(2)` to return **`EXDEV` (cross-device link not permitted)**. `rollbackFromSnapshot()` and `cutoverHost()` in `snapshot.ts` both used bare `renameSync()` which fails with EXDEV on these runners. The bare `catch {}` swallowed the error and returned `false`, producing the "Rollback returned false" failure with no diagnostic output. This also caused a secondary **`ERR_FS_CP_EINVAL`** — since the rename failed, `.openclaw` still existed when `cpSync` ran, and it detected it would be copying symlink targets into themselves. ## Diagnostic Evidence Confirmed via a matrix job across 4 runners: | Runner | Storage Driver | `renameSync` | `cpSync` | |--------|---------------|-------------|---------| | `linux-amd64-cpu4` | `overlayfs` (containerd) | ❌ EXDEV | ❌ ERR_FS_CP_EINVAL | | `linux-amd64-cpu8` | `overlayfs` (containerd) | ❌ EXDEV | ❌ ERR_FS_CP_EINVAL | | `linux-amd64-cpu16` | `overlayfs` (containerd) | ❌ EXDEV | ❌ ERR_FS_CP_EINVAL | | `ubuntu-latest` | `overlay2` (legacy) | ✅ | ✅ | ## Fix Add `moveSync()` helper that tries `renameSync` first (fast same-device path), then falls back to `cpSync` + `rmSync` on EXDEV. Both `cutoverHost()` and `rollbackFromSnapshot()` now use `moveSync()` instead of bare `renameSync()`. After the fix, all runners pass: | Runner | Before | After | |--------|--------|-------| | `linux-amd64-cpu4` | ❌ Rollback returned false | ✅ PASS | | `linux-amd64-cpu8` | ❌ Rollback returned false | ✅ PASS | | `linux-amd64-cpu16` | ❌ Rollback returned false | ✅ PASS | | `ubuntu-latest` | ✅ PASS | ✅ PASS | ## Changes ### `nemoclaw/src/blueprint/snapshot.ts` - Add `moveSync()` — cross-device-safe move with EXDEV fallback - `cutoverHost()` — use `moveSync` instead of `renameSync` - `rollbackFromSnapshot()` — use `moveSync` instead of `renameSync` (both the archive step and the recovery path) ### `nemoclaw/src/blueprint/snapshot.test.ts` - Add `moveSync` unit tests: same-device rename, EXDEV fallback (cpSync + rmSync), non-EXDEV re-throw - Add `rmSync` to the in-memory fs mock ### `.github/workflows/pr-self-hosted.yaml` - Move `test-e2e-sandbox` back to `linux-amd64-cpu4` (was on `ubuntu-latest` as a workaround since PR NVIDIA#2294) - Remove temporary diagnostic matrix job and `test/diag-container-fs.sh` ## Follow-up - [ ] Phase 4: Remove duplicate `sandbox-images-and-e2e` from `pr.yaml` (separate PR) ## Type of Change - [x] Code change (feature, bug fix, or refactor) ## Verification - [x] `moveSync` unit tests pass (22/22 snapshot tests green) - [x] `test-e2e-sandbox` passes on `linux-amd64-cpu4` (NVIDIA self-hosted) - [x] `test-e2e-gateway-isolation` passes on `linux-amd64-cpu4` - [x] All jobs pass on `ubuntu-latest` (no regression) - [x] No secrets, API keys, or credentials committed ## AI Disclosure - [x] AI-assisted — tool: Claude Code (pi agent) --- Signed-off-by: Julie Yaunches <[email protected]> --------- Signed-off-by: Julie Yaunches <[email protected]>
…ners (NVIDIA#2397) ## Summary Remove duplicate sandbox image builds and E2E tests from `pr.yaml`. These jobs now run exclusively on NVIDIA self-hosted runners via `pr-self-hosted.yaml`, which was enabled in NVIDIA#2374. ## Before (duplicate work on every PR) | Job | `pr.yaml` (GitHub-hosted) | `pr-self-hosted.yaml` (NVIDIA) | |-----|--------------------------|-------------------------------| | build-sandbox-images | ✅ `ubuntu-latest` ~6m | ✅ `linux-amd64-cpu4` ~3m | | build-sandbox-images-arm64 | ✅ `ubuntu-24.04-arm` ~2m | ❌ missing | | test-e2e-sandbox | ✅ `ubuntu-latest` ~1m | ✅ `linux-amd64-cpu4` ~1m | | test-e2e-gateway-isolation | ✅ `ubuntu-latest` ~1m | ✅ `linux-amd64-cpu4` ~1m | | test-e2e-port-overrides | ✅ `ubuntu-latest` ~1m | ❌ missing | **Total: ~12m GitHub-hosted + ~5m NVIDIA = ~17m of compute per PR** ## After (single run on NVIDIA runners) | Job | `pr.yaml` (GitHub-hosted) | `pr-self-hosted.yaml` (NVIDIA) | |-----|--------------------------|-------------------------------| | build-sandbox-images | ❌ removed | ✅ `linux-amd64-cpu4` ~3m | | build-sandbox-images-arm64 | ❌ removed | ✅ `linux-arm64-cpu4` (new) | | test-e2e-sandbox | ❌ removed | ✅ `linux-amd64-cpu4` ~1m | | test-e2e-gateway-isolation | ❌ removed | ✅ `linux-amd64-cpu4` ~1m | | test-e2e-port-overrides | ❌ removed | ✅ `linux-amd64-cpu4` (new) | **Total: ~6m on NVIDIA runners only — 65% less total compute** ## Performance: build-sandbox-images Measured across recent PRs: | Runner | Avg duration | Samples | |--------|-------------|---------| | GitHub `ubuntu-latest` | **362s** (~6m) | PR 2147: 371s, PR 2328: 373s, PR 2366: 353s | | NVIDIA `linux-amd64-cpu4` | **187s** (~3m) | PR 2147: 190s, PR 2393: 176s, PR 2328: 187s, PR 2366: 198s, PR 2113: 180s | | **Improvement** | **48% faster** | | ## Changes ### `.github/workflows/pr.yaml` - Remove `sandbox-images-and-e2e` reusable workflow call (was running on GitHub-hosted runners) - Keep: `changes`, `checks`, `test-e2e-ollama-proxy` (lightweight, GitHub-hosted) ### `.github/workflows/pr-self-hosted.yaml` - Add `build-sandbox-images-arm64` on `linux-arm64-cpu4` - Add `test-e2e-port-overrides` on `linux-amd64-cpu4` ### Not deleted - `sandbox-images-and-e2e.yaml` reusable workflow — still used by `main.yaml` (post-merge CI) ## Type of Change - [x] Code change (feature, bug fix, or refactor) ## AI Disclosure - [x] AI-assisted — tool: Claude Code (pi agent) --- Signed-off-by: Julie Yaunches <[email protected]> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Reorganized CI/CD pipeline to improve build and test management. * Added support for arm64 Docker image builds. * Enhanced E2E testing coverage with port override test execution. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Signed-off-by: Julie Yaunches <[email protected]>
Summary
Fix snapshot rollback failure on NVIDIA self-hosted runners and move all E2E jobs back to self-hosted.
Root Cause
NVIDIA self-hosted runners use Docker with the containerd overlayfs snapshotter (
io.containerd.snapshotter.v1), while GitHub-hosted runners use the legacyoverlay2driver. On the containerd snapshotter, directories can span different overlay layers, causingrename(2)to returnEXDEV(cross-device link not permitted).rollbackFromSnapshot()andcutoverHost()insnapshot.tsboth used barerenameSync()which fails with EXDEV on these runners. The barecatch {}swallowed the error and returnedfalse, producing the "Rollback returned false" failure with no diagnostic output.This also caused a secondary
ERR_FS_CP_EINVAL— since the rename failed,.openclawstill existed whencpSyncran, and it detected it would be copying symlink targets into themselves.Diagnostic Evidence
Confirmed via a matrix job across 4 runners:
renameSynccpSynclinux-amd64-cpu4overlayfs(containerd)linux-amd64-cpu8overlayfs(containerd)linux-amd64-cpu16overlayfs(containerd)ubuntu-latestoverlay2(legacy)Fix
Add
moveSync()helper that triesrenameSyncfirst (fast same-device path), then falls back tocpSync+rmSyncon EXDEV. BothcutoverHost()androllbackFromSnapshot()now usemoveSync()instead of barerenameSync().After the fix, all runners pass:
linux-amd64-cpu4linux-amd64-cpu8linux-amd64-cpu16ubuntu-latestChanges
nemoclaw/src/blueprint/snapshot.tsmoveSync()— cross-device-safe move with EXDEV fallbackcutoverHost()— usemoveSyncinstead ofrenameSyncrollbackFromSnapshot()— usemoveSyncinstead ofrenameSync(both the archive step and the recovery path)nemoclaw/src/blueprint/snapshot.test.tsmoveSyncunit tests: same-device rename, EXDEV fallback (cpSync + rmSync), non-EXDEV re-throwrmSyncto the in-memory fs mock.github/workflows/pr-self-hosted.yamltest-e2e-sandboxback tolinux-amd64-cpu4(was onubuntu-latestas a workaround since PR fix(ci): switch test-e2e-sandbox to ubuntu-latest on self-hosted workflow #2294)test/diag-container-fs.shFollow-up
sandbox-images-and-e2efrompr.yaml(separate PR)Type of Change
Verification
moveSyncunit tests pass (22/22 snapshot tests green)test-e2e-sandboxpasses onlinux-amd64-cpu4(NVIDIA self-hosted)test-e2e-gateway-isolationpasses onlinux-amd64-cpu4ubuntu-latest(no regression)AI Disclosure
Signed-off-by: Julie Yaunches [email protected]