Skip to content

Commit

Permalink
Fixes a possible panic when server resp is missing workflow type (#364)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sushisource committed Feb 17, 2021
1 parent 000fce6 commit cba4548
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions internal/activity.go
Expand Up @@ -271,17 +271,17 @@ func WithActivityTask(

logger = ilog.With(logger,
tagActivityID, task.ActivityId,
tagActivityType, task.ActivityType.Name,
tagActivityType, task.ActivityType.GetName(),
tagAttempt, task.Attempt,
tagWorkflowType, task.WorkflowType.Name,
tagWorkflowType, task.WorkflowType.GetName(),
tagWorkflowID, task.WorkflowExecution.WorkflowId,
tagRunID, task.WorkflowExecution.RunId,
)

return context.WithValue(ctx, activityEnvContextKey, &activityEnvironment{
taskToken: task.TaskToken,
serviceInvoker: invoker,
activityType: ActivityType{Name: task.ActivityType.Name},
activityType: ActivityType{Name: task.ActivityType.GetName()},
activityID: task.ActivityId,
workflowExecution: WorkflowExecution{
RunID: task.WorkflowExecution.RunId,
Expand All @@ -297,7 +297,7 @@ func WithActivityTask(
attempt: task.GetAttempt(),
heartbeatDetails: task.HeartbeatDetails,
workflowType: &WorkflowType{
Name: task.WorkflowType.Name,
Name: task.WorkflowType.GetName(),
},
workflowNamespace: task.WorkflowNamespace,
workerStopChannel: workerStopChannel,
Expand Down

0 comments on commit cba4548

Please sign in to comment.