diff --git a/host/elasticsearch_test.go b/host/elasticsearch_test.go index 2d360df2980..fc3e184d9b7 100644 --- a/host/elasticsearch_test.go +++ b/host/elasticsearch_test.go @@ -220,6 +220,18 @@ func (s *elasticsearchIntegrationSuite) TestListWorkflow_SearchAttribute() { } // verify upsert data is on ES s.testListResultForUpsertSearchAttributes(listRequest) + + // verify DescribeWorkflowExecution + descRequest := &workflow.DescribeWorkflowExecutionRequest{ + Domain: common.StringPtr(s.domainName), + Execution: &workflow.WorkflowExecution{ + WorkflowId: common.StringPtr(id), + }, + } + descResp, err := s.engine.DescribeWorkflowExecution(createContext(), descRequest) + s.Nil(err) + expectedSearchAttributes := getUpsertSearchAttributes() + s.Equal(expectedSearchAttributes, descResp.WorkflowExecutionInfo.GetSearchAttributes()) } func (s *elasticsearchIntegrationSuite) TestListWorkflow_PageToken() { diff --git a/host/integration_test.go b/host/integration_test.go index 3bad482905f..4dfaa8a7b12 100644 --- a/host/integration_test.go +++ b/host/integration_test.go @@ -3720,6 +3720,15 @@ func (s *integrationSuite) startWithMemoHelper(startFn startFunc, id string, tas startdEventAttributes := firstEvent.WorkflowExecutionStartedEventAttributes s.Equal(memo, startdEventAttributes.Memo) + // verify DescribeWorkflowExecution result + descRequest := &workflow.DescribeWorkflowExecutionRequest{ + Domain: common.StringPtr(s.domainName), + Execution: execution, + } + descResp, err := s.engine.DescribeWorkflowExecution(createContext(), descRequest) + s.Nil(err) + s.Equal(memo, descResp.WorkflowExecutionInfo.Memo) + // verify closed visibility var closdExecutionInfo *workflow.WorkflowExecutionInfo for i := 0; i < 10; i++ { diff --git a/service/history/historyEngine.go b/service/history/historyEngine.go index 38ae0fe77d6..1d1cde487c3 100644 --- a/service/history/historyEngine.go +++ b/service/history/historyEngine.go @@ -752,6 +752,7 @@ func (e *historyEngineImpl) DescribeWorkflowExecution( StartTime: common.Int64Ptr(executionInfo.StartTimestamp.UnixNano()), HistoryLength: common.Int64Ptr(msBuilder.GetNextEventID() - common.FirstEventID), AutoResetPoints: executionInfo.AutoResetPoints, + Memo: &workflow.Memo{Fields: executionInfo.Memo}, SearchAttributes: &workflow.SearchAttributes{IndexedFields: executionInfo.SearchAttributes}, }, }