Skip to content

test(fault_tolerance): skip flaky sglang migration NATS combo, drop stale graceful_shutdown xfail - #8404

Merged
dmitry-tokarev-nv merged 2 commits into
mainfrom
dtokarev/skip-flaky-migration-nats-test
Apr 21, 2026
Merged

dmitry-tokarev-nv merged 2 commits into
mainfrom
dtokarev/skip-flaky-migration-nats-test

Conversation

@dmitry-tokarev-nv

@dmitry-tokarev-nv dmitry-tokarev-nv commented Apr 20, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Two small, related changes to tests/fault_tolerance/migration/test_sglang.py to stop the post-merge sglang / Test cuda* (amd64) job from failing on main:

  • Skip the single flaky parameter combination test_request_migration_sglang_aggregated[migration_enabled-max_seq_len_disabled-worker_failure-chat-stream-nats]. It has failed on every amd64 post-merge run this cycle — e.g. runs 24685348314, 24683926404, 24683166462, 24680832233, 24680530215. The adjacent TCP variant is stable. Failure signature:

    AssertionError: Delay before response > 6 secs, got 13.050 secs
    tests/fault_tolerance/migration/utils.py:417 in validate_response
    

    Only the NATS transport is affected — first-token delay under migration lands around 13s where the 6s assertion trips.

  • Remove the xfail(reason="SGLang graceful shutdown not yet implemented") mark on the graceful_shutdown (immediate_kill=False) parameter. Every non-skipped graceful_shutdown[-chat-stream-*] combination (both nats and tcp, across all migration_limit × migration_max_seq_len values) has been XPASS in the same runs above, so the stated reason no longer holds.

The skip references a TODO(<LINEAR-ID>) placeholder — please swap in the real Linear ticket ID before merge. Last author on the file / the delay <= 6.0 assertion in utils.py:417 is @kthui, who should own the follow-up investigation.

Test plan

  • Post-merge sglang / Test cuda12.9 (amd64) passes with the skip in place
  • The previously-xfailed graceful_shutdown-chat-stream-{nats,tcp} combos run as regular passing cases (no XPASS, no XFAIL)
  • Swap <LINEAR-ID> placeholder for real Linear ticket ID before merge

🤖 Generated with Claude Code


Open in Devin Review

Summary by CodeRabbit

  • Tests
    • Re-enabled graceful shutdown test case previously marked as expected to fail.
    • Added conditional skip for specific parameter combinations experiencing timing-related flakiness to improve test stability.

…tale graceful_shutdown xfail

Skips the single parameter combination
test_request_migration_sglang_aggregated[migration_enabled-max_seq_len_disabled-worker_failure-chat-stream-nats]
which has failed on every amd64 post-merge run this cycle
(e.g. runs 24685348314, 24683926404, 24683166462, 24680832233,
24680530215). The TCP sibling is stable. Skip references a TODO
placeholder until the Linear ticket ID is filled in before merge.

Also removes the xfail mark on the graceful_shutdown parameter:
every non-skipped graceful_shutdown[-chat-stream-*] combination has
been XPASS for the last several post-merge runs, so the "SGLang
graceful shutdown not yet implemented" reason no longer holds.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Dmitry Tokarev <dtokarev@nvidia.com>
@dmitry-tokarev-nv
dmitry-tokarev-nv requested review from a team as code owners April 20, 2026 20:41
@github-actions github-actions Bot added the test label Apr 20, 2026
@coderabbitai

coderabbitai Bot commented Apr 20, 2026

Copy link
Copy Markdown
Contributor

Walkthrough

Test file updated to remove an xfail wrapper from a graceful shutdown test parameter case and add a runtime conditional skip for a specific combination of test parameters related to flaky first-token delay behavior.

Changes

