mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #2919] [CLOSED] fix(bench): set port again when the bench starts the server #4337
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#4337
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/2919
Author: @ByteJuggler
Created: 10/17/2026
Status: ❌ Closed
Base:
main← Head:pr/bench-port📝 Commits (1)
136c3ecfix(bench): set port again when the bench starts the server; #2330 dropped it, so BENCH stopped with NameError📊 Changes
1 file changed (+2 additions, -1 deletions)
View changed files
📝
tools/strata_bench.py(+2 -1)📄 Description
`tools/strata_bench.py` stops with `NameError: name 'port' is not defined` whenever it has to start the server itself, which is the default for `BENCH.bat` / `bench.sh` when no server is running yet:
```
File "tools/strata_bench.py", line 1007, in main
if port_answers(port):
NameError: name 'port' is not defined
```
#2330 changed the address line to `base = server_base(cfg.get("host"), a.port or int(cfg.get("port", 8080)))` and dropped the `port = ...` line before it. `port` is still used afterwards: in the port-in-use check, the messages and `start_server(cfg_path, port, ...)`.
The fix sets `port` again and passes it to `server_base`. One line; no change when a server is already running or `--url` is given.
Tested: `python tools/test_strata_bench.py` passes (17 tests), and `strata_bench.py --config ...` with no server running now starts the server and completes the suite (Windows, HIP, six models).
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.