[https://nvbugs/6153638][fix] unwaive tests for testing the flaky issue#14284
Conversation
|
/bot run --disable-fail-fast |
📝 WalkthroughWalkthroughThis PR updates test waivers to reflect current test status and enhances the RemoteOpenAIServer test utility to capture subprocess output into temporary log files. Server startup failures now include captured logs in error messages for improved debugging visibility. ChangesTest waiver list update
OpenAI server logging and error reporting
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Suggested reviewers
🚥 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/unittest/llmapi/apps/openai_server.py (1)
87-103: 💤 Low valueConsider more specific exception handling.
The broad
except Exceptionon line 102 is flagged by static analysis. While the defensive intent is clear (this is a diagnostic helper that should never fail), catchingOSErrorwould be more specific and still cover the file operations that could fail (open, seek, read).That said, the current approach is defensible for test utility code where the goal is to provide diagnostic output even if something unexpected happens.
♻️ More specific exception handling
- except Exception as e: # pragma: no cover - defensive + except OSError as e: # pragma: no cover - defensive return f"<failed to read {self.log_path}: {e}>"🤖 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/unittest/llmapi/apps/openai_server.py` around lines 87 - 103, The helper _read_captured_output should avoid a broad except; change the exception handling in that function to catch OSError (which covers open/seek/read file errors) instead of Exception, and return the same diagnostic string using self.log_path and the caught exception; if you want to remain extra-defensive you can add a second, very narrow fallback except Exception that returns the original "<failed to read ...>" message, but prefer OSError as the primary handler.
🤖 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/unittest/llmapi/apps/openai_server.py`:
- Around line 87-103: The helper _read_captured_output should avoid a broad
except; change the exception handling in that function to catch OSError (which
covers open/seek/read file errors) instead of Exception, and return the same
diagnostic string using self.log_path and the caught exception; if you want to
remain extra-defensive you can add a second, very narrow fallback except
Exception that returns the original "<failed to read ...>" message, but prefer
OSError as the primary handler.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 8ee5973e-5f82-4761-9ac8-154cdd01496f
📒 Files selected for processing (2)
tests/integration/test_lists/waives.txttests/unittest/llmapi/apps/openai_server.py
💤 Files with no reviewable changes (1)
- tests/integration/test_lists/waives.txt
|
PR_Github #49066 [ run ] triggered by Bot. Commit: |
|
PR_Github #49066 [ run ] completed with state |
2b3dfd2 to
32b07ce
Compare
|
/bot run --disable-fail-fast |
|
PR_Github #49395 [ run ] triggered by Bot. Commit: |
|
PR_Github #49395 [ run ] completed with state |
Remove the SKIP entries for test_openai_lora, test_openai_tool_call, and test_trtllm_serve_lora_example from waives.txt. The next CI run will tell us whether they still flake on A10. Signed-off-by: JunyiXu-nv <219237550+JunyiXu-nv@users.noreply.github.com>
32b07ce to
5035097
Compare
|
/bot run --disable-fail-fast |
|
PR_Github #49606 [ run ] triggered by Bot. Commit: |
|
PR_Github #49606 [ run ] completed with state |
…ue (NVIDIA#14284) Signed-off-by: JunyiXu-nv <219237550+JunyiXu-nv@users.noreply.github.com>
…ue (NVIDIA#14284) Signed-off-by: JunyiXu-nv <219237550+JunyiXu-nv@users.noreply.github.com>
…ue (NVIDIA#14284) Signed-off-by: JunyiXu-nv <219237550+JunyiXu-nv@users.noreply.github.com>
Unwaive the three tests from waives.txt so the next CI run either passes (good) or fails with a real traceback we can act on.
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.