Skip to content

Fix/schedule search attributes text mode#1048

Closed
NasitSony wants to merge 3 commits into
temporalio:mainfrom
NasitSony:fix/schedule-search-attributes-text-mode
Closed

Fix/schedule search attributes text mode#1048
NasitSony wants to merge 3 commits into
temporalio:mainfrom
NasitSony:fix/schedule-search-attributes-text-mode

Conversation

@NasitSony
Copy link
Copy Markdown
Contributor

What was changed

Convert SearchAttributes field in printableSchedule from *commonpb.SearchAttributes to map[string]interface{}. Added searchAttributesToMap helper that uses temporalproto.CustomJSONMarshalOptions to correctly serialize typed search attributes.

Why?

Typed search attributes were printing as empty {} in text mode because standard json.Marshal doesn't know how to serialize *commonpb.SearchAttributes typed fields correctly. JSON mode worked because it used the proto marshaler. This fix ensures text mode uses the same proto-aware marshaling.

Checklist

  1. Closes [Bug] Typed search attributes inside schedule actions are not printed correctly in text mode #590

  2. 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.

  3. Any docs updates needed?
    No — this is a bug fix with no user-facing API changes.

NasitSony added 3 commits May 22, 2026 16:47
…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
@NasitSony NasitSony requested a review from a team as a code owner May 23, 2026 17:03
@chaptersix
Copy link
Copy Markdown
Contributor

@NasitSony looks like this PR has some of your changes from another PR.

@NasitSony
Copy link
Copy Markdown
Contributor Author

@chaptersix Closing in favor of #1060 — cleaner branch without extra commits.

@NasitSony NasitSony closed this May 30, 2026
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] Typed search attributes inside schedule actions are not printed correctly in text mode

2 participants