-
Notifications
You must be signed in to change notification settings - Fork 141
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
(CI Failure Fix ) Put make_retire_request on queue in VmsController #662
(CI Failure Fix ) Put make_retire_request on queue in VmsController #662
Conversation
cc @d-m-u |
@@ -273,6 +273,16 @@ def set_miq_server_resource(type, id, data) | |||
action_result(false, "Failed to set miq_server - #{err}") | |||
end | |||
|
|||
def request_retire_resource(type, id, _data = nil) | |||
raise BadRequestError, "Must specify an id for retiring request for a #{type} resource" unless id |
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.
So, doesn't resource_search
handle the case where the id isn't present?
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.
yes you are right 👍
|
||
api_action(type, id) do |klass| | ||
vm = resource_search(id, type, klass) | ||
api_log_info("Retiring request of vn #{vm_ident(vm)}") |
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.
And this is a stupid nit, sorry, but you have a typo here, vm
not vn
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.
done 👍
2eb9be4
to
efdc5c8
Compare
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.
this is great, thank you!!
spec/requests/vms_spec.rb
Outdated
"message" => message_vm2, | ||
"task_id" => task_id_vm2.to_s, | ||
"task_href" => "http://www.example.com/api/tasks/#{task_id_vm2}", | ||
"href" => "http://www.example.com/api/vms/#{vm2.id}" |
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.
in above expectations of api urls, would prefer usage of rails helper methods, i.e. a_string_matching(api_vm_url(nil, vm))
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.
@abellotti sure, I changed it, thanks!
efdc5c8
to
b29fd91
Compare
Checked commit lpichler@b29fd91 with ruby 2.4.6, rubocop 0.69.0, haml-lint 0.20.0, and yamllint 1.10.0 |
Thanks you @lpichler for the fix and update. LGTM!! 👍 will merge when green. |
Shouldn't it be tagged as |
Can you confirm it @lfu , please ? I guess that ManageIQ/manageiq#19064 is in ivanchuk. so I think that you are right. thanks @fdupont-redhat @miq-bot add_label ivanchuk/yes |
@lpichler Thanks for the fix! |
@lfu thanks also for you help with this fix. |
…_request (CI Failure Fix ) Put make_retire_request on queue in VmsController (cherry picked from commit d3b5c8e)
Ivanchuk backport details:
|
…_request (CI Failure Fix ) Put make_retire_request on queue in VmsController (cherry picked from commit d3b5c8e)
Hammer backport details:
|
this is also fixing CI failure https://travis-ci.org/ManageIQ/manageiq-api/jobs/576957657
api request:
please review @lfu
Links
It was on core rep here: ManageIQ/manageiq#19064
@miq-bot assign @abellotti
Record in MiqQueue looks like after API request: