Repository navigation
fix: keep sub-second precision in time search attributes - #654
Merged
chris-olszewski merged 1 commit intoNov 5, 2026
Merged
chris-olszewski merged 1 commit into
chris-olszewski merged 1 commit into
Conversation
chris-olszewski
approved these changes
Nov 5, 2026
chris-olszewski
left a comment
Member
There was a problem hiding this comment.
Thanks for the find & fix!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was changed
SearchAttributes._to_proto_pairencodesTIMEvalues withTime#iso8601(9)instead ofTime#iso8601, so fractional seconds are no longer dropped.temporalio/search_attributes.rbnow requirestime, which providesTime#iso8601andTime.iso8601.test_search_attribute_time_sub_secondtoclient_workflow_test.rband afixedchangelog fragment.Why?
Time#iso8601with no argument writes whole seconds. ATimesearch attribute set to08:00:00.123456789is sent as08:00:00Z, and that is what describe and list return. The server keeps the fraction: a rawDatetimepayload with nanoseconds is returned unchanged, and the other SDKs send fractional seconds.The SDK also never required
time. On Ruby 3.3, an application that does not load it itself getsNoMethodError: undefined method 'iso8601'when it sets aTIMEsearch attribute. The test suite does not catch this because its development dependencies loadtime.Checklist
Closes [Bug] Time search attributes lose sub-second precision, and raise NoMethodError without
require 'time'#653How was this tested:
ClientWorkflowTest#test_search_attribute_time_sub_secondstarts a workflow with a nanosecond-precisionTIMEattribute and checks that describe returns the sameTime. It fails before the change (expected 08:00:00.123456789 UTC, got 08:00:00 UTC) and passes after it.WorkerWorkflowTest#test_search_attributes_memopasses.upsert_search_attributeswithWorkflow.nowreturns full nanoseconds in the workflow and in describe, with no illegal call errors.Any docs updates needed? No.