Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add workflow stack command #457

Merged
merged 5 commits into from
Feb 15, 2024
Merged

Add workflow stack command #457

merged 5 commits into from
Feb 15, 2024

Conversation

Sushisource
Copy link
Member

What was changed

Added workflow stack command. Looks just like query output. In the future we should probably do a better job of formatting this, but it's not simple. Probably makes the most sense with enhanced trace.

Why?

Part of cli rewrite.

Checklist

  1. Closes

  2. How was this tested:

  1. Any docs updates needed?

temporalcli/commands.workflow.go Outdated Show resolved Hide resolved
temporalcli/commands.workflow.go Outdated Show resolved Hide resolved
case "not_completed_cleanly":
queryRejectCond = enums.QUERY_REJECT_CONDITION_NOT_COMPLETED_CLEANLY
default:
return fmt.Errorf("invalid query reject condition: %v, valid values are: 'not_open', 'not_completed_cleanly'", rejectCondition)
Copy link
Member

Choose a reason for hiding this comment

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

In theory with how string-enum works this should never get this far, but I support the default anyways

return fmt.Errorf("invalid query reject condition: %v, valid values are: 'not_open', 'not_completed_cleanly'", rejectCondition)
}

result, err := cl.WorkflowService().QueryWorkflow(cctx, &workflowservice.QueryWorkflowRequest{
Copy link
Member

Choose a reason for hiding this comment

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

Mentioned in other review, and don't have to change, but this could use the high-level QueryWorkflowWithOptions (changing buildRawInputPayloads to buildRawInput), but no big difference.

temporalcli/commands.workflow.go Outdated Show resolved Hide resolved
@Sushisource Sushisource merged commit 48d92bc into cli-rewrite Feb 15, 2024
5 checks passed
@Sushisource Sushisource deleted the workflow-stack branch February 15, 2024 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants