Skip to content

fix(verl): report failed rollout deletion instead of treating it as success - #656

Open
Chen Yufeiyang (feiiiiii5) wants to merge 1 commit into
microsoft:mainfrom
feiiiiii5:agent-lightning-C-209
Open

Chen Yufeiyang (feiiiiii5) wants to merge 1 commit into
microsoft:mainfrom
feiiiiii5:agent-lightning-C-209

Conversation

@feiiiiii5

Copy link
Copy Markdown

AglRolloutManagerBase._delete_rollout() treats a failed HTTP DELETE as success: httpx.Client.delete does not raise for 4xx/5xx, and the method never checks the response. A 500 leaves the completed rollout and its events on the server for the rest of the training run, while the caller advances as if cleanup succeeded.

The fix calls raise_for_status() inside the existing try, so the failure goes through the method's existing failed to delete rollout ... branch. Deletion remains best-effort, matching delete_model() in the same class, but a rejected DELETE is no longer silent.

Test: tests/verl/test_agl_rollout_manager.py::test_delete_rollout_reports_http_errors uses an httpx.MockTransport returning 500; it fails on 05c7fe1 because no failure is printed and passes here. The server/controller/client and rollout-manager suites are 88 passed; ruff check/format --check are clean.

Details

The failure is surfaced but not retried, and a 3xx response is not treated as an error by raise_for_status(); both match the class's documented best-effort cleanup behavior.

…uccess

httpx.Client.delete does not raise for 4xx/5xx, so the existing failure
branch never ran. Raise for status inside the try so a rejected DELETE
is reported through the same best-effort path as delete_model().
Copilot AI balanced review requested due to automatic review settings October 26, 2026 06:54

Copilot AI 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.

🟢 Approval recommended

The focused fix preserves best-effort cleanup and includes a targeted regression test, with no unresolved review findings.

No open issues 🎉

What changed in this PR

This PR makes failed rollout deletion visible while preserving the rollout manager’s best-effort cleanup behavior.

Changes:

  • Checks the DELETE response status so HTTP failures reach the existing error-reporting branch.
  • Adds a regression test verifying that a mocked HTTP 500 response produces a deletion-failure message.
File Description
tests/​verl/​test_agl_rollout_manager.py Adds regression coverage for reporting failed rollout deletion.
agentlightning/​verl/​agl_rollout_manager.py Validates the DELETE response inside the existing exception handler.

Review effort: Balanced

This branch has not been deployed

No deployments
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.

2 participants