Skip to content

Commit ffeb969

Browse files
authored
Revert "Plumb through workflow type into client (#590)" (#594)
This reverts commit 10031b2.
1 parent 04213d4 commit ffeb969

File tree

5 files changed

+5
-31
lines changed

5 files changed

+5
-31
lines changed

idl/github.com/uber/cadence/shared.thrift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -945,8 +945,6 @@ struct PollForActivityTaskResponse {
945945
120: optional i32 attempt
946946
130: optional i64 (js.type = "Long") scheduledTimestampOfThisAttempt
947947
140: optional binary heartbeatDetails
948-
150: optional WorkflowType workflowType
949-
160: optional string workflowDomain
950948
}
951949

952950
struct RecordActivityTaskHeartbeatRequest {

internal/activity.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ type (
4040
// ActivityInfo contains information about currently executing activity.
4141
ActivityInfo struct {
4242
TaskToken []byte
43-
WorkflowType *WorkflowType
44-
WorkflowDomain string
4543
WorkflowExecution WorkflowExecution
4644
ActivityID string
4745
ActivityType ActivityType
@@ -163,8 +161,6 @@ func GetActivityInfo(ctx context.Context) ActivityInfo {
163161
StartedTimestamp: env.startedTimestamp,
164162
TaskList: env.taskList,
165163
Attempt: env.attempt,
166-
WorkflowType: env.workflowType,
167-
WorkflowDomain: env.workflowDomain,
168164
}
169165
}
170166

@@ -281,10 +277,6 @@ func WithActivityTask(
281277
dataConverter: dataConverter,
282278
attempt: task.GetAttempt(),
283279
heartbeatDetails: task.HeartbeatDetails,
284-
workflowType: &WorkflowType{
285-
Name: *task.WorkflowType.Name,
286-
},
287-
workflowDomain: *task.WorkflowDomain,
288280
})
289281
}
290282

internal/internal_activity.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,6 @@ type (
125125
dataConverter encoded.DataConverter
126126
attempt int32 // starts from 0.
127127
heartbeatDetails []byte
128-
workflowType *WorkflowType
129-
workflowDomain string
130128
}
131129

132130
// context.WithValue need this type instead of basic type string to avoid lint error

internal/internal_task_handlers_test.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -666,10 +666,6 @@ func (t *TaskHandlersTestSuite) TestActivityExecutionDeadline() {
666666
ScheduleToCloseTimeoutSeconds: common.Int32Ptr(d.ScheduleDuration),
667667
StartedTimestamp: common.Int64Ptr(d.StartTS.UnixNano()),
668668
StartToCloseTimeoutSeconds: common.Int32Ptr(d.StartDuration),
669-
WorkflowType: &s.WorkflowType{
670-
Name: common.StringPtr("wType"),
671-
},
672-
WorkflowDomain: common.StringPtr("domain"),
673669
}
674670
td := fmt.Sprintf("testIndex: %v, testDetails: %v", i, d)
675671
r, err := activityHandler.Execute(tasklist, pats)

internal/internal_workflow_testsuite.go

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,10 @@ import (
4444
)
4545

4646
const (
47-
defaultTestDomain = "default-test-domain"
48-
defaultTestTaskList = "default-test-tasklist"
49-
defaultTestWorkflowID = "default-test-workflow-id"
50-
defaultTestRunID = "default-test-run-id"
51-
defaultTestWorkflowTypeName = "default-test-workflow-type-name"
52-
defaultTestDomainName = "default-test-domain-name"
47+
defaultTestDomain = "default-test-domain"
48+
defaultTestTaskList = "default-test-tasklist"
49+
defaultTestWorkflowID = "default-test-workflow-id"
50+
defaultTestRunID = "default-test-run-id"
5351
)
5452

5553
type (
@@ -441,8 +439,6 @@ func (env *testWorkflowEnvironmentImpl) executeActivity(
441439
defaultTestWorkflowID,
442440
defaultTestRunID,
443441
"0",
444-
defaultTestWorkflowTypeName,
445-
defaultTestDomainName,
446442
params,
447443
)
448444

@@ -807,8 +803,6 @@ func (env *testWorkflowEnvironmentImpl) ExecuteActivity(parameters executeActivi
807803
defaultTestWorkflowID,
808804
defaultTestRunID,
809805
activityInfo.activityID,
810-
defaultTestWorkflowTypeName,
811-
defaultTestDomainName,
812806
parameters,
813807
)
814808

@@ -1371,7 +1365,7 @@ func (env *testWorkflowEnvironmentImpl) newTestActivityTaskHandler(taskList stri
13711365
return taskHandler
13721366
}
13731367

1374-
func newTestActivityTask(workflowID, runID, activityID, workflowTypeName, domainName string, params executeActivityParams) *shared.PollForActivityTaskResponse {
1368+
func newTestActivityTask(workflowID, runID, activityID string, params executeActivityParams) *shared.PollForActivityTaskResponse {
13751369
task := &shared.PollForActivityTaskResponse{
13761370
WorkflowExecution: &shared.WorkflowExecution{
13771371
WorkflowId: common.StringPtr(workflowID),
@@ -1386,10 +1380,6 @@ func newTestActivityTask(workflowID, runID, activityID, workflowTypeName, domain
13861380
StartedTimestamp: common.Int64Ptr(time.Now().UnixNano()),
13871381
StartToCloseTimeoutSeconds: common.Int32Ptr(params.StartToCloseTimeoutSeconds),
13881382
HeartbeatTimeoutSeconds: common.Int32Ptr(params.HeartbeatTimeoutSeconds),
1389-
WorkflowType: &shared.WorkflowType{
1390-
Name: common.StringPtr(workflowTypeName),
1391-
},
1392-
WorkflowDomain: common.StringPtr(domainName),
13931383
}
13941384
return task
13951385
}

0 commit comments

Comments
 (0)