Skip to content

Retry the dev-server start when a worker misses the bridge's five-second connect window - #14

Merged
DABH merged 2 commits into
mainfrom
fix/dev-server-start-retry
Sep 12, 2026
Merged

DABH merged 2 commits into
mainfrom
fix/dev-server-start-retry

Conversation

@DABH

@DABH DABH commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

Every xdist worker starts its own Temporal dev server through WorkflowEnvironment.start_local. The SDK bridge waits a fixed five seconds for the server to accept connections; on a cold Windows runner the binary can take longer than that, and the session fixture then fails with Failed starting Temporal dev server ... ConnectionRefused in two or three workers while the other workers pass. PR #13's run 34504784871 hit it on windows-latest, py3.14: 213 passed, 2 setup errors, unrelated to the PR's content.

The env fixture now retries that specific failure up to three times before giving up. Any other startup error still surfaces on the first attempt.

tests/conftest.py is an adaptation file (AGENTS.md, "Transition rules"), not an imported one. The same change belongs in python/mcp/tests/conftest.py once #5 has merged.

Testing

  • make lint clean
  • make test PYTEST_ARGS="-k 'test_hello_world_agent or test_tool_workflow'": 2 passed (the two tests that errored in the failing run)

…ond connect window

Every xdist worker starts its own Temporal dev server. On a cold Windows runner the binary can take longer than the fixed five seconds the SDK bridge waits, and the session fixture then fails with "Failed starting Temporal dev server ... ConnectionRefused" in two or three workers while the rest pass (PR #13, run 34504784871: 213 passed, 2 setup errors). Retry that specific failure up to three times before giving up.
@DABH
DABH requested a review from a team as a code owner September 10, 2026 17:37
Comment thread python/openai_agents/tests/conftest.py
@DABH
DABH merged commit 7659957 into main Sep 12, 2026
13 checks passed
@DABH
DABH deleted the fix/dev-server-start-retry branch September 12, 2026 05:20
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