Skip to content

Restore the previous request name after temporary grouping - #3583

Merged
cyberw merged 2 commits into
locustio:masterfrom
charan-rathore:fix/restore-request-name
Nov 1, 2026
Merged

cyberw merged 2 commits into
locustio:masterfrom
charan-rathore:fix/restore-request-name

Conversation

@charan-rathore

Copy link
Copy Markdown
Contributor

Change

Restore the previous request_name when rename_request() exits. With nested groupings, requests after the inner context currently lose the outer name and are grouped under their URLs. A temporarily overridden explicit name is also lost. Preserve it on normal exit and exceptions in HttpSession, FastHttpSession and the experimental OpenAIClient.

This extends the inherited reset-to-None behavior retained by #3532. It adds no public API or dependencies. Documentation now explains restoration and nesting.

Validation

  • All 12 new regression cases fail with only the implementation reverted and pass with it restored. HTTP tests use the local server and verify statistics. The optional OpenAI tests construct the SDK client without making external calls.
  • 216 adjacent tests pass. Completed additional batches include 64 passing CLI tests, 46 Web UI tests, 16 distributed tests, 30 runner tests and five telemetry tests. These counts overlap other runs and are not a combined suite total.
  • All 25 observed remaining failures reproduce on the exact unmodified base and candidate with matching missing built index.html/report.html assets. Telemetry tests pass on both after installing the declared test extras.
  • Ruff, formatting, source mypy and the actual normal commit hooks pass, including the follow-up that puts Locust imports first for gevent patching.

The full suite and longer runner runs exceeded the execution limit; complete full-suite coverage and a green full-suite result are not claimed. Local evidence applies to 2564e6d on 0d61b12.

Prepared with AI assistance; the final diff and paired validation evidence were reviewed.

@cyberw
cyberw merged commit 4340e9c into locustio:master Nov 1, 2026
21 checks passed
@cyberw

cyberw commented Nov 1, 2026

Copy link
Copy Markdown
Collaborator

Nice!

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