[None][fix] Pipe stderr separately in subprocess calls to improve error reporting in Allure (#14750)#14750
[None][fix] Pipe stderr separately in subprocess calls to improve error reporting in Allure (#14750)#14750yufeiwu-nv wants to merge 1 commit into
Conversation
…or reporting in Allure (NVIDIA#14750) Signed-off-by: yufeiwu-nv <230315618+yufeiwu-nv@users.noreply.github.com>
📝 WalkthroughWalkthroughThis PR adds explicit stderr piping to subprocess invocations in two perf test utility classes. The ChangesStderr piping in perf test command runners
Estimated code review effort🎯 2 (Simple) | ⏱️ ~5 minutes 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
tests/integration/defs/perf/utils.py (1)
281-283: ⚡ Quick winCoverage follow-up needed for stderr-forwarding paths.
Coverage status: needs follow-up outside PR for
tests/integration/defs/perf/utils.py.
Please add regression tests covering bothPerfBenchScriptTestCmds.run_cmdandPerfServeScriptTestCmds.run_cmdfailure paths to assertCalledProcessError.stderris populated and reported when a prepare-dataset subcommand fails. Suggested test file(s):tests/integration/defs/perf/test_utils.py(or equivalent existing perf utils test module).As per coding guidelines, for files under
tests/**, review must provide actionable coverage feedback with concrete file names and sufficiency status.Also applies to: 425-427
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@tests/integration/defs/perf/utils.py` around lines 281 - 283, Add regression tests that exercise the stderr-forwarding failure paths of PerfBenchScriptTestCmds.run_cmd and PerfServeScriptTestCmds.run_cmd by invoking a prepare-dataset subcommand stub that fails and raises subprocess.CalledProcessError; assert that the exception's stderr is populated and that the test harness/reporting surface (e.g., captured Allure output or returned error string) contains that stderr. Create the tests in tests/integration/defs/perf/test_utils.py (or the existing perf utils test module), mock or run a controlled failing command, catch CalledProcessError, and assert CalledProcessError.stderr is not None and its contents are forwarded/reported by the code paths in run_cmd.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@tests/integration/defs/perf/utils.py`:
- Around line 281-283: Add regression tests that exercise the stderr-forwarding
failure paths of PerfBenchScriptTestCmds.run_cmd and
PerfServeScriptTestCmds.run_cmd by invoking a prepare-dataset subcommand stub
that fails and raises subprocess.CalledProcessError; assert that the exception's
stderr is populated and that the test harness/reporting surface (e.g., captured
Allure output or returned error string) contains that stderr. Create the tests
in tests/integration/defs/perf/test_utils.py (or the existing perf utils test
module), mock or run a controlled failing command, catch CalledProcessError, and
assert CalledProcessError.stderr is not None and its contents are
forwarded/reported by the code paths in run_cmd.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: d6e86260-684d-4f70-8c15-0615a565c676
📒 Files selected for processing (1)
tests/integration/defs/perf/utils.py
Signed-off-by: yufeiwu-nv 230315618+yufeiwu-nv@users.noreply.github.com
Summary by CodeRabbit
Description
Test Coverage
PR Checklist
Please review the following before submitting your PR:
PR description clearly explains what and why. If using CodeRabbit's summary, please make sure it makes sense.
PR Follows TRT-LLM CODING GUIDELINES to the best of your knowledge.
Test cases are provided for new code paths (see test instructions)
If PR introduces API changes, an appropriate PR label is added - either
api-compatibleorapi-breaking. Forapi-breaking, includeBREAKINGin the PR title.Any new dependencies have been scanned for license and vulnerabilities
CODEOWNERS updated if ownership changes
Documentation updated as needed
Update tava architecture diagram if there is a significant design change in PR.
The reviewers assigned automatically/manually are appropriate for the PR.
Please check this after reviewing the above items as appropriate for this PR.
GitHub Bot Help
To see a list of available CI bot commands, please comment
/bot help.