Skip to content

Commit

Permalink
Use firstRunId for workflow context (#462)
Browse files Browse the repository at this point in the history
  • Loading branch information
longquanzheng authored Oct 22, 2024
1 parent 767a927 commit cc8a674
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion service/interpreter/cadence/workflowProvider.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func (w *workflowProvider) GetWorkflowInfo(ctx interpreter.UnifiedContext) inter
},
WorkflowStartTime: time.UnixMilli(0), // TODO need support from Cadence client: https://github.com/uber-go/cadence-client/issues/1204
WorkflowExecutionTimeout: time.Duration(info.ExecutionStartToCloseTimeoutSeconds) * time.Second,
FirstRunID: "", // Cadence does not provide FirstRunID
FirstRunID: info.WorkflowExecution.RunID, // Cadence does not provide FirstRunID TODO https://github.com/uber-go/cadence-client/issues/1371 use firstRunID when available
}
}

Expand Down
4 changes: 2 additions & 2 deletions service/interpreter/workflowImpl.go
Original file line number Diff line number Diff line change
Expand Up @@ -461,10 +461,10 @@ func executeState(
executeApi = StateApiExecute
}

info := provider.GetWorkflowInfo(ctx) // TODO use firstRunId instead
info := provider.GetWorkflowInfo(ctx)
executionContext := iwfidl.Context{
WorkflowId: info.WorkflowExecution.ID,
WorkflowRunId: info.WorkflowExecution.RunID,
WorkflowRunId: info.FirstRunID,
WorkflowStartedTimestamp: info.WorkflowStartTime.Unix(),
StateExecutionId: &stateExeId,
}
Expand Down

0 comments on commit cc8a674

Please sign in to comment.