[https://nvbugs/6112508][fix] WAR for popen in QA env in disagg_test_utils#13634
Conversation
…utils Under SWQA's pytest invocation (--capture=tee-sys) sys.stdout/sys.stderr are wrapped TextIOWrapper instances without a usable fileno(), so subprocess.Popen(stdout=sys.stdout, stderr=sys.stderr) raises io.UnsupportedOperation: fileno on the first worker spawn. Leaving stdout/stderr as None lets the child inherit the parent's real fds. Same workaround that PRs NVIDIA#10989 / NVIDIA#11214 applied to test_auto_scaling.py for nvbugs/5821433. The WAR was dropped when disagg_test_utils.py was created in PR NVIDIA#11242 by copying _run_worker / run_disagg_server from the sibling file in their pre-WAR shape; this restores it. Also drops the two waives added against this NVBug in waives.txt. Signed-off-by: Xiao Wang <24860335+xwang233@users.noreply.github.com>
📝 WalkthroughWalkthroughUpdates subprocess log/stream handling in disaggregated test utilities to leave child stdout/stderr as None instead of routing them through parent's sys.stdout/sys.stderr when log saving is disabled. Additionally, removes two previously waived disaggregated stress-test cases from the waive list. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 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)
Review rate limit: 9/10 reviews remaining, refill in 6 minutes. Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
tests/integration/defs/disaggregated/disagg_test_utils.py (1)
1-1:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winUpdate the SPDX copyright year.
This file is modified in 2026, but the header still stops at 2024. Please bump it to the latest meaningful modification year so the file stays compliant.
Suggested fix
-# SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-FileCopyrightText: Copyright (c) 2022-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@tests/integration/defs/disaggregated/disagg_test_utils.py` at line 1, Update the SPDX header year in the file's top comment: change the existing SPDX copyright line that ends with "2022-2024" to include the current modification year (e.g., "2022-2026") so the header reflects the file was modified in 2026; edit the SPDX comment string at the top of tests/integration/defs/disaggregated/disagg_test_utils.py accordingly.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In `@tests/integration/defs/disaggregated/disagg_test_utils.py`:
- Line 1: Update the SPDX header year in the file's top comment: change the
existing SPDX copyright line that ends with "2022-2024" to include the current
modification year (e.g., "2022-2026") so the header reflects the file was
modified in 2026; edit the SPDX comment string at the top of
tests/integration/defs/disaggregated/disagg_test_utils.py accordingly.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 6465e01c-7ca4-40de-ba85-1f6b084fbb3d
📒 Files selected for processing (2)
tests/integration/defs/disaggregated/disagg_test_utils.pytests/integration/test_lists/waives.txt
💤 Files with no reviewable changes (1)
- tests/integration/test_lists/waives.txt
|
/bot run --skip-test |
|
PR_Github #46278 [ run ] triggered by Bot. Commit: |
|
PR_Github #46278 [ run ] completed with state |
|
/bot run --disable-fail-fast |
|
PR_Github #46667 [ run ] triggered by Bot. Commit: |
|
PR_Github #46667 [ run ] completed with state |
…pen-war-disagg-test-utils Signed-off-by: Xiao Wang <xiaow@nvidia.com> Signed-off-by: Xiao Wang <24860335+xwang233@users.noreply.github.com> # Conflicts: # tests/integration/test_lists/waives.txt
|
/bot run --stage-list |
|
PR_Github #46735 Bot args parsing error: usage: /bot run [--reuse-test [optionalpipeline-id]] [--disable-fail-fast] |
|
/bot run --stage-list "" |
|
PR_Github #46737 [ run ] triggered by Bot. Commit: |
|
PR_Github #46737 [ run ] completed with state |
|
/bot reuse-pipeline |
|
PR_Github #46746 [ reuse-pipeline ] triggered by Bot. Commit: |
|
PR_Github #46746 [ reuse-pipeline ] completed with state |
Description
Restores a workaround that already exists in the sibling helper
test_auto_scaling.py(NVBug 5821433, PRs #10989 / #11214) but was dropped whendisagg_test_utils.pywas created in PR #11242 — the helpers were copied over in their pre-WAR shape.Under SWQA's pytest invocation (
--capture=tee-sys),sys.stdout/sys.stderrare wrappedTextIOWrappers without a usablefileno(), sosubprocess.Popen(stdout=sys.stdout, ...)raisesio.UnsupportedOperation: filenoon the first worker spawn. Fix: leavestdout/stderrasNoneso the child inherits the parent's real fds. Identical in shape to PR #11214.Also drops the two waives added against this NVBug in commit
4b39c38675so QA picks the test back up after merge.Test Coverage
QA-only failure (
pytest -slocally cannot reproduce). Validation path isLLM_FUNCTION_CLUSTER_TESTqa/llm_function_stress.txtonmain.Summary by CodeRabbit