Skip to content

Commit

Permalink
fix: print operations which do not modify in the cluster_status_logs
Browse files Browse the repository at this point in the history
  • Loading branch information
SteBaum committed Oct 21, 2024
1 parent de8296e commit 105f062
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tdp/cli/commands/deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,12 @@ def deploy(
dao.session.commit() # Update operation status to RUNNING
for operation_rec, process_operation_fn in deployment_iterator:
dao.session.commit() # Update deployment and current operation status to RUNNING and next operations to PENDING
if process_operation_fn and (cluster_status_logs := process_operation_fn()):
if process_operation_fn:
click.echo(
f"Operation {operation_rec.operation} is {operation_rec.state} {'for hosts: ' + operation_rec.host if operation_rec.host is not None else ''}"
)
dao.session.add_all(cluster_status_logs)
if cluster_status_logs := process_operation_fn():
dao.session.add_all(cluster_status_logs)
dao.session.commit() # Update operation status to SUCCESS, FAILURE or HELD

if deployment_iterator.deployment.state != DeploymentStateEnum.SUCCESS:
Expand Down

0 comments on commit 105f062

Please sign in to comment.