Skip to content

Add CHASM Visibility component to CHASM Workflow#10434

Open
rodrigozhou wants to merge 1 commit into
rodrigozhou/chasm-vis-textfrom
rodrigozhou/chasm-wf-vis
Open

Add CHASM Visibility component to CHASM Workflow#10434
rodrigozhou wants to merge 1 commit into
rodrigozhou/chasm-vis-textfrom
rodrigozhou/chasm-wf-vis

Conversation

@rodrigozhou
Copy link
Copy Markdown
Contributor

What changed?

Add CHASM Visibility component to CHASM Workflow

Why?

Support storing custom search attributes and memo in CHASM Workflow.

How did you test it?

  • built
  • run locally and tested manually
  • covered by existing tests
  • added new unit test(s)
  • added new functional test(s)

Potential risks

@rodrigozhou rodrigozhou requested review from a team as code owners May 29, 2026 21:52
@rodrigozhou rodrigozhou force-pushed the rodrigozhou/chasm-wf-vis branch from cbc6ddc to fc07bc7 Compare May 29, 2026 22:07
Copy link
Copy Markdown
Member

@yycptt yycptt left a comment

Choose a reason for hiding this comment

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

PR lgtm but want to understand a bit more on the migration plan. Looks like with this PR we are not doing dual write for custom SA/Memo yet, but workflow will generate both old visibility task and also chasm visibility task?

Comment thread chasm/tree.go
}

if n.isActiveStateDirty {
if n.isActiveStateDirty || rootLifecycleChanged {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: can you help add a comment saying the change is specifically for handling workflow case, otherwise when rootLifecycleChanged, isActiveStateDirty must be true.

}

// CustomSearchAttributes returns the custom search attributes.
func (w *Workflow) CustomSearchAttributes(ctx chasm.Context) map[string]*commonpb.Payload {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

where/how will the following four methods be used?


// SearchAttributes returns the predefined search attributes set in the underlying mutable state.
func (w *Workflow) SearchAttributes(ctx chasm.Context) []chasm.SearchAttributeKeyValue {
searchAttributes, err := w.GetPredefinedSearchAttributes()
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

do we have to deep copy/clone the SAs here?

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.

2 participants