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

EmsRefresh task name to use demodularize classname #16594

Merged
merged 1 commit into from
Jan 18, 2018

Conversation

jameswnl
Copy link
Contributor

@jameswnl jameswnl commented Dec 5, 2017

https://bugzilla.redhat.com/show_bug.cgi?id=1503660

It used to be like
EmsRefresh(ems_0000000000001) [[["ManageIQ::Providers::Vmware::InfraManager::Vm", 30], ["ManageIQ::Providers::Vmware::InfraManager::Vm", 31]]]
and now it will be
EmsRefresh(ems_0000000000001) [[["Vm", 30], ["Vm", 31]]]

@jameswnl
Copy link
Contributor Author

jameswnl commented Dec 5, 2017

@miq-bot add_labels providers

@jameswnl jameswnl force-pushed the task-name branch 2 times, most recently from 1764b81 to 2fccd5b Compare December 5, 2017 02:29
describe ".create_refresh_task" do
it "create refresh task and trancates task name to 255 symbols" do
vm = FactoryGirl.create(:vm_vmware, :name => "vm_vmware1", :ext_management_system => @ems)
targets = Array.new(500) { vm }
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This has been wrong

Copy link
Member

Choose a reason for hiding this comment

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

Good catch

@jameswnl
Copy link
Contributor Author

@miq-bot add_label bug

@miq-bot miq-bot added the bug label Dec 12, 2017
@@ -204,6 +204,9 @@ def self.queue_merge(targets, ems, create_task = false)
end

def self.create_refresh_task(ems, targets)
targets = targets.collect do |t|
[t.first.demodulize, t.last]
Copy link
Member

Choose a reason for hiding this comment

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

Can you change this to

targets.collect do |target_class, target_id|

So you don't need to do t.first/t.last?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@miq-bot
Copy link
Member

miq-bot commented Dec 12, 2017

Checked commit jameswnl@2d7e450 with ruby 2.3.3, rubocop 0.47.1, haml-lint 0.20.0, and yamllint 1.10.0
2 files checked, 0 offenses detected
Everything looks fine. 👍

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.

👍 LGTM

@agrare agrare closed this Dec 14, 2017
@agrare agrare reopened this Dec 14, 2017
@agrare agrare closed this Jan 18, 2018
@agrare agrare reopened this Jan 18, 2018
@agrare agrare merged commit 962af5d into ManageIQ:master Jan 18, 2018
@agrare agrare added this to the Sprint 78 Ending Jan 29, 2018 milestone Jan 18, 2018
@jameswnl jameswnl deleted the task-name branch January 22, 2018 19:12
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.

3 participants