Repository navigation
test: accept null for empty search attributes on Temporal Server 1.31+ - #836
Conversation
Server 1.31 (temporalio/temporal#9091) drops an empty search attribute map from the start event, so the child workflow gets null for []. Run the tests on CLI 1.9 (Server 1.32).
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f2bca8fee4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ): void { | ||
| $result = $stub->getResult(timeout: 3); | ||
| $this->assertSame([], $result, 'Workflow result contains resolved value'); | ||
| $this->assertEmpty($result, 'Workflow result contains resolved value'); |
There was a problem hiding this comment.
Restrict the assertion to null or an empty array
When search attributes are incorrectly decoded as another falsy scalar such as false, 0, or '', assertEmpty() still passes, although the intended accepted values are only null and []. This weakens the marshalling regression test and could hide an incompatible result type; assert the explicit two-value condition instead.
Useful? React with 👍 / 👎.
What was changed
sendEmptySearchAttributesacceptsnullas well as[]. Tests run on Temporal CLI 1.9 (Server 1.32).Why?
Closes #835. Server 1.31+ does not store an empty search attribute map, so the SDK gets
null.Checklist