Skip to content

Commit c6d6179

Browse files
authored
Be more verbose when running exec group start (#1296)
Add comments similar to `exec start` in case of execution group finishes running. This includes some tips for timeout situations as well.
1 parent 0ee15eb commit c6d6179

File tree

1 file changed

+25
-3
lines changed

1 file changed

+25
-3
lines changed

cloudify_cli/commands/executions.py

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -651,9 +651,31 @@ def execution_groups_start(deployment_group, workflow_id, parameters,
651651
force=force,
652652
concurrency=concurrency,
653653
)
654-
wait_for_execution_group(
655-
client, group, include_logs=True, events_handler=events_logger,
656-
timeout=timeout)
654+
try:
655+
execution = wait_for_execution_group(client, group,
656+
events_handler=events_logger,
657+
include_logs=True,
658+
timeout=timeout,
659+
logger=logger)
660+
logger.info("Finished executing workflow {0} on deployment group "
661+
"{1}.\n\n"
662+
"* Run 'cfy events list -g {2}' to retrieve the "
663+
"execution group's events/logs".format(
664+
workflow_id, deployment_group, execution.id)
665+
)
666+
667+
except ExecutionTimeoutError as e:
668+
logger.info("Timed out waiting for workflow '{0}' on deployment group "
669+
"'{1}' to end. The execution group may still be running, "
670+
"however, the command-line utility was instructed to wait "
671+
"up to {3} seconds for its completion.\n\n"
672+
"* Run 'cfy executions groups cancel {2}' to cancel the "
673+
"running workflow.\n"
674+
"* Run 'cfy events list -g {2} --tail' to retrieve the "
675+
"execution group's events/logs".format(
676+
workflow_id, deployment_group, e.execution_id, timeout)
677+
)
678+
raise SuppressedCloudifyCliError()
657679

658680

659681
@groups.command('cancel', short_help='Cancel an execution group')

0 commit comments

Comments
 (0)