Skip to content

test: accept null for empty search attributes on Temporal Server 1.31+ - #836

Merged
xepozz merged 1 commit into
masterfrom
fix/empty-search-attributes
Oct 21, 2026
Merged

xepozz merged 1 commit into
masterfrom
fix/empty-search-attributes

Conversation

@xepozz

@xepozz xepozz commented Oct 21, 2026

Copy link
Copy Markdown
Collaborator

What was changed

sendEmptySearchAttributes accepts null as 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

  • Covered by tests

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).
@xepozz
xepozz requested review from a team, roxblnfk and wolfy-j as code owners October 21, 2026 16:07
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-21T16:18:14.997603Z f2bca8f PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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');

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@xepozz
xepozz merged commit 0f70e49 into master Oct 21, 2026
263 of 264 checks passed
@xepozz
xepozz deleted the fix/empty-search-attributes branch October 22, 2026 07:27
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.

[Bug] Empty search attributes come back as null on Temporal Server 1.31+

2 participants