Skip to content

Fix assignment of typed search attributes on CaN and child workflows#631

Merged
THardy98 merged 2 commits intomainfrom
fix/dotnet-initialize-search-attributes-child-wf-typed-search-attributes
Mar 31, 2026
Merged

Fix assignment of typed search attributes on CaN and child workflows#631
THardy98 merged 2 commits intomainfrom
fix/dotnet-initialize-search-attributes-child-wf-typed-search-attributes

Conversation

@THardy98
Copy link
Copy Markdown
Contributor

What was changed

A regression was introduced in this change that directly assigned typed search attributes to SearchAttributes.IndexedFields on continue-as-new or for child workflows.

However, SearchAttributes is null on this assignment, resulting in a null assignment reference:

18:50:28 warn: Temporalio.Workflow:kitchenSink[0] => System.Collections.Generic.Dictionary`2[System.String,System.Object] => System.Collections.Generic.Dictionary`2[System.String,System.Object] Failed activation on workflow kitchenSink with ID w-dotnet-20260331-183334-8b9e-1f62d5c4b00f1126-8 and run ID 019d453b-958a-7f2a-87bf-6711fad00bca System.NullReferenceException: Object reference not set to an instance of an object.    at Temporalio.Worker.WorkflowInstance.OutboundImpl.StartChildWorkflowAsync[TWorkflow,TResult](StartChildWorkflowInput input) in /app/repo/src/Temporalio/Worker/WorkflowInstance.cs:line 2423
...

This change fixed the assignment and adds a couple small integration tests to verify the fix.

  1. How was this tested:
    Couple integration tests

  2. Any docs updates needed?
    Maybe ?

@THardy98 THardy98 requested a review from a team as a code owner March 31, 2026 22:06
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