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

fix: seperated _update_cluster_fn from _process_operation_fn to displ… #619

Merged
merged 1 commit into from
Oct 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading