Skip to content

[https://nvbugs/6153638][fix] unwaive tests for testing the flaky issue#14284

Merged
JunyiXu-nv merged 1 commit into
NVIDIA:mainfrom
JunyiXu-nv:user/junyix/fix-nvbug-6153638
May 21, 2026
Merged

[https://nvbugs/6153638][fix] unwaive tests for testing the flaky issue#14284
JunyiXu-nv merged 1 commit into
NVIDIA:mainfrom
JunyiXu-nv:user/junyix/fix-nvbug-6153638

Conversation

@JunyiXu-nv

@JunyiXu-nv JunyiXu-nv commented May 19, 2026

Copy link
Copy Markdown
Collaborator

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

  • Bug Fixes
    • Enhanced error reporting for OpenAI server startup failures by capturing and displaying diagnostic logs when the server encounters issues.

Review Change Stack

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-compatible or api-breaking. For api-breaking, include BREAKING in 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.

@JunyiXu-nv

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@coderabbitai

coderabbitai Bot commented May 19, 2026

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

This 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.

Changes

Test waiver list update

Layer / File(s) Summary
Test waiver updates
tests/integration/test_lists/waives.txt
Removed waivers for three OpenAI and TensorRT-LLM LoRA tests and added waivers for three newer tests (deepseek, ngram, and benchmark iteration log).

OpenAI server logging and error reporting

Layer / File(s) Summary
Output capture and log reading mechanism
tests/unittest/llmapi/apps/openai_server.py
Removed sys.stdout dependency. When no explicit log_path is provided, server subprocess output is now captured to a temporary file via _get_output(). New _read_captured_output() method reads and returns the tail of the captured log with defensive error handling.
Server startup error handling with captured logs
tests/unittest/llmapi/apps/openai_server.py
_wait_for_server() now reads captured server output and includes it in RuntimeError messages when the server process exits unexpectedly or startup times out. On timeout, the server is terminated before raising the exception with the log tail.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Suggested reviewers

  • pcastonguay
  • chzblych
  • zhenhuaw-me
🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ⚠️ Warning The PR description is incomplete. It lacks a proper PR title following the template, detailed problem explanation, test coverage information, and most checklist items are unchecked. Add a complete PR title in the required format, expand the description section with detailed explanation of the issue and solution, document test coverage, and review/check the PR checklist items as appropriate.
✅ Passed checks (3 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title accurately describes the main changes: fixing the issue (unwaiving tests) to capture and debug server logs.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
tests/unittest/llmapi/apps/openai_server.py (1)

87-103: 💤 Low value

Consider more specific exception handling.

The broad except Exception on line 102 is flagged by static analysis. While the defensive intent is clear (this is a diagnostic helper that should never fail), catching OSError would 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

📥 Commits

Reviewing files that changed from the base of the PR and between 89e1410 and a9e5136.

📒 Files selected for processing (2)
  • tests/integration/test_lists/waives.txt
  • tests/unittest/llmapi/apps/openai_server.py
💤 Files with no reviewable changes (1)
  • tests/integration/test_lists/waives.txt

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #49066 [ run ] triggered by Bot. Commit: a9e5136 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #49066 [ run ] completed with state SUCCESS. Commit: a9e5136
/LLM/main/L0_MergeRequest_PR pipeline #38795 completed with status: 'SUCCESS'

CI Report

Link to invocation

@JunyiXu-nv
JunyiXu-nv force-pushed the user/junyix/fix-nvbug-6153638 branch 2 times, most recently from 2b3dfd2 to 32b07ce Compare May 20, 2026 08:19
@JunyiXu-nv

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #49395 [ run ] triggered by Bot. Commit: 32b07ce Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #49395 [ run ] completed with state SUCCESS. Commit: 32b07ce
/LLM/main/L0_MergeRequest_PR pipeline #39045 completed with status: 'SUCCESS'

CI Report

Link to invocation

@JunyiXu-nv JunyiXu-nv changed the title [https://nvbugs/6153638][fix] capture trtllm-serve log on test fixture failure and unwaive [https://nvbugs/6153638][fix] unwaive tests for testing the flaky issue May 21, 2026
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>
@JunyiXu-nv
JunyiXu-nv force-pushed the user/junyix/fix-nvbug-6153638 branch from 32b07ce to 5035097 Compare May 21, 2026 06:03
@JunyiXu-nv

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #49606 [ run ] triggered by Bot. Commit: 5035097 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #49606 [ run ] completed with state SUCCESS. Commit: 5035097
/LLM/main/L0_MergeRequest_PR pipeline #39229 completed with status: 'SUCCESS'

CI Report

Link to invocation

@JunyiXu-nv
JunyiXu-nv requested a review from hyukn May 21, 2026 08:02
@JunyiXu-nv
JunyiXu-nv merged commit 285e104 into NVIDIA:main May 21, 2026
7 checks passed
xxi-nv pushed a commit to xxi-nv/TensorRT-LLM that referenced this pull request May 22, 2026
…ue (NVIDIA#14284)

Signed-off-by: JunyiXu-nv <219237550+JunyiXu-nv@users.noreply.github.com>
KleinBlueC pushed a commit to KleinBlueC/TensorRT-LLM that referenced this pull request May 26, 2026
…ue (NVIDIA#14284)

Signed-off-by: JunyiXu-nv <219237550+JunyiXu-nv@users.noreply.github.com>
bmarimuthu-nv pushed a commit to nv-auto-deploy/TensorRT-LLM that referenced this pull request May 28, 2026
…ue (NVIDIA#14284)

Signed-off-by: JunyiXu-nv <219237550+JunyiXu-nv@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants