diff --git a/internal/internal_schedule_client.go b/internal/internal_schedule_client.go index f2dc14d7f..979be0cff 100644 --- a/internal/internal_schedule_client.go +++ b/internal/internal_schedule_client.go @@ -609,7 +609,6 @@ func convertToPBScheduleAction(ctx context.Context, client *WorkflowClient, sche WorkflowExecutionTimeout: &action.WorkflowExecutionTimeout, WorkflowRunTimeout: &action.WorkflowRunTimeout, WorkflowTaskTimeout: &action.WorkflowTaskTimeout, - WorkflowIdReusePolicy: action.WorkflowIDReusePolicy, RetryPolicy: convertToPBRetryPolicy(action.RetryPolicy), Memo: memo, SearchAttributes: searchAttr, @@ -651,7 +650,6 @@ func convertFromPBScheduleAction(action *schedulepb.ScheduleAction) (ScheduleAct WorkflowExecutionTimeout: common.DurationValue(workflow.GetWorkflowExecutionTimeout()), WorkflowRunTimeout: common.DurationValue(workflow.GetWorkflowRunTimeout()), WorkflowTaskTimeout: common.DurationValue(workflow.GetWorkflowTaskTimeout()), - WorkflowIDReusePolicy: workflow.GetWorkflowIdReusePolicy(), RetryPolicy: convertFromPBRetryPolicy(workflow.RetryPolicy), Memo: memos, SearchAttributes: searchAttributes, diff --git a/internal/schedule_client.go b/internal/schedule_client.go index 5a2282477..354315f53 100644 --- a/internal/schedule_client.go +++ b/internal/schedule_client.go @@ -261,10 +261,6 @@ type ( // pulled this task. WorkflowTaskTimeout time.Duration - // WorkflowIdReusePolicy - Whether server allow reuse of workflow ID, can be useful - // for dedupe logic if set to RejectDuplicate. - WorkflowIDReusePolicy enumspb.WorkflowIdReusePolicy - // RetryPolicy - Retry policy for workflow. If a retry policy is specified, in case of workflow failure // server will start new workflow execution if needed based on the retry policy. RetryPolicy *RetryPolicy diff --git a/test/integration_test.go b/test/integration_test.go index d3f6b6d6d..4741d5cce 100644 --- a/test/integration_test.go +++ b/test/integration_test.go @@ -2962,19 +2962,21 @@ func (ts *IntegrationTestSuite) TestScheduleCalendarDefault() { // test default calendar spec ts.Equal([]client.ScheduleCalendarSpec{ { - Second: []client.ScheduleRange{{Start: 30, End: 30}}, - Minute: []client.ScheduleRange{{}}, - Hour: []client.ScheduleRange{{}}, + Second: []client.ScheduleRange{{Start: 30, End: 30, Step: 1}}, + Minute: []client.ScheduleRange{{Start: 0, End: 0, Step: 1}}, + Hour: []client.ScheduleRange{{Start: 0, End: 0, Step: 1}}, DayOfMonth: []client.ScheduleRange{ { Start: 1, End: 31, + Step: 1, }, }, Month: []client.ScheduleRange{ { Start: 1, End: 12, + Step: 1, }, }, Year: []client.ScheduleRange{}, @@ -2982,6 +2984,7 @@ func (ts *IntegrationTestSuite) TestScheduleCalendarDefault() { { Start: 0, End: 6, + Step: 1, }, }, }, @@ -3012,7 +3015,6 @@ func (ts *IntegrationTestSuite) TestScheduleCreateDuplicate() { func (ts *IntegrationTestSuite) TestScheduleDescribeSpec() { ctx, cancel := context.WithCancel(context.Background()) defer cancel() - handle, err := ts.client.ScheduleClient().Create(ctx, client.ScheduleOptions{ ID: "test-schedule-describe-spec-schedule", Spec: client.ScheduleSpec{ @@ -3092,27 +3094,33 @@ func (ts *IntegrationTestSuite) TestScheduleDescribeSpec() { // test spec ts.Equal([]client.ScheduleCalendarSpec{ { - Second: []client.ScheduleRange{{}}, - Minute: []client.ScheduleRange{{}}, + Second: []client.ScheduleRange{{Start: 0, End: 0, Step: 1}}, + Minute: []client.ScheduleRange{{Start: 0, End: 0, Step: 1}}, Hour: []client.ScheduleRange{{ Start: 12, + End: 12, + Step: 1, }}, DayOfMonth: []client.ScheduleRange{ { Start: 1, End: 31, + Step: 1, }, }, Month: []client.ScheduleRange{ { Start: 1, End: 12, + Step: 1, }, }, Year: []client.ScheduleRange{}, DayOfWeek: []client.ScheduleRange{ { Start: 1, + End: 1, + Step: 1, }, }, }, @@ -3130,27 +3138,33 @@ func (ts *IntegrationTestSuite) TestScheduleDescribeSpec() { ts.Equal([]client.ScheduleCalendarSpec{ { - Second: []client.ScheduleRange{{}}, - Minute: []client.ScheduleRange{{}}, + Second: []client.ScheduleRange{{Start: 0, End: 0, Step: 1}}, + Minute: []client.ScheduleRange{{Start: 0, End: 0, Step: 1}}, Hour: []client.ScheduleRange{{ Start: 12, + End: 12, + Step: 1, }}, DayOfMonth: []client.ScheduleRange{ { Start: 1, End: 31, + Step: 1, }, }, Month: []client.ScheduleRange{ { Start: 1, End: 12, + Step: 1, }, }, Year: []client.ScheduleRange{}, DayOfWeek: []client.ScheduleRange{ { Start: 1, + Step: 1, + End: 1, }, }, }, @@ -3182,27 +3196,33 @@ func (ts *IntegrationTestSuite) TestScheduleDescribeSpecCron() { // test spec ts.Equal([]client.ScheduleCalendarSpec{ { - Second: []client.ScheduleRange{{}}, - Minute: []client.ScheduleRange{{}}, + Second: []client.ScheduleRange{{Start: 0, End: 0, Step: 1}}, + Minute: []client.ScheduleRange{{Start: 0, End: 0, Step: 1}}, Hour: []client.ScheduleRange{{ Start: 12, + End: 12, + Step: 1, }}, DayOfMonth: []client.ScheduleRange{ { Start: 1, End: 31, + Step: 1, }, }, Month: []client.ScheduleRange{ { Start: 1, End: 12, + Step: 1, }, }, Year: []client.ScheduleRange{}, DayOfWeek: []client.ScheduleRange{ { Start: 1, + End: 1, + Step: 1, }, }, },