-
Notifications
You must be signed in to change notification settings - Fork 44
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
Single-workflow Signal Command #418
Conversation
if err != nil { | ||
return fmt.Errorf("failed signalling workflow: %w", err) | ||
} | ||
cctx.Printer.Println("Signal workflow succeeded") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Up for discussion on whether this is a log statement or a normal line. If --output json
is specified, there will be no output regardless.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not personally expecting a non-blocking request-response command such as signal
to have a concept of "logging" -- I'm just expecting stdout and stderr.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 This matches existing CLI where, in the absence of more detail, it just prints a line of success.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's merge into the main branch so we can review there.
…write-workflow-signal # Conflicts: # go.mod # go.sum # temporalcli/commands.gen.go # temporalcli/commands.workflow.go # temporalcli/commands.workflow_exec.go # temporalcli/commandsmd/commands.md
Closing this in favor of a new PR pointing to the cli-rewrite branch (coming soon) |
What was changed
This demonstrates how to write a simple command. Admittedly it didn't have to do much output or output testing and it could have more testing. Also, this does not include the "batch" capabilities of existing CLI.