Skip to content

Fix typed search attributes not printing in text mode for schedules#1060

Open
NasitSony wants to merge 1 commit into
temporalio:mainfrom
NasitSony:fix/schedule-search-attributes-v2
Open

Fix typed search attributes not printing in text mode for schedules#1060
NasitSony wants to merge 1 commit into
temporalio:mainfrom
NasitSony:fix/schedule-search-attributes-v2

Conversation

@NasitSony
Copy link
Copy Markdown
Contributor

Convert SearchAttributes using CustomJSONMarshalOptions before assigning to printableSchedule, ensuring typed fields serialize correctly through standard json.Marshal.

Fixes #590

Related issues

Closes #590

What changed?

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

Checklist

Stability

  • Breaking changes are marked with 💥 in the PR title and release notes

Design

  • This feature does not depend on Cloud-only APIs or behavior (it works against an OSS server)

Tests

  • Added functional test(s) — existing test TestSchedule_CreateDescribe_SearchAttributes_Memo covers this (currently skipped pending this fix)

Manual tests

Setup
temporal server start-dev --headless
temporal operator search-attribute create --name CustomKeywordField --type Keyword
temporal schedule create -s foo --task-queue foo --type foo --workflow-id asdf --interval 10d --search-attribute CustomKeywordField="schedule-string-val"

Happy path
$ temporal schedule describe -s foo
Action {...,"TypedSearchAttributes":{"CustomKeywordField":"schedule-string-val"},...}

Error case
N/A — bug fix only

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 30, 2026 14:53
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

1 participant