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

Renamed method to delete cloud object store for consistency reasons #17143

Merged

Conversation

@miq-bot
Copy link
Member

miq-bot commented Mar 13, 2018

Checked commit romanblanco@edd5c8d with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0
1 file checked, 0 offenses detected
Everything looks fine. 🏆

@miha-plesko
Copy link
Contributor

I'm missing a link to the commit on UI here (where you use the new function name instead the old one). Other than that I think it should work out of the box, without modifying anything but this unit test on the Amazon repo: https://github.com/ManageIQ/manageiq-providers-amazon/blob/94cfa257daafab041074eb30f27794159736d3d8/spec/models/manageiq/providers/amazon/storage_manager/s3/stubbed_refresher_spec.rb#L217

@romanblanco
Copy link
Member Author

@miha-plesko Thanks, corrected the links, all the PRs should be ready. 👍

@romanblanco
Copy link
Member Author

Getting errors while testing:

I, [2018-03-13T13:43:42.237421 #7613]  INFO -- :   Parameters: {"miq_grid_checks"=>"10000000000031", "pressed"=>"cloud_object_store_object_delete"}
F, [2018-03-13T13:43:42.261153 #7613] FATAL -- : Error caught: [SupportsFeatureMixin::UnknownFeatureError] Feature ':cloud_object_store_object_delete' is unknown to SupportsFeatureMixin.
/home/rblanco/devel/manageiq/app/models/mixins/supports_feature_mixin.rb:159:in `guard_queryable_feature'
/home/rblanco/devel/manageiq/app/models/mixins/supports_feature_mixin.rb:177:in `supports?'
/home/rblanco/devel/manageiq-ui-classic/app/controllers/application_controller/ci_processing.rb:325:in `block in check_supports_task'

Marking this as [WIP] for now.

@miq-bot add_label wip

@miq-bot miq-bot changed the title Renamed method to delete cloud object store for consistency reasons [WIP] Renamed method to delete cloud object store for consistency reasons Mar 13, 2018
@miq-bot miq-bot added the wip label Mar 13, 2018
@romanblanco
Copy link
Member Author

@miq-bot remove_label wip

@miq-bot miq-bot changed the title [WIP] Renamed method to delete cloud object store for consistency reasons Renamed method to delete cloud object store for consistency reasons Mar 13, 2018
@miq-bot miq-bot removed the wip label Mar 13, 2018
@@ -1,7 +1,7 @@
module CloudObjectStoreObject::Operations
extend ActiveSupport::Concern

def delete_cloud_object_store_object
def cloud_object_store_object_delete
Copy link
Member

Choose a reason for hiding this comment

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

looks good. do we need to keep (deprecated) old link in there for a while?

Choose a reason for hiding this comment

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

@romanblanco - bump

Copy link
Member Author

Choose a reason for hiding this comment

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

@bronaghs Thanks for the reminder 👍

@kbrock I didn't find any other use of the method (see https://github.com/search?q=org%3AManageIQ+delete_cloud_object_store_object&type=Code)

So I believe it is safe just to rename it, and not keeping a link.

Copy link
Contributor

@himdel himdel May 9, 2018

Choose a reason for hiding this comment

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

manageiq-ui-classic/spec/controllers/application_controller/ci_processing_spec.rb
215:          "delete_cloud_object_store_object",
225:          :task   => "delete_cloud_object_store_object",
228:        controller.send(:process_objects, [object1.id, object2.id], "delete_cloud_object_store_object", "delete")
235:          :task   => "delete_cloud_object_store_object",
292:          "delete_cloud_object_store_object",
302:          :task   => "delete_cloud_object_store_object",
305:        controller.send(:process_objects, [object.id.to_s], "delete_cloud_object_store_object", "delete")
312:          :task   => "delete_cloud_object_store_object",

Those :)

EDIT: fixed by ManageIQ/manageiq-ui-classic#3607

@kbrock kbrock merged commit bf52707 into ManageIQ:master May 7, 2018
@kbrock kbrock self-assigned this May 7, 2018
@kbrock kbrock added this to the Sprint 85 Ending May 7, 2018 milestone May 7, 2018
@romanblanco romanblanco deleted the cloud_object_store_object_consistency branch May 7, 2018 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants