fix(test): skip TC-SBX-06 on runners with < 4 vCPUs#1919
fix(test): skip TC-SBX-06 on runners with < 4 vCPUs#1919TruongNguyenG wants to merge 2 commits intoNVIDIA:mainfrom
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughThe end-to-end test script was modified to detect runner vCPU count and only execute Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
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 `@test/e2e/test-sandbox-operations.sh`:
- Around line 684-690: vCPU detection currently uses nproc with a static
fallback of 2 causing false skips on platforms without nproc; update the logic
that sets the vcpus variable (used to decide calling
test_sbx_06_gateway_recovery vs skip and logged via log/skip) to detect cores
cross-platform by trying nproc, then getconf _NPROCESSORS_ONLN, then sysctl -n
hw.ncpu (macOS), and finally a minimal safe default only if all fail; ensure the
vcpus value is an integer before the comparison so TC-SBX-06 is not incorrectly
skipped on capable runners.
🪄 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: Pro Plus
Run ID: b127df12-b0f8-4dbe-8467-4df1f1cc9821
📒 Files selected for processing (1)
test/e2e/test-sandbox-operations.sh
TC-SBX-06 (gateway auto-recovery after docker kill) requires k3s to restart inside the gateway container. On ubuntu-latest (2 vCPU, 7GB RAM) this consistently times out (exit 124), while it passes in ~70s on machines with ≥4 cores. Gate the call on nproc so the test auto-enables on stronger runners and skips gracefully on weak ones. The function is preserved for when a suitable runner is available. See: NVIDIA#1909 Made-with: Cursor
92f0cb1 to
7b306d4
Compare
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
Made-with: Cursor
Summary
Gate TC-SBX-06 (gateway auto-recovery after
docker kill) on CPU count so it skips gracefully on weak runners (ubuntu-latest, 2 vCPU) and auto-enables on stronger ones (≥4 cores). The function is preserved, not removed.Related Issue
Fixes #1909
Changes
test_sbx_06_gateway_recoverycall onnproc ≥ 4in the Phase 3 section oftest-sandbox-operations.shType of Change
Verification
npx prek run --all-filespassesnpm testpassesmake docsbuilds without warnings (doc changes only)AI Disclosure
Signed-off-by: Truong Nguyen tgnguyen@nvidia.com
Summary by CodeRabbit