Skip to content

Expose ServiceTerraformTemplate#execute without wait #99

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

Merged
merged 1 commit into from
May 9, 2025

Conversation

kbrock
Copy link
Member

@kbrock kbrock commented May 8, 2025

Moving the wait_on_task into workflows - don't want to block this here

This has been split into an async and a blocking version.

  • Automate interface expects execute to be complete after the return.
  • Workflows needs to run async, so it would rather implement the wait_for_task logic itself.

@kbrock kbrock added the enhancement New feature or request label May 8, 2025
# this is essentially launch_terraform_template_queue
#
# @returns [Numeric] task_id (passed into wait_for_taskid)
def execute_no_wait(action)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In automate we use refresh_sync and I know we don't want to rename this execute_sync since it is used in a bunch of places but what about execute_async ?

@agrare
Copy link
Member

agrare commented May 8, 2025

Just a dumb naming question otherwise can't wait to get rid of the synchronous execute ❤️

Moving the wait_on_task into workflows - don't want to block this here
@kbrock
Copy link
Member Author

kbrock commented May 9, 2025

update:

  • renamed execute_no_wait to execute_async

Comment on lines +338 to +345
s.add_resource!(stack1, :name => ResourceAction::PROVISION)
case action
when ResourceAction::RECONFIGURE
s.add_resource!(stack2, :name => ResourceAction::RECONFIGURE)
when ResourceAction::RETIREMENT
s.add_resource!(stack2, :name => ResourceAction::RECONFIGURE)
s.add_resource!(stack3, :name => ResourceAction::RETIREMENT)
end
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need these stacks to be added as resources for anything that is being tested here?

Copy link
Member

@agrare agrare left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One question but nothing to hold this up

@agrare agrare merged commit 883e83b into ManageIQ:master May 9, 2025
4 checks passed
@kbrock kbrock deleted the async_execute branch May 13, 2025 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants