Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion temporalcli/commands.workflow_pause.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ func (c *TemporalWorkflowPauseCommand) run(cctx *CommandContext, args []string)

_, err = cl.WorkflowService().PauseWorkflowExecution(cctx, &workflowservice.PauseWorkflowExecutionRequest{
Namespace: c.Parent.Namespace,
Reason: c.Reason,
WorkflowId: c.WorkflowId,
RunId: c.RunId,
Identity: c.Parent.Identity,
Reason: c.Reason,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could revert but not required

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I forgot to add a note. This is needed to fix a bug. I was not capturing the reason in pause command.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why's that? This looks like it just moves the reason to a different line

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh! yeah. That explains it. I might have accidentally removed this line locally and ran into the bug. And later I added it thinking I fixed it 🤦

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not worth making the change, just pointed it out. no biggie

})
if err != nil {
return err
Expand Down
12 changes: 12 additions & 0 deletions temporalcli/commands.workflow_view.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,18 @@ func (c *TemporalWorkflowDescribeCommand) run(cctx *CommandContext, args []strin
OriginalStartTime: timestampToTime(extendedInfo.OriginalStartTime),
}, printer.StructuredOptions{})
}
if extendedInfo != nil && extendedInfo.PauseInfo != nil {
cctx.Printer.Println(color.MagentaString("Pause Info:"))
_ = cctx.Printer.PrintStructured(struct {
Identity string `cli:",cardOmitEmpty"`
Reason string `cli:",cardOmitEmpty"`
PausedTime time.Time `cli:",cardOmitEmpty"`
}{
Identity: extendedInfo.PauseInfo.GetIdentity(),
Reason: extendedInfo.PauseInfo.GetReason(),
PausedTime: timestampToTime(extendedInfo.PauseInfo.GetPausedTime()),
}, printer.StructuredOptions{})
}

staticSummary := resp.GetExecutionConfig().GetUserMetadata().GetSummary()
staticDetails := resp.GetExecutionConfig().GetUserMetadata().GetDetails()
Expand Down
Loading