cli icon indicating copy to clipboard operation
cli copied to clipboard

Log when a new WE fails to start

Open lorensr opened this issue 2 years ago • 3 comments

Is your feature request related to a problem? Please describe.

Currently, when I start a WE with the same ID twice, the second time appears to succeed (prints info about a WE and 0 exit status).

Describe the solution you'd like

Print:

An execution with that ID is already running:
   <workflow info>

And maybe a non-zero exit code?

Additional context

lorensr avatar Apr 15 '23 06:04 lorensr

Also, the second command should call Describe, not use the command-line input.

image

lorensr avatar Apr 15 '23 06:04 lorensr

This behavior was ported from tctl but I agree it's not ideal.

bergundy avatar Apr 17 '23 17:04 bergundy

hm... I can easily imagine people wanting idempotent behavior from this command (e.g. if they're running it in a script); I wonder if we could instead add a flag to govern the behavior if the workflow is already running—something that maps to the workflow ID reuse policy: https://github.com/temporalio/api/blob/a19522ade6a4e3ee120cc3e7c8390bb9b4aecf75/temporal/api/enums/v1/workflow.proto#L36

josh-berry avatar Nov 22 '23 01:11 josh-berry