Skip to content

Commit d858d50

Browse files
committed
mapper fix 1
1 parent 97eba63 commit d858d50

File tree

6 files changed

+24
-17
lines changed

6 files changed

+24
-17
lines changed

internal/compatibility/proto/types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,7 @@ func WorkflowExecutionInfo(t *shared.WorkflowExecutionInfo) *apiv1.WorkflowExecu
417417
AutoResetPoints: ResetPoints(t.AutoResetPoints),
418418
TaskList: t.GetTaskList(),
419419
IsCron: t.GetIsCron(),
420+
CronOverlapPolicy: CronOverlapPolicy(t.CronOverlapPolicy),
420421
}
421422
}
422423

internal/compatibility/testdata/common.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ const (
4848
HostName = "HostName"
4949
Identity = "Identity"
5050
CronSchedule = "CronSchedule"
51+
CronOverlapPolicy = 0
5152
Checksum = "Checksum"
5253
Reason = "Reason"
5354
Cause = "Cause"

internal/compatibility/testdata/decision.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ var (
106106
Memo: &Memo,
107107
SearchAttributes: &SearchAttributes,
108108
JitterStart: Duration4,
109+
CronOverlapPolicy: apiv1.CronOverlapPolicy_CRON_OVERLAP_POLICY_SKIPPED,
109110
}
110111
FailWorkflowExecutionDecisionAttributes = apiv1.FailWorkflowExecutionDecisionAttributes{
111112
Failure: &Failure,

internal/compatibility/thrift/types.go

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -421,20 +421,21 @@ func WorkflowExecutionInfo(t *apiv1.WorkflowExecutionInfo) *shared.WorkflowExecu
421421
return nil
422422
}
423423
return &shared.WorkflowExecutionInfo{
424-
Execution: WorkflowExecution(t.WorkflowExecution),
425-
Type: WorkflowType(t.Type),
426-
StartTime: timeToUnixNano(t.StartTime),
427-
CloseTime: timeToUnixNano(t.CloseTime),
428-
CloseStatus: WorkflowExecutionCloseStatus(t.CloseStatus),
429-
HistoryLength: &t.HistoryLength,
430-
ParentDomainId: ParentDomainID(t.ParentExecutionInfo),
431-
ParentExecution: ParentWorkflowExecution(t.ParentExecutionInfo),
432-
ExecutionTime: timeToUnixNano(t.ExecutionTime),
433-
Memo: Memo(t.Memo),
434-
SearchAttributes: SearchAttributes(t.SearchAttributes),
435-
AutoResetPoints: ResetPoints(t.AutoResetPoints),
436-
TaskList: &t.TaskList,
437-
IsCron: &t.IsCron,
424+
Execution: WorkflowExecution(t.WorkflowExecution),
425+
Type: WorkflowType(t.Type),
426+
StartTime: timeToUnixNano(t.StartTime),
427+
CloseTime: timeToUnixNano(t.CloseTime),
428+
CloseStatus: WorkflowExecutionCloseStatus(t.CloseStatus),
429+
HistoryLength: &t.HistoryLength,
430+
ParentDomainId: ParentDomainID(t.ParentExecutionInfo),
431+
ParentExecution: ParentWorkflowExecution(t.ParentExecutionInfo),
432+
ExecutionTime: timeToUnixNano(t.ExecutionTime),
433+
Memo: Memo(t.Memo),
434+
SearchAttributes: SearchAttributes(t.SearchAttributes),
435+
AutoResetPoints: ResetPoints(t.AutoResetPoints),
436+
TaskList: &t.TaskList,
437+
IsCron: &t.IsCron,
438+
CronOverlapPolicy: CronOverlapPolicy(t.CronOverlapPolicy),
438439
}
439440
}
440441

internal/internal_workflow.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ type (
183183
dataConverter DataConverter
184184
retryPolicy *shared.RetryPolicy
185185
cronSchedule string
186+
cronOverlapPolicy shared.CronOverlapPolicy
186187
contextPropagators []ContextPropagator
187188
memo map[string]interface{}
188189
searchAttributes map[string]interface{}

internal/internal_workflow_testsuite.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -191,9 +191,10 @@ type (
191191
workerStopChannel chan struct{}
192192
sessionEnvironment *testSessionEnvironmentImpl
193193

194-
cronSchedule string
195-
cronIterations int
196-
workflowInput []byte
194+
cronSchedule string
195+
cronIterations int
196+
workflowInput []byte
197+
cronOverlapPolicy shared.CronOverlapPolicy
197198
}
198199

199200
testSessionEnvironmentImpl struct {
@@ -391,6 +392,7 @@ func (env *testWorkflowEnvironmentImpl) newTestWorkflowEnvironmentForChild(param
391392
childEnv.workflowInfo.ParentWorkflowDomain = &env.workflowInfo.Domain
392393
childEnv.workflowInfo.ParentWorkflowExecution = &env.workflowInfo.WorkflowExecution
393394
childEnv.executionTimeout = time.Duration(*params.executionStartToCloseTimeoutSeconds) * time.Second
395+
childEnv.cronOverlapPolicy = params.cronOverlapPolicy
394396
if workflowHandler, ok := env.runningWorkflows[params.workflowID]; ok {
395397
// duplicate workflow ID
396398
if !workflowHandler.handled {

0 commit comments

Comments
 (0)