Fix/schedule search attributes text mode#1048
Open
NasitSony wants to merge 3 commits into
Open
Conversation
…tScheduleMatchingTimes RPC in the CLI. Allows users to preview when a schedule will fire within a given time range without executing workflows. Closes temporalio#1030
Convert SearchAttributes using CustomJSONMarshalOptions before assigning to printableSchedule, ensuring typed fields serialize correctly through standard json.Marshal. Fixes temporalio#590
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
Convert
SearchAttributesfield inprintableSchedulefrom*commonpb.SearchAttributestomap[string]interface{}. AddedsearchAttributesToMaphelper that usestemporalproto.CustomJSONMarshalOptionsto correctly serialize typed search attributes.Why?
Typed search attributes were printing as empty
{}in text mode because standardjson.Marshaldoesn't know how to serialize*commonpb.SearchAttributestyped fields correctly. JSON mode worked because it used the proto marshaler. This fix ensures text mode uses the same proto-aware marshaling.Checklist
Closes [Bug] Typed search attributes inside schedule actions are not printed correctly in text mode #590
How was this tested:
All existing tests pass (go test ./...). The fix applies to both describeResultToPrintable and listEntryToPrintable to cover both describe and list commands.
Any docs updates needed?
No — this is a bug fix with no user-facing API changes.