Skip to content

fix: broken testing environment start due to changes in startTemporalServer#726

Open
mtorromeo wants to merge 1 commit intotemporalio:masterfrom
mtorromeo:fix-testing-environment
Open

fix: broken testing environment start due to changes in startTemporalServer#726
mtorromeo wants to merge 1 commit intotemporalio:masterfrom
mtorromeo:fix-testing-environment

Conversation

@mtorromeo
Copy link

What was changed

Changed Temporal\Testing\Environment::startRoadRunner to accept array for $rrCommand and to use it also in its check loop.

Why?

There are two new issues in version 2.17 of the testing environment that were not present in 2.15.

  1. In Temporal\Testing\Environment the start method only accepts array|null for its $rrCommand parameter, but this parameter is passed as-is to startRoadRunner, which instead only accepts string|null, making this effectively only work when $rrCommand === null.

  2. startRoadRunner completely disregards the passed-in $rrCommand for executing the workers command when checking the status of the server. This may work sometimes but depending on the specific custom command used it's likely wrong.

I kind of fixed this by replacing the serve command with workers but I don't particularly like this either.

While fixing this I changed the while loop that tests the server to quickly exit the loop if the command is not running anymore, instead of waiting for the timeout, and I did the same in startTemporalServer.

Checklist

  • How was this tested: I made this changes to fix my project that broke due to the wrong type signatures, the fix is confirmed by testing it on that same project.

@mtorromeo mtorromeo requested review from a team, roxblnfk and wolfy-j as code owners March 11, 2026 14:17
@vercel
Copy link

vercel bot commented Mar 11, 2026

@mtorromeo is attempting to deploy a commit to the Temporal Team on Vercel.

A member of the Team first needs to authorize it.

@mtorromeo
Copy link
Author

mtorromeo commented Mar 11, 2026

Also, I didn't want to remove any funcionality in this PR but I think it would be best to just not accept string at all for $rrCommand. explode(' ', $rrCommand) is a terrible and unsafe way to convert a shell command to an array of arguments.

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.

1 participant