diff --git a/common/testing/history_event_util.go b/common/testing/history_event_util.go index 8541622760e..2dd632b13d2 100644 --- a/common/testing/history_event_util.go +++ b/common/testing/history_event_util.go @@ -155,7 +155,7 @@ func InitializeHistoryEventGenerator( historyEvent.DecisionTaskStartedEventAttributes = &types.DecisionTaskStartedEventAttributes{ ScheduledEventID: lastEvent.EventID, Identity: identity, - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), } return historyEvent }) @@ -411,7 +411,7 @@ func InitializeHistoryEventGenerator( historyEvent.ActivityTaskStartedEventAttributes = &types.ActivityTaskStartedEventAttributes{ ScheduledEventID: lastEvent.EventID, Identity: identity, - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Attempt: common.Int32Ptr(0), } return historyEvent diff --git a/common/types/errors.go b/common/types/errors.go index b8fac49617b..18ae600fb6a 100644 --- a/common/types/errors.go +++ b/common/types/errors.go @@ -125,9 +125,7 @@ func (err WorkflowExecutionAlreadyStartedError) Error() string { if err.Message != nil { printField(sb, "Message", *err.Message) } - if err.StartRequestID != nil { - printField(sb, "StartRequestID", *err.StartRequestID) - } + printField(sb, "StartRequestID", err.StartRequestID) printField(sb, "RunID", err.RunID) return fmt.Sprintf("WorkflowExecutionAlreadyStartedError{%s}", sb.String()) } diff --git a/common/types/history.go b/common/types/history.go index 540e825d75a..a105249c588 100644 --- a/common/types/history.go +++ b/common/types/history.go @@ -3659,7 +3659,7 @@ type RecordActivityTaskStartedRequest struct { WorkflowExecution *WorkflowExecution `json:"workflowExecution,omitempty"` ScheduleID *int64 `json:"scheduleId,omitempty"` TaskID *int64 `json:"taskId,omitempty"` - RequestID *string `json:"requestId,omitempty"` + RequestID string `json:"requestId,omitempty"` PollRequest *PollForActivityTaskRequest `json:"pollRequest,omitempty"` } @@ -3697,8 +3697,8 @@ func (v *RecordActivityTaskStartedRequest) GetTaskID() (o int64) { // GetRequestID is an internal getter (TBD...) func (v *RecordActivityTaskStartedRequest) GetRequestID() (o string) { - if v != nil && v.RequestID != nil { - return *v.RequestID + if v != nil { + return v.RequestID } return } @@ -3833,7 +3833,7 @@ type RecordDecisionTaskStartedRequest struct { WorkflowExecution *WorkflowExecution `json:"workflowExecution,omitempty"` ScheduleID *int64 `json:"scheduleId,omitempty"` TaskID *int64 `json:"taskId,omitempty"` - RequestID *string `json:"requestId,omitempty"` + RequestID string `json:"requestId,omitempty"` PollRequest *PollForDecisionTaskRequest `json:"pollRequest,omitempty"` } @@ -3871,8 +3871,8 @@ func (v *RecordDecisionTaskStartedRequest) GetTaskID() (o int64) { // GetRequestID is an internal getter (TBD...) func (v *RecordDecisionTaskStartedRequest) GetRequestID() (o string) { - if v != nil && v.RequestID != nil { - return *v.RequestID + if v != nil { + return v.RequestID } return } @@ -4041,7 +4041,7 @@ func (v *HistoryRefreshWorkflowTasksRequest) GetRequest() (o *RefreshWorkflowTas type RemoveSignalMutableStateRequest struct { DomainUUID string `json:"domainUUID,omitempty"` WorkflowExecution *WorkflowExecution `json:"workflowExecution,omitempty"` - RequestID *string `json:"requestId,omitempty"` + RequestID string `json:"requestId,omitempty"` } // GetDomainUUID is an internal getter (TBD...) @@ -4062,8 +4062,8 @@ func (v *RemoveSignalMutableStateRequest) GetWorkflowExecution() (o *WorkflowExe // GetRequestID is an internal getter (TBD...) func (v *RemoveSignalMutableStateRequest) GetRequestID() (o string) { - if v != nil && v.RequestID != nil { - return *v.RequestID + if v != nil { + return v.RequestID } return } diff --git a/common/types/mapper/thrift/history.go b/common/types/mapper/thrift/history.go index a7ec8c855ee..f3c09db64b2 100644 --- a/common/types/mapper/thrift/history.go +++ b/common/types/mapper/thrift/history.go @@ -2486,7 +2486,7 @@ func FromRecordActivityTaskStartedRequest(t *types.RecordActivityTaskStartedRequ WorkflowExecution: FromWorkflowExecution(t.WorkflowExecution), ScheduleId: t.ScheduleID, TaskId: t.TaskID, - RequestId: t.RequestID, + RequestId: &t.RequestID, PollRequest: FromPollForActivityTaskRequest(t.PollRequest), } } @@ -2501,7 +2501,7 @@ func ToRecordActivityTaskStartedRequest(t *history.RecordActivityTaskStartedRequ WorkflowExecution: ToWorkflowExecution(t.WorkflowExecution), ScheduleID: t.ScheduleId, TaskID: t.TaskId, - RequestID: t.RequestId, + RequestID: t.GetRequestId(), PollRequest: ToPollForActivityTaskRequest(t.PollRequest), } } @@ -2576,7 +2576,7 @@ func FromRecordDecisionTaskStartedRequest(t *types.RecordDecisionTaskStartedRequ WorkflowExecution: FromWorkflowExecution(t.WorkflowExecution), ScheduleId: t.ScheduleID, TaskId: t.TaskID, - RequestId: t.RequestID, + RequestId: &t.RequestID, PollRequest: FromPollForDecisionTaskRequest(t.PollRequest), } } @@ -2591,7 +2591,7 @@ func ToRecordDecisionTaskStartedRequest(t *history.RecordDecisionTaskStartedRequ WorkflowExecution: ToWorkflowExecution(t.WorkflowExecution), ScheduleID: t.ScheduleId, TaskID: t.TaskId, - RequestID: t.RequestId, + RequestID: t.GetRequestId(), PollRequest: ToPollForDecisionTaskRequest(t.PollRequest), } } @@ -2672,7 +2672,7 @@ func FromRemoveSignalMutableStateRequest(t *types.RemoveSignalMutableStateReques return &history.RemoveSignalMutableStateRequest{ DomainUUID: &t.DomainUUID, WorkflowExecution: FromWorkflowExecution(t.WorkflowExecution), - RequestId: t.RequestID, + RequestId: &t.RequestID, } } @@ -2684,7 +2684,7 @@ func ToRemoveSignalMutableStateRequest(t *history.RemoveSignalMutableStateReques return &types.RemoveSignalMutableStateRequest{ DomainUUID: t.GetDomainUUID(), WorkflowExecution: ToWorkflowExecution(t.WorkflowExecution), - RequestID: t.RequestId, + RequestID: t.GetRequestId(), } } diff --git a/common/types/mapper/thrift/shared.go b/common/types/mapper/thrift/shared.go index 7ad7ce78430..3e93584d1cc 100644 --- a/common/types/mapper/thrift/shared.go +++ b/common/types/mapper/thrift/shared.go @@ -228,7 +228,7 @@ func FromActivityTaskStartedEventAttributes(t *types.ActivityTaskStartedEventAtt return &shared.ActivityTaskStartedEventAttributes{ ScheduledEventId: t.ScheduledEventID, Identity: &t.Identity, - RequestId: t.RequestID, + RequestId: &t.RequestID, Attempt: t.Attempt, LastFailureReason: t.LastFailureReason, LastFailureDetails: t.LastFailureDetails, @@ -243,7 +243,7 @@ func ToActivityTaskStartedEventAttributes(t *shared.ActivityTaskStartedEventAttr return &types.ActivityTaskStartedEventAttributes{ ScheduledEventID: t.ScheduledEventId, Identity: t.GetIdentity(), - RequestID: t.RequestId, + RequestID: t.GetRequestId(), Attempt: t.Attempt, LastFailureReason: t.LastFailureReason, LastFailureDetails: t.LastFailureDetails, @@ -1290,7 +1290,7 @@ func FromDecisionTaskStartedEventAttributes(t *types.DecisionTaskStartedEventAtt return &shared.DecisionTaskStartedEventAttributes{ ScheduledEventId: t.ScheduledEventID, Identity: &t.Identity, - RequestId: t.RequestID, + RequestId: &t.RequestID, } } @@ -1302,7 +1302,7 @@ func ToDecisionTaskStartedEventAttributes(t *shared.DecisionTaskStartedEventAttr return &types.DecisionTaskStartedEventAttributes{ ScheduledEventID: t.ScheduledEventId, Identity: t.GetIdentity(), - RequestID: t.RequestId, + RequestID: t.GetRequestId(), } } @@ -4035,7 +4035,7 @@ func FromRequestCancelWorkflowExecutionRequest(t *types.RequestCancelWorkflowExe Domain: &t.Domain, WorkflowExecution: FromWorkflowExecution(t.WorkflowExecution), Identity: &t.Identity, - RequestId: t.RequestID, + RequestId: &t.RequestID, } } @@ -4048,7 +4048,7 @@ func ToRequestCancelWorkflowExecutionRequest(t *shared.RequestCancelWorkflowExec Domain: t.GetDomain(), WorkflowExecution: ToWorkflowExecution(t.WorkflowExecution), Identity: t.GetIdentity(), - RequestID: t.RequestId, + RequestID: t.GetRequestId(), } } @@ -4174,7 +4174,7 @@ func FromResetWorkflowExecutionRequest(t *types.ResetWorkflowExecutionRequest) * WorkflowExecution: FromWorkflowExecution(t.WorkflowExecution), Reason: t.Reason, DecisionFinishEventId: t.DecisionFinishEventID, - RequestId: t.RequestID, + RequestId: &t.RequestID, SkipSignalReapply: t.SkipSignalReapply, } } @@ -4189,7 +4189,7 @@ func ToResetWorkflowExecutionRequest(t *shared.ResetWorkflowExecutionRequest) *t WorkflowExecution: ToWorkflowExecution(t.WorkflowExecution), Reason: t.Reason, DecisionFinishEventID: t.DecisionFinishEventId, - RequestID: t.RequestId, + RequestID: t.GetRequestId(), SkipSignalReapply: t.SkipSignalReapply, } } @@ -4772,7 +4772,7 @@ func FromSignalWithStartWorkflowExecutionRequest(t *types.SignalWithStartWorkflo ExecutionStartToCloseTimeoutSeconds: t.ExecutionStartToCloseTimeoutSeconds, TaskStartToCloseTimeoutSeconds: t.TaskStartToCloseTimeoutSeconds, Identity: &t.Identity, - RequestId: t.RequestID, + RequestId: &t.RequestID, WorkflowIdReusePolicy: FromWorkflowIDReusePolicy(t.WorkflowIDReusePolicy), SignalName: t.SignalName, SignalInput: t.SignalInput, @@ -4799,7 +4799,7 @@ func ToSignalWithStartWorkflowExecutionRequest(t *shared.SignalWithStartWorkflow ExecutionStartToCloseTimeoutSeconds: t.ExecutionStartToCloseTimeoutSeconds, TaskStartToCloseTimeoutSeconds: t.TaskStartToCloseTimeoutSeconds, Identity: t.GetIdentity(), - RequestID: t.RequestId, + RequestID: t.GetRequestId(), WorkflowIDReusePolicy: ToWorkflowIDReusePolicy(t.WorkflowIdReusePolicy), SignalName: t.SignalName, SignalInput: t.SignalInput, @@ -4823,7 +4823,7 @@ func FromSignalWorkflowExecutionRequest(t *types.SignalWorkflowExecutionRequest) SignalName: t.SignalName, Input: t.Input, Identity: &t.Identity, - RequestId: t.RequestID, + RequestId: &t.RequestID, Control: t.Control, } } @@ -4839,7 +4839,7 @@ func ToSignalWorkflowExecutionRequest(t *shared.SignalWorkflowExecutionRequest) SignalName: t.SignalName, Input: t.Input, Identity: t.GetIdentity(), - RequestID: t.RequestId, + RequestID: t.GetRequestId(), Control: t.Control, } } @@ -5032,7 +5032,7 @@ func FromStartWorkflowExecutionRequest(t *types.StartWorkflowExecutionRequest) * ExecutionStartToCloseTimeoutSeconds: t.ExecutionStartToCloseTimeoutSeconds, TaskStartToCloseTimeoutSeconds: t.TaskStartToCloseTimeoutSeconds, Identity: &t.Identity, - RequestId: t.RequestID, + RequestId: &t.RequestID, WorkflowIdReusePolicy: FromWorkflowIDReusePolicy(t.WorkflowIDReusePolicy), RetryPolicy: FromRetryPolicy(t.RetryPolicy), CronSchedule: t.CronSchedule, @@ -5056,7 +5056,7 @@ func ToStartWorkflowExecutionRequest(t *shared.StartWorkflowExecutionRequest) *t ExecutionStartToCloseTimeoutSeconds: t.ExecutionStartToCloseTimeoutSeconds, TaskStartToCloseTimeoutSeconds: t.TaskStartToCloseTimeoutSeconds, Identity: t.GetIdentity(), - RequestID: t.RequestId, + RequestID: t.GetRequestId(), WorkflowIDReusePolicy: ToWorkflowIDReusePolicy(t.WorkflowIdReusePolicy), RetryPolicy: ToRetryPolicy(t.RetryPolicy), CronSchedule: t.CronSchedule, @@ -5717,7 +5717,7 @@ func FromWorkflowExecutionAlreadyStartedError(t *types.WorkflowExecutionAlreadyS } return &shared.WorkflowExecutionAlreadyStartedError{ Message: t.Message, - StartRequestId: t.StartRequestID, + StartRequestId: &t.StartRequestID, RunId: &t.RunID, } } @@ -5729,7 +5729,7 @@ func ToWorkflowExecutionAlreadyStartedError(t *shared.WorkflowExecutionAlreadySt } return &types.WorkflowExecutionAlreadyStartedError{ Message: t.Message, - StartRequestID: t.StartRequestId, + StartRequestID: t.GetStartRequestId(), RunID: t.GetRunId(), } } diff --git a/common/types/shared.go b/common/types/shared.go index dd8b7a6e9b9..1c98520ffff 100644 --- a/common/types/shared.go +++ b/common/types/shared.go @@ -364,7 +364,7 @@ func (v *ActivityTaskScheduledEventAttributes) GetHeader() (o *Header) { type ActivityTaskStartedEventAttributes struct { ScheduledEventID *int64 `json:"scheduledEventId,omitempty"` Identity string `json:"identity,omitempty"` - RequestID *string `json:"requestId,omitempty"` + RequestID string `json:"requestId,omitempty"` Attempt *int32 `json:"attempt,omitempty"` LastFailureReason *string `json:"lastFailureReason,omitempty"` LastFailureDetails []byte `json:"lastFailureDetails,omitempty"` @@ -388,8 +388,8 @@ func (v *ActivityTaskStartedEventAttributes) GetIdentity() (o string) { // GetRequestID is an internal getter (TBD...) func (v *ActivityTaskStartedEventAttributes) GetRequestID() (o string) { - if v != nil && v.RequestID != nil { - return *v.RequestID + if v != nil { + return v.RequestID } return } @@ -1966,9 +1966,9 @@ func (v *DecisionTaskScheduledEventAttributes) GetAttempt() (o int64) { // DecisionTaskStartedEventAttributes is an internal type (TBD...) type DecisionTaskStartedEventAttributes struct { - ScheduledEventID *int64 `json:"scheduledEventId,omitempty"` - Identity string `json:"identity,omitempty"` - RequestID *string `json:"requestId,omitempty"` + ScheduledEventID *int64 `json:"scheduledEventId,omitempty"` + Identity string `json:"identity,omitempty"` + RequestID string `json:"requestId,omitempty"` } // GetScheduledEventID is an internal getter (TBD...) @@ -1989,8 +1989,8 @@ func (v *DecisionTaskStartedEventAttributes) GetIdentity() (o string) { // GetRequestID is an internal getter (TBD...) func (v *DecisionTaskStartedEventAttributes) GetRequestID() (o string) { - if v != nil && v.RequestID != nil { - return *v.RequestID + if v != nil { + return v.RequestID } return } @@ -6275,7 +6275,7 @@ type RequestCancelWorkflowExecutionRequest struct { Domain string `json:"domain,omitempty"` WorkflowExecution *WorkflowExecution `json:"workflowExecution,omitempty"` Identity string `json:"identity,omitempty"` - RequestID *string `json:"requestId,omitempty"` + RequestID string `json:"requestId,omitempty"` } // GetDomain is an internal getter (TBD...) @@ -6304,8 +6304,8 @@ func (v *RequestCancelWorkflowExecutionRequest) GetIdentity() (o string) { // GetRequestID is an internal getter (TBD...) func (v *RequestCancelWorkflowExecutionRequest) GetRequestID() (o string) { - if v != nil && v.RequestID != nil { - return *v.RequestID + if v != nil { + return v.RequestID } return } @@ -6444,7 +6444,7 @@ type ResetWorkflowExecutionRequest struct { WorkflowExecution *WorkflowExecution `json:"workflowExecution,omitempty"` Reason *string `json:"reason,omitempty"` DecisionFinishEventID *int64 `json:"decisionFinishEventId,omitempty"` - RequestID *string `json:"requestId,omitempty"` + RequestID string `json:"requestId,omitempty"` SkipSignalReapply *bool `json:"skipSignalReapply,omitempty"` } @@ -6482,8 +6482,8 @@ func (v *ResetWorkflowExecutionRequest) GetDecisionFinishEventID() (o int64) { // GetRequestID is an internal getter (TBD...) func (v *ResetWorkflowExecutionRequest) GetRequestID() (o string) { - if v != nil && v.RequestID != nil { - return *v.RequestID + if v != nil { + return v.RequestID } return } @@ -7508,7 +7508,7 @@ type SignalWithStartWorkflowExecutionRequest struct { ExecutionStartToCloseTimeoutSeconds *int32 `json:"executionStartToCloseTimeoutSeconds,omitempty"` TaskStartToCloseTimeoutSeconds *int32 `json:"taskStartToCloseTimeoutSeconds,omitempty"` Identity string `json:"identity,omitempty"` - RequestID *string `json:"requestId,omitempty"` + RequestID string `json:"requestId,omitempty"` WorkflowIDReusePolicy *WorkflowIDReusePolicy `json:"workflowIdReusePolicy,omitempty"` SignalName *string `json:"signalName,omitempty"` SignalInput []byte `json:"signalInput,omitempty"` @@ -7586,8 +7586,8 @@ func (v *SignalWithStartWorkflowExecutionRequest) GetIdentity() (o string) { // GetRequestID is an internal getter (TBD...) func (v *SignalWithStartWorkflowExecutionRequest) GetRequestID() (o string) { - if v != nil && v.RequestID != nil { - return *v.RequestID + if v != nil { + return v.RequestID } return } @@ -7671,7 +7671,7 @@ type SignalWorkflowExecutionRequest struct { SignalName *string `json:"signalName,omitempty"` Input []byte `json:"input,omitempty"` Identity string `json:"identity,omitempty"` - RequestID *string `json:"requestId,omitempty"` + RequestID string `json:"requestId,omitempty"` Control []byte `json:"control,omitempty"` } @@ -7717,8 +7717,8 @@ func (v *SignalWorkflowExecutionRequest) GetIdentity() (o string) { // GetRequestID is an internal getter (TBD...) func (v *SignalWorkflowExecutionRequest) GetRequestID() (o string) { - if v != nil && v.RequestID != nil { - return *v.RequestID + if v != nil { + return v.RequestID } return } @@ -8139,7 +8139,7 @@ type StartWorkflowExecutionRequest struct { ExecutionStartToCloseTimeoutSeconds *int32 `json:"executionStartToCloseTimeoutSeconds,omitempty"` TaskStartToCloseTimeoutSeconds *int32 `json:"taskStartToCloseTimeoutSeconds,omitempty"` Identity string `json:"identity,omitempty"` - RequestID *string `json:"requestId,omitempty"` + RequestID string `json:"requestId,omitempty"` WorkflowIDReusePolicy *WorkflowIDReusePolicy `json:"workflowIdReusePolicy,omitempty"` RetryPolicy *RetryPolicy `json:"retryPolicy,omitempty"` CronSchedule *string `json:"cronSchedule,omitempty"` @@ -8214,8 +8214,8 @@ func (v *StartWorkflowExecutionRequest) GetIdentity() (o string) { // GetRequestID is an internal getter (TBD...) func (v *StartWorkflowExecutionRequest) GetRequestID() (o string) { - if v != nil && v.RequestID != nil { - return *v.RequestID + if v != nil { + return v.RequestID } return } @@ -9079,7 +9079,7 @@ func (v *WorkflowExecution) GetRunID() (o string) { // WorkflowExecutionAlreadyStartedError is an internal type (TBD...) type WorkflowExecutionAlreadyStartedError struct { Message *string `json:"message,omitempty"` - StartRequestID *string `json:"startRequestId,omitempty"` + StartRequestID string `json:"startRequestId,omitempty"` RunID string `json:"runId,omitempty"` } @@ -9093,8 +9093,8 @@ func (v *WorkflowExecutionAlreadyStartedError) GetMessage() (o string) { // GetStartRequestID is an internal getter (TBD...) func (v *WorkflowExecutionAlreadyStartedError) GetStartRequestID() (o string) { - if v != nil && v.StartRequestID != nil { - return *v.StartRequestID + if v != nil { + return v.StartRequestID } return } diff --git a/host/activity_test.go b/host/activity_test.go index cd5558747fb..77b466ce452 100644 --- a/host/activity_test.go +++ b/host/activity_test.go @@ -55,7 +55,7 @@ func (s *integrationSuite) TestActivityHeartBeatWorkflow_Success() { } request := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.domainName, WorkflowID: id, WorkflowType: workflowType, @@ -177,7 +177,7 @@ func (s *integrationSuite) TestActivityHeartbeatDetailsDuringRetry() { taskList.Name = tl request := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.domainName, WorkflowID: id, WorkflowType: workflowType, @@ -353,7 +353,7 @@ func (s *integrationSuite) TestActivityRetry() { taskList.Name = tl request := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.domainName, WorkflowID: id, WorkflowType: workflowType, @@ -566,7 +566,7 @@ func (s *integrationSuite) TestActivityHeartBeatWorkflow_Timeout() { taskList.Name = tl request := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.domainName, WorkflowID: id, WorkflowType: workflowType, @@ -669,7 +669,7 @@ func (s *integrationSuite) TestActivityTimeouts() { taskList.Name = tl request := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.domainName, WorkflowID: id, WorkflowType: workflowType, @@ -911,7 +911,7 @@ func (s *integrationSuite) TestActivityHeartbeatTimeouts() { taskList.Name = tl request := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.domainName, WorkflowID: id, WorkflowType: workflowType, @@ -1102,7 +1102,7 @@ func (s *integrationSuite) TestActivityCancellation() { taskList.Name = tl request := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.domainName, WorkflowID: id, WorkflowType: workflowType, @@ -1229,7 +1229,7 @@ func (s *integrationSuite) TestActivityCancellationNotStarted() { taskList.Name = tl request := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.domainName, WorkflowID: id, WorkflowType: workflowType, diff --git a/host/archival_test.go b/host/archival_test.go index df8787e210e..c4d7307ed20 100644 --- a/host/archival_test.go +++ b/host/archival_test.go @@ -219,7 +219,7 @@ func (s *integrationSuite) startAndFinishWorkflow(id, wt, tl, domain, domainID s Name: tl, } request := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: domain, WorkflowID: id, WorkflowType: workflowType, diff --git a/host/cancelworkflow_test.go b/host/cancelworkflow_test.go index dac59cb6995..c9e2465656e 100644 --- a/host/cancelworkflow_test.go +++ b/host/cancelworkflow_test.go @@ -47,7 +47,7 @@ func (s *integrationSuite) TestExternalRequestCancelWorkflowExecution() { taskList.Name = tl request := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.domainName, WorkflowID: id, WorkflowType: workflowType, @@ -184,7 +184,7 @@ func (s *integrationSuite) TestRequestCancelWorkflowDecisionExecution() { taskList.Name = tl request := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.domainName, WorkflowID: id, WorkflowType: workflowType, @@ -199,7 +199,7 @@ func (s *integrationSuite) TestRequestCancelWorkflowDecisionExecution() { s.Logger.Info("StartWorkflowExecution", tag.WorkflowRunID(we.RunID)) foreignRequest := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.foreignDomainName, WorkflowID: id, WorkflowType: workflowType, @@ -418,7 +418,7 @@ func (s *integrationSuite) TestRequestCancelWorkflowDecisionExecution_UnKnownTar taskList.Name = tl request := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.domainName, WorkflowID: id, WorkflowType: workflowType, diff --git a/host/continueasnew_test.go b/host/continueasnew_test.go index 3a2db1465e0..d93e3199ecb 100644 --- a/host/continueasnew_test.go +++ b/host/continueasnew_test.go @@ -56,7 +56,7 @@ func (s *integrationSuite) TestContinueAsNewWorkflow() { } request := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.domainName, WorkflowID: id, WorkflowType: workflowType, @@ -152,7 +152,7 @@ func (s *integrationSuite) TestContinueAsNewWorkflow_Timeout() { taskList.Name = tl request := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.domainName, WorkflowID: id, WorkflowType: workflowType, @@ -257,7 +257,7 @@ func (s *integrationSuite) TestWorkflowContinueAsNew_TaskID() { taskList.Name = tl request := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.domainName, WorkflowID: id, WorkflowType: workflowType, @@ -352,7 +352,7 @@ func (s *integrationSuite) TestChildWorkflowWithContinueAsNew() { taskList.Name = tl request := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.domainName, WorkflowID: parentID, WorkflowType: parentWorkflowType, diff --git a/host/decision_test.go b/host/decision_test.go index 131ad644773..af1474cfdb6 100644 --- a/host/decision_test.go +++ b/host/decision_test.go @@ -50,7 +50,7 @@ func (s *integrationSuite) TestDecisionHeartbeatingWithEmptyResult() { } request := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.domainName, WorkflowID: id, WorkflowType: workflowType, @@ -157,7 +157,7 @@ func (s *integrationSuite) TestDecisionHeartbeatingWithLocalActivitiesResult() { } request := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.domainName, WorkflowID: id, WorkflowType: workflowType, @@ -295,7 +295,7 @@ func (s *integrationSuite) TestWorkflowTerminationSignalBeforeRegularDecisionSta taskList.Name = tl request := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.domainName, WorkflowID: id, WorkflowType: workflowType, @@ -322,7 +322,7 @@ func (s *integrationSuite) TestWorkflowTerminationSignalBeforeRegularDecisionSta SignalName: common.StringPtr("sig-for-integ-test"), Input: []byte(""), Identity: "integ test", - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), }) s.Nil(err0) s.assertLastHistoryEvent(we, 3, types.EventTypeWorkflowExecutionSignaled) @@ -370,7 +370,7 @@ func (s *integrationSuite) TestWorkflowTerminationSignalAfterRegularDecisionStar taskList.Name = tl request := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.domainName, WorkflowID: id, WorkflowType: workflowType, @@ -408,7 +408,7 @@ func (s *integrationSuite) TestWorkflowTerminationSignalAfterRegularDecisionStar SignalName: common.StringPtr("sig-for-integ-test"), Input: []byte(""), Identity: "integ test", - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), }) s.Nil(err0) s.assertLastHistoryEvent(we, 3, types.EventTypeDecisionTaskStarted) @@ -445,7 +445,7 @@ func (s *integrationSuite) TestWorkflowTerminationSignalAfterRegularDecisionStar taskList.Name = tl request := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.domainName, WorkflowID: id, WorkflowType: workflowType, @@ -485,7 +485,7 @@ func (s *integrationSuite) TestWorkflowTerminationSignalAfterRegularDecisionStar SignalName: common.StringPtr("sig-for-integ-test"), Input: []byte(""), Identity: "integ test", - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), }) s.Nil(err0) s.assertLastHistoryEvent(we, 3, types.EventTypeDecisionTaskStarted) @@ -532,7 +532,7 @@ func (s *integrationSuite) TestWorkflowTerminationSignalBeforeTransientDecisionS taskList.Name = tl request := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.domainName, WorkflowID: id, WorkflowType: workflowType, @@ -586,7 +586,7 @@ func (s *integrationSuite) TestWorkflowTerminationSignalBeforeTransientDecisionS SignalName: common.StringPtr("sig-for-integ-test"), Input: []byte(""), Identity: "integ test", - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), }) s.Nil(err0) s.assertLastHistoryEvent(we, 5, types.EventTypeWorkflowExecutionSignaled) @@ -637,7 +637,7 @@ func (s *integrationSuite) TestWorkflowTerminationSignalAfterTransientDecisionSt taskList.Name = tl request := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.domainName, WorkflowID: id, WorkflowType: workflowType, @@ -702,7 +702,7 @@ func (s *integrationSuite) TestWorkflowTerminationSignalAfterTransientDecisionSt SignalName: common.StringPtr("sig-for-integ-test"), Input: []byte(""), Identity: "integ test", - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), }) s.Nil(err0) s.assertLastHistoryEvent(we, 4, types.EventTypeDecisionTaskFailed) @@ -739,7 +739,7 @@ func (s *integrationSuite) TestWorkflowTerminationSignalAfterTransientDecisionSt taskList.Name = tl request := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.domainName, WorkflowID: id, WorkflowType: workflowType, @@ -804,7 +804,7 @@ func (s *integrationSuite) TestWorkflowTerminationSignalAfterTransientDecisionSt SignalName: common.StringPtr("sig-for-integ-test"), Input: []byte(""), Identity: "integ test", - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), }) s.Nil(err0) s.assertLastHistoryEvent(we, 4, types.EventTypeDecisionTaskFailed) diff --git a/host/elasticsearch_test.go b/host/elasticsearch_test.go index f2761d4da2b..db95e3bc424 100644 --- a/host/elasticsearch_test.go +++ b/host/elasticsearch_test.go @@ -288,14 +288,14 @@ func (s *elasticsearchIntegrationSuite) TestListWorkflow_OrQuery() { we1, err := s.engine.StartWorkflowExecution(createContext(), request) s.Nil(err) - request.RequestID = common.StringPtr(uuid.New()) + request.RequestID = uuid.New() request.WorkflowID = id + "-2" attrValBytes, _ = json.Marshal(2) searchAttr.IndexedFields[key] = attrValBytes we2, err := s.engine.StartWorkflowExecution(createContext(), request) s.Nil(err) - request.RequestID = common.StringPtr(uuid.New()) + request.RequestID = uuid.New() request.WorkflowID = id + "-3" attrValBytes, _ = json.Marshal(3) searchAttr.IndexedFields[key] = attrValBytes @@ -385,7 +385,7 @@ func (s *elasticsearchIntegrationSuite) TestListWorkflow_MaxWindowSize() { startRequest := s.createStartWorkflowExecutionRequest(id, wt, tl) for i := 0; i < defaultTestValueOfESIndexMaxResultWindow; i++ { - startRequest.RequestID = common.StringPtr(uuid.New()) + startRequest.RequestID = uuid.New() startRequest.WorkflowID = id + strconv.Itoa(i) _, err := s.engine.StartWorkflowExecution(createContext(), startRequest) s.Nil(err) @@ -430,7 +430,7 @@ func (s *elasticsearchIntegrationSuite) TestListWorkflow_OrderBy() { startRequest := s.createStartWorkflowExecutionRequest(id, wt, tl) for i := 0; i < defaultTestValueOfESIndexMaxResultWindow+1; i++ { // start 6 - startRequest.RequestID = common.StringPtr(uuid.New()) + startRequest.RequestID = uuid.New() startRequest.WorkflowID = id + strconv.Itoa(i) if i < defaultTestValueOfESIndexMaxResultWindow-1 { // 4 workflow has search attr @@ -561,7 +561,7 @@ func (s *elasticsearchIntegrationSuite) testListWorkflowHelper(numOfWorkflows, p // start enough number of workflows for i := 0; i < numOfWorkflows; i++ { - startRequest.RequestID = common.StringPtr(uuid.New()) + startRequest.RequestID = uuid.New() startRequest.WorkflowID = wid + strconv.Itoa(i) _, err := s.engine.StartWorkflowExecution(createContext(), startRequest) s.Nil(err) @@ -674,7 +674,7 @@ func (s *elasticsearchIntegrationSuite) TestScanWorkflow() { taskList.Name = tl request := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.domainName, WorkflowID: id, WorkflowType: workflowType, @@ -788,7 +788,7 @@ func (s *elasticsearchIntegrationSuite) createStartWorkflowExecutionRequest(id, taskList.Name = tl request := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.domainName, WorkflowID: id, WorkflowType: workflowType, @@ -814,7 +814,7 @@ func (s *elasticsearchIntegrationSuite) TestUpsertWorkflowExecution() { taskList.Name = tl request := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.domainName, WorkflowID: id, WorkflowType: workflowType, @@ -1015,7 +1015,7 @@ func (s *elasticsearchIntegrationSuite) TestUpsertWorkflowExecution_InvalidKey() taskList.Name = tl request := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.domainName, WorkflowID: id, WorkflowType: workflowType, diff --git a/host/integration_test.go b/host/integration_test.go index 0f6dbf44689..5da50f00788 100644 --- a/host/integration_test.go +++ b/host/integration_test.go @@ -86,7 +86,7 @@ func (s *integrationSuite) TestStartWorkflowExecution() { taskList.Name = tl request := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.domainName, WorkflowID: id, WorkflowType: workflowType, @@ -105,7 +105,7 @@ func (s *integrationSuite) TestStartWorkflowExecution() { s.Equal(we0.RunID, we1.RunID) newRequest := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.domainName, WorkflowID: id, WorkflowType: workflowType, @@ -136,7 +136,7 @@ func (s *integrationSuite) TestStartWorkflowExecution_IDReusePolicy() { createStartRequest := func(policy types.WorkflowIDReusePolicy) *types.StartWorkflowExecutionRequest { return &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.domainName, WorkflowID: id, WorkflowType: workflowType, @@ -296,7 +296,7 @@ func (s *integrationSuite) TestTerminateWorkflow() { taskList.Name = tl request := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.domainName, WorkflowID: id, WorkflowType: workflowType, @@ -413,7 +413,7 @@ GetHistoryLoop: StartNewExecutionLoop: for i := 0; i < 10; i++ { request := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.domainName, WorkflowID: id, WorkflowType: workflowType, @@ -454,7 +454,7 @@ func (s *integrationSuite) TestSequentialWorkflow() { taskList.Name = tl request := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.domainName, WorkflowID: id, WorkflowType: workflowType, @@ -563,7 +563,7 @@ func (s *integrationSuite) TestCompleteDecisionTaskAndCreateNewOne() { taskList.Name = tl request := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.domainName, WorkflowID: id, WorkflowType: workflowType, @@ -648,7 +648,7 @@ func (s *integrationSuite) TestDecisionAndActivityTimeoutsWorkflow() { taskList.Name = tl request := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.domainName, WorkflowID: id, WorkflowType: workflowType, @@ -773,7 +773,7 @@ func (s *integrationSuite) TestWorkflowRetry() { backoffCoefficient := 1.5 maximumAttempts := 5 request := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.domainName, WorkflowID: id, WorkflowType: workflowType, @@ -911,7 +911,7 @@ func (s *integrationSuite) TestWorkflowRetryFailures() { // Fail using attempt request := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.domainName, WorkflowID: id, WorkflowType: workflowType, @@ -967,7 +967,7 @@ func (s *integrationSuite) TestWorkflowRetryFailures() { // Fail error reason request = &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.domainName, WorkflowID: id, WorkflowType: workflowType, @@ -1035,7 +1035,7 @@ func (s *integrationSuite) TestCronWorkflow() { } request := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.domainName, WorkflowID: id, WorkflowType: workflowType, @@ -1242,7 +1242,7 @@ func (s *integrationSuite) TestCronWorkflowTimeout() { } request := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.domainName, WorkflowID: id, WorkflowType: workflowType, @@ -1336,7 +1336,7 @@ func (s *integrationSuite) TestSequential_UserTimers() { taskList.Name = tl request := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.domainName, WorkflowID: id, WorkflowType: workflowType, @@ -1416,7 +1416,7 @@ func (s *integrationSuite) TestRateLimitBufferedEvents() { // Start workflow execution request := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.domainName, WorkflowID: id, WorkflowType: workflowType, @@ -1514,7 +1514,7 @@ func (s *integrationSuite) TestBufferedEvents() { // Start workflow execution request := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.domainName, WorkflowID: id, WorkflowType: workflowType, @@ -1633,7 +1633,7 @@ func (s *integrationSuite) TestDescribeWorkflowExecution() { // Start workflow execution request := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.domainName, WorkflowID: id, WorkflowType: workflowType, @@ -1763,7 +1763,7 @@ func (s *integrationSuite) TestVisibility() { taskList.Name = tl startRequest := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.domainName, WorkflowID: id1, WorkflowType: workflowType, @@ -1825,7 +1825,7 @@ func (s *integrationSuite) TestVisibility() { } startRequest = &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.domainName, WorkflowID: id2, WorkflowType: workflowType, @@ -1907,7 +1907,7 @@ func (s *integrationSuite) TestChildWorkflowExecution() { } request := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.domainName, WorkflowID: parentID, WorkflowType: parentWorkflowType, @@ -2093,7 +2093,7 @@ func (s *integrationSuite) TestCronChildWorkflowExecution() { taskListChild.Name = tlChild request := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.domainName, WorkflowID: parentID, WorkflowType: parentWorkflowType, @@ -2290,7 +2290,7 @@ func (s *integrationSuite) TestWorkflowTimeout() { taskList.Name = tl request := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.domainName, WorkflowID: id, WorkflowType: workflowType, @@ -2373,7 +2373,7 @@ func (s *integrationSuite) TestDecisionTaskFailed() { // Start workflow execution request := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.domainName, WorkflowID: id, WorkflowType: workflowType, @@ -2576,7 +2576,7 @@ func (s *integrationSuite) TestDescribeTaskList() { // Start workflow execution request := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.domainName, WorkflowID: WorkflowID, WorkflowType: workflowType, @@ -2701,7 +2701,7 @@ func (s *integrationSuite) TestTransientDecisionTimeout() { // Start workflow execution request := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.domainName, WorkflowID: id, WorkflowType: workflowType, @@ -2794,7 +2794,7 @@ func (s *integrationSuite) TestNoTransientDecisionAfterFlushBufferedEvents() { // Start workflow execution request := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.domainName, WorkflowID: id, WorkflowType: workflowType, @@ -2891,7 +2891,7 @@ func (s *integrationSuite) TestRelayDecisionTimeout() { // Start workflow execution request := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.domainName, WorkflowID: id, WorkflowType: workflowType, @@ -2993,7 +2993,7 @@ func (s *integrationSuite) TestTaskProcessingProtectionForRateLimitError() { // Start workflow execution request := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.domainName, WorkflowID: id, WorkflowType: workflowType, @@ -3115,7 +3115,7 @@ func (s *integrationSuite) TestStickyTimeout_NonTransientDecision() { // Start workflow execution request := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.domainName, WorkflowID: id, WorkflowType: workflowType, @@ -3162,7 +3162,7 @@ func (s *integrationSuite) TestStickyTimeout_NonTransientDecision() { SignalName: common.StringPtr("signalB"), Input: []byte("signal input"), Identity: identity, - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), }) s.Nil(err) }*/ @@ -3200,7 +3200,7 @@ func (s *integrationSuite) TestStickyTimeout_NonTransientDecision() { SignalName: common.StringPtr("signalA"), Input: []byte("signal input"), Identity: identity, - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), }) // Wait for decision timeout @@ -3231,7 +3231,7 @@ WaitForStickyTimeoutLoop: SignalName: common.StringPtr("signalB"), Input: []byte("signal input"), Identity: identity, - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), }) s.Nil(err) @@ -3289,7 +3289,7 @@ func (s *integrationSuite) TestStickyTasklistResetThenTimeout() { // Start workflow execution request := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.domainName, WorkflowID: id, WorkflowType: workflowType, @@ -3362,7 +3362,7 @@ func (s *integrationSuite) TestStickyTasklistResetThenTimeout() { SignalName: common.StringPtr("signalA"), Input: []byte("signal input"), Identity: identity, - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), }) //Reset sticky tasklist before sticky decision task starts @@ -3399,7 +3399,7 @@ WaitForStickyTimeoutLoop: SignalName: common.StringPtr("signalB"), Input: []byte("signal input"), Identity: identity, - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), }) s.Nil(err) @@ -3449,7 +3449,7 @@ func (s *integrationSuite) TestBufferedEventsOutOfOrder() { // Start workflow execution request := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.domainName, WorkflowID: id, WorkflowType: workflowType, @@ -3617,7 +3617,7 @@ func (s *integrationSuite) TestStartWithMemo() { } request := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.domainName, WorkflowID: id, WorkflowType: workflowType, @@ -3657,7 +3657,7 @@ func (s *integrationSuite) TestSignalWithStartWithMemo() { signalName := "my signal" signalInput := []byte("my signal input.") request := &types.SignalWithStartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.domainName, WorkflowID: id, WorkflowType: workflowType, @@ -3690,7 +3690,7 @@ func (s *integrationSuite) TestCancelTimer() { taskList.Name = tl request := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.domainName, WorkflowID: id, WorkflowType: workflowType, @@ -3827,7 +3827,7 @@ func (s *integrationSuite) TestCancelTimer_CancelFiredAndBuffered() { taskList.Name = tl request := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.domainName, WorkflowID: id, WorkflowType: workflowType, diff --git a/host/ndc/nDC_integration_test.go b/host/ndc/nDC_integration_test.go index ac494aac8ff..03a7d19fcd3 100644 --- a/host/ndc/nDC_integration_test.go +++ b/host/ndc/nDC_integration_test.go @@ -405,7 +405,7 @@ func (s *nDCIntegrationTestSuite) TestHandcraftedMultipleBranches() { DecisionTaskStartedEventAttributes: &types.DecisionTaskStartedEventAttributes{ ScheduledEventID: common.Int64Ptr(2), Identity: identity, - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), }, }, }}, @@ -455,7 +455,7 @@ func (s *nDCIntegrationTestSuite) TestHandcraftedMultipleBranches() { ActivityTaskStartedEventAttributes: &types.ActivityTaskStartedEventAttributes{ ScheduledEventID: common.Int64Ptr(6), Identity: identity, - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Attempt: common.Int32Ptr(0), }, }, @@ -490,7 +490,7 @@ func (s *nDCIntegrationTestSuite) TestHandcraftedMultipleBranches() { DecisionTaskStartedEventAttributes: &types.DecisionTaskStartedEventAttributes{ ScheduledEventID: common.Int64Ptr(9), Identity: identity, - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), }, }, }}, @@ -532,7 +532,7 @@ func (s *nDCIntegrationTestSuite) TestHandcraftedMultipleBranches() { DecisionTaskStartedEventAttributes: &types.DecisionTaskStartedEventAttributes{ ScheduledEventID: common.Int64Ptr(13), Identity: identity, - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), }, }, }}, @@ -592,7 +592,7 @@ func (s *nDCIntegrationTestSuite) TestHandcraftedMultipleBranches() { DecisionTaskStartedEventAttributes: &types.DecisionTaskStartedEventAttributes{ ScheduledEventID: common.Int64Ptr(17), Identity: identity, - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), }, }, }}, @@ -710,7 +710,7 @@ func (s *nDCIntegrationTestSuite) TestHandcraftedMultipleBranchesWithZombieConti DecisionTaskStartedEventAttributes: &types.DecisionTaskStartedEventAttributes{ ScheduledEventID: common.Int64Ptr(2), Identity: identity, - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), }, }, }}, @@ -760,7 +760,7 @@ func (s *nDCIntegrationTestSuite) TestHandcraftedMultipleBranchesWithZombieConti ActivityTaskStartedEventAttributes: &types.ActivityTaskStartedEventAttributes{ ScheduledEventID: common.Int64Ptr(6), Identity: identity, - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Attempt: common.Int32Ptr(0), }, }, @@ -795,7 +795,7 @@ func (s *nDCIntegrationTestSuite) TestHandcraftedMultipleBranchesWithZombieConti DecisionTaskStartedEventAttributes: &types.DecisionTaskStartedEventAttributes{ ScheduledEventID: common.Int64Ptr(9), Identity: identity, - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), }, }, }}, @@ -837,7 +837,7 @@ func (s *nDCIntegrationTestSuite) TestHandcraftedMultipleBranchesWithZombieConti DecisionTaskStartedEventAttributes: &types.DecisionTaskStartedEventAttributes{ ScheduledEventID: common.Int64Ptr(13), Identity: identity, - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), }, }, }}, @@ -1177,7 +1177,7 @@ func (s *nDCIntegrationTestSuite) TestAdminGetWorkflowExecutionRawHistoryV2() { DecisionTaskStartedEventAttributes: &types.DecisionTaskStartedEventAttributes{ ScheduledEventID: common.Int64Ptr(2), Identity: identity, - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), }, }, }}, @@ -1227,7 +1227,7 @@ func (s *nDCIntegrationTestSuite) TestAdminGetWorkflowExecutionRawHistoryV2() { ActivityTaskStartedEventAttributes: &types.ActivityTaskStartedEventAttributes{ ScheduledEventID: common.Int64Ptr(6), Identity: identity, - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Attempt: common.Int32Ptr(0), }, }, @@ -1262,7 +1262,7 @@ func (s *nDCIntegrationTestSuite) TestAdminGetWorkflowExecutionRawHistoryV2() { DecisionTaskStartedEventAttributes: &types.DecisionTaskStartedEventAttributes{ ScheduledEventID: common.Int64Ptr(9), Identity: identity, - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), }, }, }}, @@ -1304,7 +1304,7 @@ func (s *nDCIntegrationTestSuite) TestAdminGetWorkflowExecutionRawHistoryV2() { DecisionTaskStartedEventAttributes: &types.DecisionTaskStartedEventAttributes{ ScheduledEventID: common.Int64Ptr(13), Identity: identity, - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), }, }, }}, @@ -1382,7 +1382,7 @@ func (s *nDCIntegrationTestSuite) TestAdminGetWorkflowExecutionRawHistoryV2() { DecisionTaskStartedEventAttributes: &types.DecisionTaskStartedEventAttributes{ ScheduledEventID: common.Int64Ptr(17), Identity: identity, - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), }, }, }}, diff --git a/host/queryworkflow_test.go b/host/queryworkflow_test.go index 5d3b1e60d57..9294506019f 100644 --- a/host/queryworkflow_test.go +++ b/host/queryworkflow_test.go @@ -56,7 +56,7 @@ func (s *integrationSuite) TestQueryWorkflow_Sticky() { // Start workflow execution request := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.domainName, WorkflowID: id, WorkflowType: workflowType, @@ -219,7 +219,7 @@ func (s *integrationSuite) TestQueryWorkflow_StickyTimeout() { // Start workflow execution request := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.domainName, WorkflowID: id, WorkflowType: workflowType, @@ -363,7 +363,7 @@ func (s *integrationSuite) TestQueryWorkflow_NonSticky() { // Start workflow execution request := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.domainName, WorkflowID: id, WorkflowType: workflowType, @@ -570,7 +570,7 @@ func (s *integrationSuite) TestQueryWorkflow_Consistent_PiggybackQuery() { // Start workflow execution request := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.domainName, WorkflowID: id, WorkflowType: workflowType, @@ -755,7 +755,7 @@ func (s *integrationSuite) TestQueryWorkflow_Consistent_Timeout() { // Start workflow execution request := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.domainName, WorkflowID: id, WorkflowType: workflowType, @@ -916,7 +916,7 @@ func (s *integrationSuite) TestQueryWorkflow_Consistent_BlockedByStarted_NonStic // Start workflow execution request := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.domainName, WorkflowID: id, WorkflowType: workflowType, @@ -1105,7 +1105,7 @@ func (s *integrationSuite) TestQueryWorkflow_Consistent_NewDecisionTask_Sticky() // Start workflow execution request := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.domainName, WorkflowID: id, WorkflowType: workflowType, @@ -1318,7 +1318,7 @@ func (s *integrationSuite) TestQueryWorkflow_BeforeFirstDecision() { // Start workflow execution request := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.domainName, WorkflowID: id, WorkflowType: workflowType, diff --git a/host/resetworkflow_test.go b/host/resetworkflow_test.go index 3a10293c280..4ebee9ad0c9 100644 --- a/host/resetworkflow_test.go +++ b/host/resetworkflow_test.go @@ -45,7 +45,7 @@ func (s *integrationSuite) TestResetWorkflow() { // Start workflow execution request := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.domainName, WorkflowID: id, WorkflowType: workflowType, @@ -171,7 +171,7 @@ func (s *integrationSuite) TestResetWorkflow() { }, Reason: common.StringPtr("reset execution from test"), DecisionFinishEventID: common.Int64Ptr(lastDecisionCompleted.GetEventID()), - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), }) s.NoError(err) @@ -209,7 +209,7 @@ func (s *integrationSuite) TestResetWorkflow() { }, Reason: common.StringPtr("reset execution from test"), DecisionFinishEventID: common.Int64Ptr(lastDecisionCompleted.GetEventID()), - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), }) s.NoError(err) newRunID := resp.GetRunID() @@ -242,7 +242,7 @@ func (s *integrationSuite) TestResetWorkflow() { }, Reason: common.StringPtr("reset execution from test"), DecisionFinishEventID: common.Int64Ptr(lastDecisionCompleted.GetEventID()), - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), }) s.NoError(err) } @@ -259,7 +259,7 @@ func (s *integrationSuite) TestResetWorkflow_NoDecisionTaskCompleted() { // Start workflow execution request := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.domainName, WorkflowID: id, WorkflowType: workflowType, @@ -294,7 +294,7 @@ func (s *integrationSuite) TestResetWorkflow_NoDecisionTaskCompleted() { }, Reason: common.StringPtr("reset execution from test"), DecisionFinishEventID: common.Int64Ptr(lastDecisionScheduled.GetEventID() + 1), - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), }) s.NoError(err) @@ -319,7 +319,7 @@ func (s *integrationSuite) TestResetWorkflow_NoDecisionTaskCompleted() { }, Reason: common.StringPtr("reset execution from test"), DecisionFinishEventID: common.Int64Ptr(lastDecisionScheduled.GetEventID() + 1), - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), }) s.NoError(err) diff --git a/host/signalworkflow_test.go b/host/signalworkflow_test.go index ee37fcf5f72..873de592bf7 100644 --- a/host/signalworkflow_test.go +++ b/host/signalworkflow_test.go @@ -67,7 +67,7 @@ func (s *integrationSuite) TestSignalWorkflow() { // Start workflow execution request := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.domainName, WorkflowID: id, WorkflowType: workflowType, @@ -243,7 +243,7 @@ func (s *integrationSuite) TestSignalWorkflow_DuplicateRequest() { // Start workflow execution request := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.domainName, WorkflowID: id, WorkflowType: workflowType, @@ -341,7 +341,7 @@ func (s *integrationSuite) TestSignalWorkflow_DuplicateRequest() { SignalName: common.StringPtr(signalName), Input: signalInput, Identity: identity, - RequestID: common.StringPtr(RequestID), + RequestID: RequestID, } err = s.engine.SignalWorkflowExecution(createContext(), signalReqest) s.Nil(err) @@ -386,7 +386,7 @@ func (s *integrationSuite) TestSignalExternalWorkflowDecision() { taskList.Name = tl request := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.domainName, WorkflowID: id, WorkflowType: workflowType, @@ -402,7 +402,7 @@ func (s *integrationSuite) TestSignalExternalWorkflowDecision() { s.Logger.Info("StartWorkflowExecution", tag.WorkflowRunID(we.RunID)) foreignRequest := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.foreignDomainName, WorkflowID: id, WorkflowType: workflowType, @@ -605,7 +605,7 @@ func (s *integrationSuite) TestSignalWorkflow_Cron_NoDecisionTaskCreated() { // Start workflow execution request := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.domainName, WorkflowID: id, WorkflowType: workflowType, @@ -683,7 +683,7 @@ func (s *integrationSuite) TestSignalExternalWorkflowDecision_WithoutRunID() { taskList.Name = tl request := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.domainName, WorkflowID: id, WorkflowType: workflowType, @@ -699,7 +699,7 @@ func (s *integrationSuite) TestSignalExternalWorkflowDecision_WithoutRunID() { s.Logger.Info("StartWorkflowExecution", tag.WorkflowRunID(we.RunID)) foreignRequest := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.foreignDomainName, WorkflowID: id, WorkflowType: workflowType, @@ -900,7 +900,7 @@ func (s *integrationSuite) TestSignalExternalWorkflowDecision_UnKnownTarget() { taskList.Name = tl request := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.domainName, WorkflowID: id, WorkflowType: workflowType, @@ -1027,7 +1027,7 @@ func (s *integrationSuite) TestSignalExternalWorkflowDecision_SignalSelf() { taskList.Name = tl request := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.domainName, WorkflowID: id, WorkflowType: workflowType, @@ -1160,7 +1160,7 @@ func (s *integrationSuite) TestSignalWithStartWorkflow() { // Start a workflow request := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.domainName, WorkflowID: id, WorkflowType: workflowType, @@ -1264,7 +1264,7 @@ func (s *integrationSuite) TestSignalWithStartWorkflow() { signalInput := []byte("my signal input.") wfIDReusePolicy := types.WorkflowIDReusePolicyAllowDuplicate sRequest := &types.SignalWithStartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.domainName, WorkflowID: id, WorkflowType: workflowType, @@ -1423,7 +1423,7 @@ func (s *integrationSuite) TestSignalWithStartWorkflow_IDReusePolicy() { // Start a workflow request := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.domainName, WorkflowID: id, WorkflowType: workflowType, @@ -1503,7 +1503,7 @@ func (s *integrationSuite) TestSignalWithStartWorkflow_IDReusePolicy() { signalInput := []byte("my signal input.") wfIDReusePolicy := types.WorkflowIDReusePolicyRejectDuplicate sRequest := &types.SignalWithStartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.domainName, WorkflowID: id, WorkflowType: workflowType, @@ -1562,7 +1562,7 @@ func (s *integrationSuite) TestSignalWithStartWorkflow_IDReusePolicy() { // test policy WorkflowIDReusePolicyTerminateIfRunning wfIDReusePolicy = types.WorkflowIDReusePolicyTerminateIfRunning - sRequest.RequestID = common.StringPtr(uuid.New()) + sRequest.RequestID = uuid.New() resp1, err1 := s.engine.SignalWithStartWorkflowExecution(createContext(), sRequest) s.Nil(err1) s.NotEmpty(resp1) @@ -1598,7 +1598,7 @@ GetHistoryLoop: // terminate current run terminateWorkflow() // test clean start with WorkflowIDReusePolicyTerminateIfRunning - sRequest.RequestID = common.StringPtr(uuid.New()) + sRequest.RequestID = uuid.New() resp2, err2 := s.engine.SignalWithStartWorkflowExecution(createContext(), sRequest) s.Nil(err2) s.NotEmpty(resp2) diff --git a/host/sizelimit_test.go b/host/sizelimit_test.go index d468df08706..5feff2a6ad1 100644 --- a/host/sizelimit_test.go +++ b/host/sizelimit_test.go @@ -77,7 +77,7 @@ func (s *sizeLimitIntegrationSuite) TestTerminateWorkflowCausedBySizeLimit() { taskList.Name = tl request := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: s.domainName, WorkflowID: id, WorkflowType: workflowType, diff --git a/host/xdc/elasticsearch_test.go b/host/xdc/elasticsearch_test.go index cfcf8735cc9..1616d632175 100644 --- a/host/xdc/elasticsearch_test.go +++ b/host/xdc/elasticsearch_test.go @@ -181,7 +181,7 @@ func (s *esCrossDCTestSuite) TestSearchAttributes() { }, } startReq := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: domainName, WorkflowID: id, WorkflowType: workflowType, diff --git a/host/xdc/integration_failover_test.go b/host/xdc/integration_failover_test.go index 4c803e15318..22d24a5e983 100644 --- a/host/xdc/integration_failover_test.go +++ b/host/xdc/integration_failover_test.go @@ -192,7 +192,7 @@ func (s *integrationClustersTestSuite) TestDomainFailover() { workflowType := &types.WorkflowType{Name: wt} taskList := &types.TaskList{Name: tl} startReq := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: domainName, WorkflowID: id, WorkflowType: workflowType, @@ -250,7 +250,7 @@ func (s *integrationClustersTestSuite) TestSimpleWorkflowFailover() { workflowType := &types.WorkflowType{Name: wt} taskList := &types.TaskList{Name: tl} startReq := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: domainName, WorkflowID: id, WorkflowType: workflowType, @@ -552,7 +552,7 @@ func (s *integrationClustersTestSuite) TestStickyDecisionFailover() { stickyTaskList2 := &types.TaskList{Name: stl2} stickyTaskTimeout := common.Int32Ptr(100) startReq := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: domainName, WorkflowID: id, WorkflowType: workflowType, @@ -724,7 +724,7 @@ func (s *integrationClustersTestSuite) TestStartWorkflowExecution_Failover_Workf workflowType := &types.WorkflowType{Name: wt} taskList := &types.TaskList{Name: tl} startReq := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: domainName, WorkflowID: id, WorkflowType: workflowType, @@ -798,21 +798,21 @@ func (s *integrationClustersTestSuite) TestStartWorkflowExecution_Failover_Workf time.Sleep(cacheRefreshInterval) // start the same workflow in cluster 2 is not allowed if policy is AllowDuplicateFailedOnly - startReq.RequestID = common.StringPtr(uuid.New()) + startReq.RequestID = uuid.New() startReq.WorkflowIDReusePolicy = types.WorkflowIDReusePolicyAllowDuplicateFailedOnly.Ptr() we, err = client2.StartWorkflowExecution(createContext(), startReq) s.IsType(&types.WorkflowExecutionAlreadyStartedError{}, err) s.Nil(we) // start the same workflow in cluster 2 is not allowed if policy is RejectDuplicate - startReq.RequestID = common.StringPtr(uuid.New()) + startReq.RequestID = uuid.New() startReq.WorkflowIDReusePolicy = types.WorkflowIDReusePolicyRejectDuplicate.Ptr() we, err = client2.StartWorkflowExecution(createContext(), startReq) s.IsType(&types.WorkflowExecutionAlreadyStartedError{}, err) s.Nil(we) // start the workflow in cluster 2 - startReq.RequestID = common.StringPtr(uuid.New()) + startReq.RequestID = uuid.New() startReq.WorkflowIDReusePolicy = types.WorkflowIDReusePolicyAllowDuplicate.Ptr() we, err = client2.StartWorkflowExecution(createContext(), startReq) s.Nil(err) @@ -857,7 +857,7 @@ func (s *integrationClustersTestSuite) TestTerminateFailover() { workflowType := &types.WorkflowType{Name: wt} taskList := &types.TaskList{Name: tl} startReq := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: domainName, WorkflowID: id, WorkflowType: workflowType, @@ -1042,7 +1042,7 @@ func (s *integrationClustersTestSuite) TestContinueAsNewFailover() { workflowType := &types.WorkflowType{Name: wt} taskList := &types.TaskList{Name: tl} startReq := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: domainName, WorkflowID: id, WorkflowType: workflowType, @@ -1180,7 +1180,7 @@ func (s *integrationClustersTestSuite) TestSignalFailover() { workflowType := &types.WorkflowType{Name: wt} taskList := &types.TaskList{Name: tl} startReq := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: domainName, WorkflowID: id, WorkflowType: workflowType, @@ -1361,7 +1361,7 @@ func (s *integrationClustersTestSuite) TestUserTimerFailover() { workflowType := &types.WorkflowType{Name: wt} taskList := &types.TaskList{Name: tl} startReq := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: domainName, WorkflowID: id, WorkflowType: workflowType, @@ -1534,7 +1534,7 @@ func (s *integrationClustersTestSuite) TestActivityHeartbeatFailover() { workflowType := &types.WorkflowType{Name: wt} taskList := &types.TaskList{Name: tl} startReq := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: domainName, WorkflowID: id, WorkflowType: workflowType, @@ -1743,7 +1743,7 @@ func (s *integrationClustersTestSuite) TestTransientDecisionFailover() { workflowType := &types.WorkflowType{Name: wt} taskList := &types.TaskList{Name: tl} startReq := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: domainName, WorkflowID: id, WorkflowType: workflowType, @@ -1864,7 +1864,7 @@ func (s *integrationClustersTestSuite) TestCronWorkflowFailover() { workflowType := &types.WorkflowType{Name: wt} taskList := &types.TaskList{Name: tl} startReq := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: domainName, WorkflowID: id, WorkflowType: workflowType, @@ -1964,7 +1964,7 @@ func (s *integrationClustersTestSuite) TestWorkflowRetryFailover() { workflowType := &types.WorkflowType{Name: wt} taskList := &types.TaskList{Name: tl} startReq := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: domainName, WorkflowID: id, WorkflowType: workflowType, diff --git a/service/frontend/workflowHandler_test.go b/service/frontend/workflowHandler_test.go index 6cbeee0acd8..113674c0984 100644 --- a/service/frontend/workflowHandler_test.go +++ b/service/frontend/workflowHandler_test.go @@ -292,7 +292,7 @@ func (s *workflowHandlerSuite) TestStartWorkflowExecution_Failed_DomainNotSet() MaximumAttempts: common.Int32Ptr(1), ExpirationIntervalInSeconds: common.Int32Ptr(1), }, - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), } _, err := wh.StartWorkflowExecution(context.Background(), startWorkflowExecutionRequest) s.Error(err) @@ -321,7 +321,7 @@ func (s *workflowHandlerSuite) TestStartWorkflowExecution_Failed_WorkflowIdNotSe MaximumAttempts: common.Int32Ptr(1), ExpirationIntervalInSeconds: common.Int32Ptr(1), }, - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), } _, err := wh.StartWorkflowExecution(context.Background(), startWorkflowExecutionRequest) s.Error(err) @@ -351,7 +351,7 @@ func (s *workflowHandlerSuite) TestStartWorkflowExecution_Failed_WorkflowTypeNot MaximumAttempts: common.Int32Ptr(1), ExpirationIntervalInSeconds: common.Int32Ptr(1), }, - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), } _, err := wh.StartWorkflowExecution(context.Background(), startWorkflowExecutionRequest) s.Error(err) @@ -381,7 +381,7 @@ func (s *workflowHandlerSuite) TestStartWorkflowExecution_Failed_TaskListNotSet( MaximumAttempts: common.Int32Ptr(1), ExpirationIntervalInSeconds: common.Int32Ptr(1), }, - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), } _, err := wh.StartWorkflowExecution(context.Background(), startWorkflowExecutionRequest) s.Error(err) @@ -411,7 +411,7 @@ func (s *workflowHandlerSuite) TestStartWorkflowExecution_Failed_InvalidExecutio MaximumAttempts: common.Int32Ptr(1), ExpirationIntervalInSeconds: common.Int32Ptr(1), }, - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), } _, err := wh.StartWorkflowExecution(context.Background(), startWorkflowExecutionRequest) s.Error(err) @@ -441,7 +441,7 @@ func (s *workflowHandlerSuite) TestStartWorkflowExecution_Failed_InvalidTaskStar MaximumAttempts: common.Int32Ptr(1), ExpirationIntervalInSeconds: common.Int32Ptr(1), }, - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), } _, err := wh.StartWorkflowExecution(context.Background(), startWorkflowExecutionRequest) s.Error(err) diff --git a/service/history/execution/history_builder.go b/service/history/execution/history_builder.go index b7ac6d8766c..e10a3ee5541 100644 --- a/service/history/execution/history_builder.go +++ b/service/history/execution/history_builder.go @@ -691,7 +691,7 @@ func (b *HistoryBuilder) newActivityTaskStartedEvent( attributes.ScheduledEventID = common.Int64Ptr(ScheduledEventID) attributes.Attempt = common.Int32Ptr(attempt) attributes.Identity = identity - attributes.RequestID = common.StringPtr(requestID) + attributes.RequestID = requestID attributes.LastFailureReason = common.StringPtr(lastFailureReason) attributes.LastFailureDetails = lastFailureDetails historyEvent.ActivityTaskStartedEventAttributes = attributes @@ -1165,7 +1165,7 @@ func setDecisionTaskStartedEventInfo(historyEvent *types.HistoryEvent, Scheduled attributes := &types.DecisionTaskStartedEventAttributes{} attributes.ScheduledEventID = common.Int64Ptr(ScheduledEventID) attributes.Identity = identity - attributes.RequestID = common.StringPtr(requestID) + attributes.RequestID = requestID historyEvent.DecisionTaskStartedEventAttributes = attributes return historyEvent diff --git a/service/history/execution/mutable_state_builder.go b/service/history/execution/mutable_state_builder.go index f54c8dc2334..9a9b28d4b1b 100644 --- a/service/history/execution/mutable_state_builder.go +++ b/service/history/execution/mutable_state_builder.go @@ -1621,7 +1621,7 @@ func (e *mutableStateBuilder) addWorkflowExecutionStartedEventForContinueAsNew( } createRequest := &types.StartWorkflowExecutionRequest{ - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Domain: e.domainEntry.GetInfo().Name, WorkflowID: execution.WorkflowID, TaskList: tl, diff --git a/service/history/execution/mutable_state_builder_test.go b/service/history/execution/mutable_state_builder_test.go index 68be4a09688..12efb55baf3 100644 --- a/service/history/execution/mutable_state_builder_test.go +++ b/service/history/execution/mutable_state_builder_test.go @@ -583,7 +583,7 @@ func (s *mutableStateSuite) prepareTransientDecisionCompletionFirstBatchReplicat EventType: types.EventTypeDecisionTaskStarted.Ptr(), DecisionTaskStartedEventAttributes: &types.DecisionTaskStartedEventAttributes{ ScheduledEventID: common.Int64Ptr(decisionScheduleEvent.GetEventID()), - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), }, } eventID++ @@ -659,7 +659,7 @@ func (s *mutableStateSuite) prepareTransientDecisionCompletionFirstBatchReplicat EventType: types.EventTypeDecisionTaskStarted.Ptr(), DecisionTaskStartedEventAttributes: &types.DecisionTaskStartedEventAttributes{ ScheduledEventID: common.Int64Ptr(decisionScheduleEvent.GetEventID()), - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), }, } eventID++ //nolint:ineffassign diff --git a/service/history/execution/state_builder_test.go b/service/history/execution/state_builder_test.go index 6bec87f4458..a31e12e0b23 100644 --- a/service/history/execution/state_builder_test.go +++ b/service/history/execution/state_builder_test.go @@ -737,7 +737,7 @@ func (s *stateBuilderSuite) TestApplyEvents_EventTypeDecisionTaskStarted() { EventType: &evenType, DecisionTaskStartedEventAttributes: &types.DecisionTaskStartedEventAttributes{ ScheduledEventID: common.Int64Ptr(scheduleID), - RequestID: common.StringPtr(decisionRequestID), + RequestID: decisionRequestID, }, } di := &DecisionInfo{ diff --git a/service/history/historyEngine.go b/service/history/historyEngine.go index 0d95e2e188b..f82354c2f93 100644 --- a/service/history/historyEngine.go +++ b/service/history/historyEngine.go @@ -2119,11 +2119,8 @@ func (e *historyEngineImpl) RequestCancelWorkflowExecution( isCancelRequested, cancelRequestID := mutableState.IsCancelRequested() if isCancelRequested { cancelRequest := req.CancelRequest - if cancelRequest.RequestID != nil { - requestID := *cancelRequest.RequestID - if requestID != "" && cancelRequestID == requestID { - return updateWorkflowWithNewDecision, nil - } + if cancelRequest.RequestID != "" && cancelRequest.RequestID == cancelRequestID { + return updateWorkflowWithNewDecision, nil } // if we consider workflow cancellation idempotent, then this error is redundant // this error maybe useful if this API is invoked by external, not decision from transfer queue @@ -3080,7 +3077,7 @@ func (e *historyEngineImpl) applyWorkflowIDReusePolicyHelper( func getWorkflowAlreadyStartedError(errMsg string, createRequestID string, workflowID string, runID string) error { return &types.WorkflowExecutionAlreadyStartedError{ Message: common.StringPtr(fmt.Sprintf(errMsg, workflowID, runID)), - StartRequestID: common.StringPtr(fmt.Sprintf("%v", createRequestID)), + StartRequestID: createRequestID, RunID: runID, } } diff --git a/service/history/historyEngine2_test.go b/service/history/historyEngine2_test.go index 3893ebcd97f..845c7e9b622 100644 --- a/service/history/historyEngine2_test.go +++ b/service/history/historyEngine2_test.go @@ -193,7 +193,7 @@ func (s *engine2Suite) TestRecordDecisionTaskStartedSuccessStickyExpired() { WorkflowExecution: &we, ScheduleID: common.Int64Ptr(2), TaskID: common.Int64Ptr(100), - RequestID: common.StringPtr("reqId"), + RequestID: "reqId", PollRequest: &types.PollForDecisionTaskRequest{ TaskList: &types.TaskList{ Name: stickyTl, @@ -266,7 +266,7 @@ func (s *engine2Suite) TestRecordDecisionTaskStartedSuccessStickyEnabled() { WorkflowExecution: &we, ScheduleID: common.Int64Ptr(2), TaskID: common.Int64Ptr(100), - RequestID: common.StringPtr("reqId"), + RequestID: "reqId", PollRequest: &types.PollForDecisionTaskRequest{ TaskList: &types.TaskList{ Name: stickyTl, @@ -320,7 +320,7 @@ func (s *engine2Suite) TestRecordDecisionTaskStartedIfNoExecution() { WorkflowExecution: workflowExecution, ScheduleID: common.Int64Ptr(2), TaskID: common.Int64Ptr(100), - RequestID: common.StringPtr("reqId"), + RequestID: "reqId", PollRequest: &types.PollForDecisionTaskRequest{ TaskList: &types.TaskList{ Name: tl, @@ -350,7 +350,7 @@ func (s *engine2Suite) TestRecordDecisionTaskStartedIfGetExecutionFailed() { WorkflowExecution: workflowExecution, ScheduleID: common.Int64Ptr(2), TaskID: common.Int64Ptr(100), - RequestID: common.StringPtr("reqId"), + RequestID: "reqId", PollRequest: &types.PollForDecisionTaskRequest{ TaskList: &types.TaskList{ Name: tl, @@ -383,7 +383,7 @@ func (s *engine2Suite) TestRecordDecisionTaskStartedIfTaskAlreadyStarted() { WorkflowExecution: &workflowExecution, ScheduleID: common.Int64Ptr(2), TaskID: common.Int64Ptr(100), - RequestID: common.StringPtr("reqId"), + RequestID: "reqId", PollRequest: &types.PollForDecisionTaskRequest{ TaskList: &types.TaskList{ Name: tl, @@ -420,7 +420,7 @@ func (s *engine2Suite) TestRecordDecisionTaskStartedIfTaskAlreadyCompleted() { WorkflowExecution: &workflowExecution, ScheduleID: common.Int64Ptr(2), TaskID: common.Int64Ptr(100), - RequestID: common.StringPtr("reqId"), + RequestID: "reqId", PollRequest: &types.PollForDecisionTaskRequest{ TaskList: &types.TaskList{ Name: tl, @@ -467,7 +467,7 @@ func (s *engine2Suite) TestRecordDecisionTaskStartedConflictOnUpdate() { WorkflowExecution: &workflowExecution, ScheduleID: common.Int64Ptr(2), TaskID: common.Int64Ptr(100), - RequestID: common.StringPtr("reqId"), + RequestID: "reqId", PollRequest: &types.PollForDecisionTaskRequest{ TaskList: &types.TaskList{ Name: tl, @@ -511,7 +511,7 @@ func (s *engine2Suite) TestRecordDecisionTaskRetrySameRequest() { WorkflowExecution: &workflowExecution, ScheduleID: common.Int64Ptr(2), TaskID: common.Int64Ptr(100), - RequestID: common.StringPtr(requestID), + RequestID: requestID, PollRequest: &types.PollForDecisionTaskRequest{ TaskList: &types.TaskList{ Name: tl, @@ -556,7 +556,7 @@ func (s *engine2Suite) TestRecordDecisionTaskRetryDifferentRequest() { WorkflowExecution: &workflowExecution, ScheduleID: common.Int64Ptr(2), TaskID: common.Int64Ptr(100), - RequestID: common.StringPtr(requestID), + RequestID: requestID, PollRequest: &types.PollForDecisionTaskRequest{ TaskList: &types.TaskList{ Name: tl, @@ -599,7 +599,7 @@ func (s *engine2Suite) TestRecordDecisionTaskStartedMaxAttemptsExceeded() { WorkflowExecution: &workflowExecution, ScheduleID: common.Int64Ptr(2), TaskID: common.Int64Ptr(100), - RequestID: common.StringPtr("reqId"), + RequestID: "reqId", PollRequest: &types.PollForDecisionTaskRequest{ TaskList: &types.TaskList{ Name: tl, @@ -650,7 +650,7 @@ func (s *engine2Suite) TestRecordDecisionTaskSuccess() { WorkflowExecution: &workflowExecution, ScheduleID: common.Int64Ptr(2), TaskID: common.Int64Ptr(100), - RequestID: common.StringPtr("reqId"), + RequestID: "reqId", PollRequest: &types.PollForDecisionTaskRequest{ TaskList: &types.TaskList{ Name: tl, @@ -689,7 +689,7 @@ func (s *engine2Suite) TestRecordActivityTaskStartedIfNoExecution() { WorkflowExecution: workflowExecution, ScheduleID: common.Int64Ptr(5), TaskID: common.Int64Ptr(100), - RequestID: common.StringPtr("reqId"), + RequestID: "reqId", PollRequest: &types.PollForActivityTaskRequest{ TaskList: &types.TaskList{ Name: tl, @@ -742,7 +742,7 @@ func (s *engine2Suite) TestRecordActivityTaskStartedSuccess() { WorkflowExecution: &workflowExecution, ScheduleID: common.Int64Ptr(5), TaskID: common.Int64Ptr(100), - RequestID: common.StringPtr("reqId"), + RequestID: "reqId", PollRequest: &types.PollForActivityTaskRequest{ TaskList: &types.TaskList{ Name: tl, @@ -926,7 +926,7 @@ func (s *engine2Suite) TestStartWorkflowExecution_BrandNew() { ExecutionStartToCloseTimeoutSeconds: common.Int32Ptr(1), TaskStartToCloseTimeoutSeconds: common.Int32Ptr(2), Identity: identity, - RequestID: common.StringPtr(requestID), + RequestID: requestID, }, }) s.Nil(err) @@ -963,7 +963,7 @@ func (s *engine2Suite) TestStartWorkflowExecution_StillRunning_Dedup() { ExecutionStartToCloseTimeoutSeconds: common.Int32Ptr(1), TaskStartToCloseTimeoutSeconds: common.Int32Ptr(2), Identity: identity, - RequestID: common.StringPtr(requestID), + RequestID: requestID, }, }) s.Nil(err) @@ -999,7 +999,7 @@ func (s *engine2Suite) TestStartWorkflowExecution_StillRunning_NonDeDup() { ExecutionStartToCloseTimeoutSeconds: common.Int32Ptr(1), TaskStartToCloseTimeoutSeconds: common.Int32Ptr(2), Identity: identity, - RequestID: common.StringPtr("newRequestID"), + RequestID: "newRequestID", }, }) if _, ok := err.(*types.WorkflowExecutionAlreadyStartedError); !ok { @@ -1064,7 +1064,7 @@ func (s *engine2Suite) TestStartWorkflowExecution_NotRunning_PrevSuccess() { ExecutionStartToCloseTimeoutSeconds: common.Int32Ptr(1), TaskStartToCloseTimeoutSeconds: common.Int32Ptr(2), Identity: identity, - RequestID: common.StringPtr("newRequestID"), + RequestID: "newRequestID", WorkflowIDReusePolicy: &option, }, }) @@ -1147,7 +1147,7 @@ func (s *engine2Suite) TestStartWorkflowExecution_NotRunning_PrevFail() { ExecutionStartToCloseTimeoutSeconds: common.Int32Ptr(1), TaskStartToCloseTimeoutSeconds: common.Int32Ptr(2), Identity: identity, - RequestID: common.StringPtr("newRequestID"), + RequestID: "newRequestID", WorkflowIDReusePolicy: &option, }, }) @@ -1235,7 +1235,7 @@ func (s *engine2Suite) TestSignalWithStartWorkflowExecution_WorkflowNotExist() { Identity: identity, SignalName: common.StringPtr(signalName), Input: input, - RequestID: common.StringPtr(requestID), + RequestID: requestID, }, } @@ -1276,7 +1276,7 @@ func (s *engine2Suite) TestSignalWithStartWorkflowExecution_CreateTimeout() { Identity: identity, SignalName: common.StringPtr(signalName), Input: input, - RequestID: common.StringPtr(requestID), + RequestID: requestID, }, } @@ -1318,7 +1318,7 @@ func (s *engine2Suite) TestSignalWithStartWorkflowExecution_WorkflowNotRunning() Identity: identity, SignalName: common.StringPtr(signalName), Input: input, - RequestID: common.StringPtr(requestID), + RequestID: requestID, WorkflowIDReusePolicy: &policy, }, } @@ -1368,7 +1368,7 @@ func (s *engine2Suite) TestSignalWithStartWorkflowExecution_Start_DuplicateReque Identity: identity, SignalName: common.StringPtr(signalName), Input: input, - RequestID: common.StringPtr(requestID), + RequestID: requestID, WorkflowIDReusePolicy: &policy, }, } @@ -1426,7 +1426,7 @@ func (s *engine2Suite) TestSignalWithStartWorkflowExecution_Start_WorkflowAlread Identity: identity, SignalName: common.StringPtr(signalName), Input: input, - RequestID: common.StringPtr(requestID), + RequestID: requestID, WorkflowIDReusePolicy: &policy, }, } diff --git a/service/history/historyEngine3_eventsv2_test.go b/service/history/historyEngine3_eventsv2_test.go index 44d88c72264..49b835859ba 100644 --- a/service/history/historyEngine3_eventsv2_test.go +++ b/service/history/historyEngine3_eventsv2_test.go @@ -190,7 +190,7 @@ func (s *engine3Suite) TestRecordDecisionTaskStartedSuccessStickyEnabled() { WorkflowExecution: &we, ScheduleID: common.Int64Ptr(2), TaskID: common.Int64Ptr(100), - RequestID: common.StringPtr("reqId"), + RequestID: "reqId", PollRequest: &types.PollForDecisionTaskRequest{ TaskList: &types.TaskList{ Name: stickyTl, @@ -253,7 +253,7 @@ func (s *engine3Suite) TestStartWorkflowExecution_BrandNew() { ExecutionStartToCloseTimeoutSeconds: common.Int32Ptr(1), TaskStartToCloseTimeoutSeconds: common.Int32Ptr(2), Identity: identity, - RequestID: common.StringPtr(requestID), + RequestID: requestID, }, }) s.Nil(err) @@ -343,7 +343,7 @@ func (s *engine3Suite) TestSignalWithStartWorkflowExecution_WorkflowNotExist() { Identity: identity, SignalName: common.StringPtr(signalName), Input: input, - RequestID: common.StringPtr(requestID), + RequestID: requestID, }, } diff --git a/service/history/historyEngine_test.go b/service/history/historyEngine_test.go index 3c1ce0ea684..5e269a9fe8e 100644 --- a/service/history/historyEngine_test.go +++ b/service/history/historyEngine_test.go @@ -4966,7 +4966,7 @@ func (s *engineSuite) TestSignalWorkflowExecution_DuplicateRequest() { Identity: identity, SignalName: common.StringPtr(signalName), Input: input, - RequestID: common.StringPtr(requestID), + RequestID: requestID, }, } @@ -5049,7 +5049,7 @@ func (s *engineSuite) TestRemoveSignalMutableState() { removeRequest = &types.RemoveSignalMutableStateRequest{ DomainUUID: constants.TestDomainID, WorkflowExecution: &workflowExecution, - RequestID: common.StringPtr(requestID), + RequestID: requestID, } msBuilder := execution.NewMutableStateBuilderWithEventV2( diff --git a/service/history/task/transfer_active_task_executor.go b/service/history/task/transfer_active_task_executor.go index 55be5764509..e837f8b8f00 100644 --- a/service/history/task/transfer_active_task_executor.go +++ b/service/history/task/transfer_active_task_executor.go @@ -574,7 +574,7 @@ func (t *transferActiveTaskExecutor) processSignalExecution( WorkflowID: task.TargetWorkflowID, RunID: task.TargetRunID, }, - RequestID: common.StringPtr(signalInfo.SignalRequestID), + RequestID: signalInfo.SignalRequestID, }) } @@ -1212,7 +1212,7 @@ func (t *transferActiveTaskExecutor) requestCancelExternalExecutionWithRetry( }, Identity: identityHistoryService, // Use the same request ID to dedupe RequestCancelWorkflowExecution calls - RequestID: common.StringPtr(requestCancelInfo.CancelRequestID), + RequestID: requestCancelInfo.CancelRequestID, }, ExternalInitiatedEventID: common.Int64Ptr(task.ScheduleID), ExternalWorkflowExecution: &types.WorkflowExecution{ @@ -1258,7 +1258,7 @@ func (t *transferActiveTaskExecutor) signalExternalExecutionWithRetry( SignalName: common.StringPtr(signalInfo.SignalName), Input: signalInfo.Input, // Use same request ID to deduplicate SignalWorkflowExecution calls - RequestID: common.StringPtr(signalInfo.SignalRequestID), + RequestID: signalInfo.SignalRequestID, Control: signalInfo.Control, }, ExternalWorkflowExecution: &types.WorkflowExecution{ @@ -1296,7 +1296,7 @@ func (t *transferActiveTaskExecutor) startWorkflowWithRetry( ExecutionStartToCloseTimeoutSeconds: attributes.ExecutionStartToCloseTimeoutSeconds, TaskStartToCloseTimeoutSeconds: attributes.TaskStartToCloseTimeoutSeconds, // Use the same request ID to dedupe StartWorkflowExecution calls - RequestID: common.StringPtr(childInfo.CreateRequestID), + RequestID: childInfo.CreateRequestID, WorkflowIDReusePolicy: attributes.WorkflowIDReusePolicy, RetryPolicy: attributes.RetryPolicy, CronSchedule: attributes.CronSchedule, diff --git a/service/history/task/transfer_active_task_executor_test.go b/service/history/task/transfer_active_task_executor_test.go index 0ab4a80a54a..45dec583485 100644 --- a/service/history/task/transfer_active_task_executor_test.go +++ b/service/history/task/transfer_active_task_executor_test.go @@ -1372,7 +1372,7 @@ func (s *transferActiveTaskExecutorSuite) TestProcessSignalExecution_Success() { WorkflowID: transferTask.TargetWorkflowID, RunID: transferTask.TargetRunID, }, - RequestID: common.StringPtr(si.SignalRequestID), + RequestID: si.SignalRequestID, }).Return(nil).Times(1) err = s.transferActiveTaskExecutor.Execute(transferTask, true) @@ -2187,7 +2187,7 @@ func (s *transferActiveTaskExecutorSuite) createRequestCancelWorkflowExecutionRe WorkflowExecution: &targetExecution, Identity: identityHistoryService, // Use the same request ID to dedupe RequestCancelWorkflowExecution calls - RequestID: common.StringPtr(rci.CancelRequestID), + RequestID: rci.CancelRequestID, }, ExternalInitiatedEventID: common.Int64Ptr(task.ScheduleID), ExternalWorkflowExecution: &sourceExecution, @@ -2218,7 +2218,7 @@ func (s *transferActiveTaskExecutorSuite) createSignalWorkflowExecutionRequest( Identity: identityHistoryService, SignalName: common.StringPtr(si.SignalName), Input: si.Input, - RequestID: common.StringPtr(si.SignalRequestID), + RequestID: si.SignalRequestID, Control: si.Control, }, ExternalWorkflowExecution: &sourceExecution, @@ -2251,7 +2251,7 @@ func (s *transferActiveTaskExecutorSuite) createChildWorkflowExecutionRequest( ExecutionStartToCloseTimeoutSeconds: attributes.ExecutionStartToCloseTimeoutSeconds, TaskStartToCloseTimeoutSeconds: attributes.TaskStartToCloseTimeoutSeconds, // Use the same request ID to dedupe StartWorkflowExecution calls - RequestID: common.StringPtr(ci.CreateRequestID), + RequestID: ci.CreateRequestID, WorkflowIDReusePolicy: attributes.WorkflowIDReusePolicy, RetryPolicy: attributes.RetryPolicy, } diff --git a/service/matching/matchingEngine.go b/service/matching/matchingEngine.go index cd49fa8e1c2..74209b63828 100644 --- a/service/matching/matchingEngine.go +++ b/service/matching/matchingEngine.go @@ -823,7 +823,7 @@ func (e *matchingEngineImpl) recordDecisionTaskStarted( WorkflowExecution: task.workflowExecution(), ScheduleID: &task.event.ScheduleID, TaskID: &task.event.TaskID, - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), PollRequest: pollReq, } var resp *types.RecordDecisionTaskStartedResponse @@ -852,7 +852,7 @@ func (e *matchingEngineImpl) recordActivityTaskStarted( WorkflowExecution: task.workflowExecution(), ScheduleID: &task.event.ScheduleID, TaskID: &task.event.TaskID, - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), PollRequest: pollReq, } var resp *types.RecordActivityTaskStartedResponse diff --git a/service/worker/batcher/workflow.go b/service/worker/batcher/workflow.go index 17588d00f50..b5b5053eda0 100644 --- a/service/worker/batcher/workflow.go +++ b/service/worker/batcher/workflow.go @@ -374,7 +374,7 @@ func startTaskProcessor( RunID: runID, }, Identity: BatchWFTypeName, - RequestID: common.StringPtr(requestID), + RequestID: requestID, }, yarpcCallOptions...) }) case BatchTypeSignal: @@ -387,7 +387,7 @@ func startTaskProcessor( RunID: runID, }, Identity: BatchWFTypeName, - RequestID: common.StringPtr(requestID), + RequestID: requestID, SignalName: common.StringPtr(batchParams.SignalParams.SignalName), Input: []byte(batchParams.SignalParams.Input), }, yarpcCallOptions...) diff --git a/tools/cli/workflowCommands.go b/tools/cli/workflowCommands.go index 06e74db43cd..a49e405b370 100644 --- a/tools/cli/workflowCommands.go +++ b/tools/cli/workflowCommands.go @@ -1538,7 +1538,7 @@ func ResetWorkflow(c *cli.Context) { }, Reason: common.StringPtr(fmt.Sprintf("%v:%v", getCurrentUserFromEnv(), reason)), DecisionFinishEventID: common.Int64Ptr(decisionFinishID), - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), SkipSignalReapply: common.BoolPtr(c.Bool(FlagSkipSignalReapply)), }) if err != nil { @@ -1805,7 +1805,7 @@ func doReset(c *cli.Context, domain, wid, rid string, params batchResetParamsTyp RunID: resetBaseRunID, }, DecisionFinishEventID: common.Int64Ptr(decisionFinishID), - RequestID: common.StringPtr(uuid.New()), + RequestID: uuid.New(), Reason: common.StringPtr(fmt.Sprintf("%v:%v", getCurrentUserFromEnv(), params.reason)), SkipSignalReapply: common.BoolPtr(params.skipSignalReapply), })