@@ -102,49 +102,56 @@ func (c *TemporalWorkflowDescribeCommand) run(cctx *CommandContext, args []strin
102102
103103 cctx .Printer .Println (color .MagentaString ("Execution Info:" ))
104104 info := resp .WorkflowExecutionInfo
105- extendedInfo := resp .WorkflowExtendedInfo
106105 _ = cctx .Printer .PrintStructured (struct {
107- WorkflowId string
108- RunId string
109- Type string
110- Namespace string
111- TaskQueue string
112- AssignedBuildId string
113- StartTime time.Time
114- CloseTime time.Time `cli:",cardOmitEmpty"`
115- ExecutionTime time.Time `cli:",cardOmitEmpty"`
116- Memo map [string ]* common.Payload `cli:",cardOmitEmpty"`
117- SearchAttributes map [string ]* common.Payload `cli:",cardOmitEmpty"`
118- StateTransitionCount int64
119- HistoryLength int64
120- HistorySize int64
121- ExecutionExpirationTime time.Time `cli:",cardOmitEmpty"`
122- RunExpirationTime time.Time `cli:",cardOmitEmpty"`
123- CancelRequested bool
124- LastResetTime time.Time `cli:",cardOmitEmpty"`
125- OriginalStartTime time.Time `cli:",cardOmitEmpty"`
106+ WorkflowId string
107+ RunId string
108+ Type string
109+ Namespace string
110+ TaskQueue string
111+ AssignedBuildId string
112+ StartTime time.Time
113+ CloseTime time.Time `cli:",cardOmitEmpty"`
114+ ExecutionTime time.Time `cli:",cardOmitEmpty"`
115+ Memo map [string ]* common.Payload `cli:",cardOmitEmpty"`
116+ SearchAttributes map [string ]* common.Payload `cli:",cardOmitEmpty"`
117+ StateTransitionCount int64
118+ HistoryLength int64
119+ HistorySize int64
126120 }{
127- WorkflowId : info .Execution .WorkflowId ,
128- RunId : info .Execution .RunId ,
129- Type : info .Type .GetName (),
130- Namespace : c .Parent .Namespace ,
131- TaskQueue : info .TaskQueue ,
132- AssignedBuildId : info .GetAssignedBuildId (),
133- StartTime : timestampToTime (info .StartTime ),
134- CloseTime : timestampToTime (info .CloseTime ),
135- ExecutionTime : timestampToTime (info .ExecutionTime ),
136- Memo : info .Memo .GetFields (),
137- SearchAttributes : info .SearchAttributes .GetIndexedFields (),
138- StateTransitionCount : info .StateTransitionCount ,
139- HistoryLength : info .HistoryLength ,
140- HistorySize : info .HistorySizeBytes ,
141- ExecutionExpirationTime : timestampToTime (extendedInfo .ExecutionExpirationTime ),
142- RunExpirationTime : timestampToTime (extendedInfo .RunExpirationTime ),
143- CancelRequested : extendedInfo .CancelRequested ,
144- LastResetTime : timestampToTime (extendedInfo .LastResetTime ),
145- OriginalStartTime : timestampToTime (extendedInfo .OriginalStartTime ),
121+ WorkflowId : info .Execution .WorkflowId ,
122+ RunId : info .Execution .RunId ,
123+ Type : info .Type .GetName (),
124+ Namespace : c .Parent .Namespace ,
125+ TaskQueue : info .TaskQueue ,
126+ AssignedBuildId : info .GetAssignedBuildId (),
127+ StartTime : timestampToTime (info .StartTime ),
128+ CloseTime : timestampToTime (info .CloseTime ),
129+ ExecutionTime : timestampToTime (info .ExecutionTime ),
130+ Memo : info .Memo .GetFields (),
131+ SearchAttributes : info .SearchAttributes .GetIndexedFields (),
132+ StateTransitionCount : info .StateTransitionCount ,
133+ HistoryLength : info .HistoryLength ,
134+ HistorySize : info .HistorySizeBytes ,
146135 }, printer.StructuredOptions {})
147136
137+ extendedInfo := resp .WorkflowExtendedInfo
138+ if extendedInfo != nil {
139+ cctx .Printer .Println (color .MagentaString ("Extended Execution Info:" ))
140+ _ = cctx .Printer .PrintStructured (struct {
141+ CancelRequested bool
142+ ExecutionExpirationTime time.Time `cli:",cardOmitEmpty"`
143+ RunExpirationTime time.Time `cli:",cardOmitEmpty"`
144+ LastResetTime time.Time `cli:",cardOmitEmpty"`
145+ OriginalStartTime time.Time `cli:",cardOmitEmpty"`
146+ }{
147+ CancelRequested : extendedInfo .CancelRequested ,
148+ ExecutionExpirationTime : timestampToTime (extendedInfo .ExecutionExpirationTime ),
149+ RunExpirationTime : timestampToTime (extendedInfo .RunExpirationTime ),
150+ LastResetTime : timestampToTime (extendedInfo .LastResetTime ),
151+ OriginalStartTime : timestampToTime (extendedInfo .OriginalStartTime ),
152+ }, printer.StructuredOptions {})
153+ }
154+
148155 staticSummary := resp .GetExecutionConfig ().GetUserMetadata ().GetSummary ()
149156 staticDetails := resp .GetExecutionConfig ().GetUserMetadata ().GetDetails ()
150157 if len (staticSummary .GetData ()) > 0 || len (staticDetails .GetData ()) > 0 {
0 commit comments