Cohort / File(s) Summary
Test Parameter Updates
tests/fault_tolerance/migration/test_sglang.py
Removed pytest.mark.xfail wrapper from immediate_kill=False test parameter case in test_request_migration_sglang_aggregated. Added runtime conditional skip for specific parameter combination: migration_limit == 3, migration_max_seq_len is None, immediate_kill is True, request_api == "chat", stream is True, request_plane == "nats" to handle flaky first-token delay issue.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes both main changes: skipping a flaky test combo and removing a stale xfail mark.
Description check ✅ Passed The description provides comprehensive details about changes, test failures, and a concrete test plan, though it lacks explicit linkage to specific related issues.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

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


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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.

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 `@tests/fault_tolerance/migration/test_sglang.py`:
- Around line 238-252: The TODO marker "TODO(<LINEAR-ID>)" in both the skip
message and the preceding comment should be replaced with the actual Linear
ticket ID (or a real issue identifier) so the flaky-test debt is trackable;
update the comment above the conditional and the pytest.skip(...) reason string
that guard the branch checking migration_limit, migration_max_seq_len,
immediate_kill, request_api, stream, and
request.getfixturevalue("request_plane") to include the real ticket ID (e.g.,
TODO(LINEAR-1234) or LINEAR-1234) or an actionable issue link and keep the
existing conditional logic unchanged.
🪄 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

Run ID: d7af7411-7254-443e-8d53-399c5aa2204d

📥 Commits

Reviewing files that changed from the base of the PR and between cdb40ec and 8b869e4.

📒 Files selected for processing (1)
  • tests/fault_tolerance/migration/test_sglang.py

Comment on lines +238 to +252
# TODO(<LINEAR-ID>): Flaky on NATS transport — first-token delay routinely
# exceeds the 6s threshold in utils.validate_response. Other parameter
# combinations (including the TCP variant) are stable.
if (
migration_limit == 3
and migration_max_seq_len is None
and immediate_kill is True
and request_api == "chat"
and stream is True
and request.getfixturevalue("request_plane") == "nats"
):
pytest.skip(
"Flaky on NATS transport: first-token delay > 6s threshold. "
"TODO(<LINEAR-ID>)"
)

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.

⚠️ Potential issue | 🟡 Minor

Replace the Linear placeholder before merge.

The skip is targeted correctly, but both the comment and skip reason still contain TODO(<LINEAR-ID>), which makes the tracked flaky-test debt unactionable once merged.

If helpful, I can update this once you provide the real Linear ticket ID.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@tests/fault_tolerance/migration/test_sglang.py` around lines 238 - 252, The
TODO marker "TODO(<LINEAR-ID>)" in both the skip message and the preceding
comment should be replaced with the actual Linear ticket ID (or a real issue
identifier) so the flaky-test debt is trackable; update the comment above the
conditional and the pytest.skip(...) reason string that guard the branch
checking migration_limit, migration_max_seq_len, immediate_kill, request_api,
stream, and request.getfixturevalue("request_plane") to include the real ticket
ID (e.g., TODO(LINEAR-1234) or LINEAR-1234) or an actionable issue link and keep
the existing conditional logic unchanged.

@sara4dev sara4dev 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.

better to create linear ticket so we don't forget later to investigate the root cause & fix

Comment thread tests/fault_tolerance/migration/test_sglang.py Outdated
Signed-off-by: Dmitry Tokarev <dtokarev@nvidia.com>
@dmitry-tokarev-nv
dmitry-tokarev-nv merged commit e6ce4db into main Apr 21, 2026
17 of 18 checks passed
@dmitry-tokarev-nv
dmitry-tokarev-nv deleted the dtokarev/skip-flaky-migration-nats-test branch April 21, 2026 16:20
dmitry-tokarev-nv added a commit that referenced this pull request Apr 21, 2026
…(OPS-4446)

PR #8404 skipped only the NATS variant of
test_request_migration_sglang_aggregated[migration_enabled-max_seq_len_disabled-worker_failure-chat-stream-*]
because the TCP variant was stable at the time. Starting from the
first post-merge run after that skip landed, the TCP variant began
failing with the same symptom
(AssertionError: Delay before response > 6 secs, got ~13 secs at
utils.py:417) in every run: 24733651809, 24733908729, 24734216001,
24735128282, and onwards.

The cause is ordering: when NATS ran first, it warmed the path; with
NATS skipped, TCP now pays the cold-start cost itself.

Drop the request_plane == "nats" clause so both transports skip, and
also replace the stale TODO(<LINEAR-ID>) comment with the OPS-4446
reference that the skip reason string already uses.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Dmitry Tokarev <dtokarev@nvidia.com>

This branch had an error being deployed

1 failed deployment
GITLAB — 9d88a2eb Deployed Apr 21, 2026 by copy-pr-bot[bot] via Trigger CI Pipeline #24554
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants