-
Notifications
You must be signed in to change notification settings - Fork 120
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
Use task cancelation_status to trigger cancelation #457
Use task cancelation_status to trigger cancelation #457
Conversation
@miq-bot add-label transformation, enhancement, hammer/yes |
@miq-bot add-label blocker |
@mkanoor @gmcculloug could you please review ? |
@@ -139,7 +139,7 @@ def main | |||
if @handle.root['ae_state_step'] == 'on_error' | |||
task.message = 'Failed' | |||
create_cleanup_request(task) | |||
elsif task.get_option('cancel_requested') && task.get_option(:cleanup_request_id).blank? | |||
elsif task.cancelation_status == 'cancel_requested' && task.get_option(:cleanup_request_id).blank? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't hard-code the status strings. Use the defined methods:
expose :cancel_requested?
expose :canceling?
expose :canceled?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure. Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One change, otherwise I this looks good.
Checked commits fabiendupont/manageiq-content@ace9b52~...1af9186 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 |
Use task cancelation_status to trigger cancelation (cherry picked from commit 2160a0e) https://bugzilla.redhat.com/show_bug.cgi?id=1614864
Hammer backport details:
|
To prevent cancel_request option override, ManageIQ/manageiq#17825 introduced an attribute to the task object. This PR changes the Automate code to rely on this attribute.
Associated RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1614864