Repository navigation
mcp: lower the temporalio floor back to 1.32.0 - #434
Conversation
#59 raised it to 1.34.0 so the test helper would see one dev-server startup-timeout format. Nothing in temporalio-mcp's code needs 1.34: the whole suite passes, and pyright and mypy are clean, on temporalio 1.32.0 and 1.33.0. The lock still resolves 1.34.0 for development and CI.
brianstrauch
left a comment
There was a problem hiding this comment.
Please update the dev-server retry helper before lowering the SDK floor. MCP's workflow tests use WorkflowEnvironment.start_local, and SDK 1.32 reports its startup timeout as:
Failed starting Temporal dev server: Failed connecting to test server after 5 seconds, last error: …
tests/helpers/environment.py only recognizes the newer timeout format used by SDK 1.33+. With 1.32, a transient startup timeout therefore fails immediately instead of receiving the intended three attempts. A successful suite run does not exercise this failure path.
Suggested change to python/_template/tests/helpers/environment.py.tmpl:
_RETRYABLE_STARTUP_ERROR = re.compile(
r"^Failed starting Temporal dev server: (?:"
r"ephemeral server at \S+ did not start within \d+s\."
+ r"|Failed connecting to test server after \d+ seconds, last error: "
r"|failed to download ephemeral server executable:"Add the legacy timeout to the retry regression cases with both last error: None and last error: Some(…), covering recovery and the three-attempt limit. Keep unrelated connection errors non-retryable. Apply the template changes to every Python plugin's helper and test copies, as required by the byte-identical conventions check.
I reproduced the missing retries with the new regression cases. With this fix, all 104 MCP tests pass on SDK 1.32.0 and 1.34.0; lint/type checks, repository conventions, and 31 conventions/scaffolding tests also pass.
With the temporalio floor back at 1.32.0, the test helper must also recognize the startup timeout that SDK 1.32 reports: 'Failed connecting to test server after N seconds, last error: ...'. Before, that timeout failed at once instead of getting the three attempts. Add it to the template's retry regex, add regression cases with 'last error: None' and 'last error: Some(...)' to the recovery and three-attempt tests, keep a near-miss connection error non-retryable, and copy both templates to every Python plugin.
|
Thanks Brian, good catch! I checked the SDK binaries: 1.32.0 reports exactly that message, and 1.33.0 and 1.34.0 use the newer one. Fixed:
Against the old helper, 7 of the 53 Could you take another look? |
|
This one is merged already, but here's what I ran with it, so the record lives with the PR. How did I test it with the plugins?I built a local candidate: the GA release candidate plus #433, #434 (before its test-helper change) and #435. I built temporalio-mcp from that tree as 0.3.0 and installed it over each plugin's lock. Then I reran everything we have for the two plugins that use temporalio-mcp: OpenAI Agents and Strands (both Python). I compared each result with the same check on the release candidate, which used temporalio-mcp 0.2.0.
What changed, on purpose?
What didn't change?The items that failed on the release candidate still fail the same way here, and none of them comes from temporalio-mcp. In OpenAI Agents, two defect fix checks and five feature checks were already failing on the release candidate. Only three defect checks and one feature item in OpenAI Agents go through the temporalio-mcp route; the rest of its MCP evidence uses the deprecated providers, which don't import it. Anything flaky, or not run?
|
What was changed
Does
temporalio-mcpneedtemporalio1.34? I checked, and it doesn't. So this PR puts the floor back at 1.32.0.temporalio-mcprequirestemporalio>=1.32.0,<2again, instead of>=1.34.0,<2. The matching line inuv.lockchanges too. The lock still resolves 1.34.0, so development and CI don't change.tests/helpers/environment.py) now also retries the startup timeout that SDKs before 1.33 report:Failed connecting to test server after 5 seconds, last error: .... Without it, a slow start on 1.32 failed at once instead of getting its three attempts. Thanks Brian for catching this! The template and every Python plugin's copy change together, as the conventions check requires.Why?
#59 raised the floor so the test helper would see one dev-server startup-timeout format. In its own words: "Using SDK 1.34.0 across the plugin test environments gives the helper one startup-timeout format to recognize." That's a reason for the tests, not for the package.
Nothing in
temporalio-mcp's code needs 1.34. It usesactivity,workflow,ApplicationError,SimplePlugin,WorkflowRunner,SandboxedWorkflowRunnerandActivityConfig, and all of them exist in 1.32.0. With the floor back at 1.32.0, users on 1.32 or 1.33 don't have to upgrade their SDK to get 0.3.0.Checklist
Closes: no issue.
How was this tested:
temporalio1.32.0, and then 1.33.0, installed over the lock, the wholepython/mcpsuite passes, and pyright and mypy are clean.test_env.pygets the old timeout in the recovery and three-attempt cases, withlast error: Noneandlast error: Some(...), and a near-miss connection error that stays non-retryable. Against the old helper, 7 of its 53 cases fail. With the fix, all 53 pass.python/mcpsuite passes ontemporalio1.32.0 and 1.34.0 (102 tests), and ruff, pyright, basedpyright and mypy are clean.scripts/tests.uv lock --checkpasses.