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

Fix nil cases of allocated disk types in chargeback reporting #16434

Merged

Conversation

lpichler
Copy link
Contributor

@lpichler lpichler commented Nov 9, 2017

Fix nil cases and use 0
VimPerformanceState#allocated_disk_types
is dynamic method, which is only accessing

VimPerformanceState#state_data[:allocated_disk_types]

this fix is handling situation when
VimPerformanceState#state_data is nil
VimPerformanceState#state_data[:allocated_disk_types] is nil
VimPerformanceState#state_data[:allocated_disk_types][sub_metric] is nil

and replacing it by 0

@miq-bot assign @gtanzillo

@miq-bot add_label gapridashvili/yes, bug, chargeback

@miq-bot
Copy link
Member

miq-bot commented Nov 9, 2017

@lpichler Cannot apply the following label because they are not recognized: gapridashvili/yes

@lpichler
Copy link
Contributor Author

lpichler commented Nov 9, 2017

@miq-bot add_label gaprindashvili/yes

@lpichler lpichler force-pushed the fix_nil_cases_of_allocated_disk_types branch from f095fa6 to 631ee29 Compare November 9, 2017 15:40
@lpichler lpichler closed this Nov 13, 2017
@lpichler lpichler reopened this Nov 13, 2017
@lpichler lpichler force-pushed the fix_nil_cases_of_allocated_disk_types branch from 631ee29 to c18d0c0 Compare November 13, 2017 14:24
Copy link
Member

@gtanzillo gtanzillo left a comment

Choose a reason for hiding this comment

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

LGTM 👍 Will merge after typo is fixed.

expect(consumption.send(:values, 'derived_vm_allocated_disk_storage', sub_metric)).to match_array([0])
end

context 'vim performance state contains any state date for storage' do
Copy link
Member

Choose a reason for hiding this comment

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

Minor typo - date should be data

VimPerformanceState#allocated_disk_types
is dynamic method, which is only accessing

VimPerformanceState#state_data[:allocated_disk_types]

this fix is handling situation when
VimPerformanceState#state_data is nil
VimPerformanceState#state_data[:allocated_disk_types] is nil
VimPerformanceState#state_data[:allocated_disk_types][sub_metric] is nil

and replacing it by 0
@lpichler lpichler force-pushed the fix_nil_cases_of_allocated_disk_types branch from c18d0c0 to a1579ec Compare November 15, 2017 13:09
@lpichler
Copy link
Contributor Author

@gtanzillo thanks , fixed 👍

@miq-bot
Copy link
Member

miq-bot commented Nov 15, 2017

Checked commits lpichler/manageiq@71e249b~...a1579ec with ruby 2.3.3, rubocop 0.47.1, haml-lint 0.20.0, and yamllint 1.10.0
3 files checked, 0 offenses detected
Everything looks fine. 🏆

@lpichler lpichler changed the title Fix nil cases of allocated disk types in chargeback reporting [WIP] Fix nil cases of allocated disk types in chargeback reporting Nov 21, 2017
@miq-bot miq-bot added the wip label Nov 21, 2017
@lpichler lpichler changed the title [WIP] Fix nil cases of allocated disk types in chargeback reporting Fix nil cases of allocated disk types in chargeback reporting Nov 27, 2017
@lpichler
Copy link
Contributor Author

lpichler commented Nov 27, 2017

@miq-bot remove_label wip

@miq-bot miq-bot removed the wip label Nov 27, 2017
@gtanzillo gtanzillo added this to the Sprint 74 Ending Nov 27, 2017 milestone Nov 27, 2017
@gtanzillo gtanzillo merged commit a807056 into ManageIQ:master Nov 27, 2017
@lpichler lpichler deleted the fix_nil_cases_of_allocated_disk_types branch November 27, 2017 16:26
@lpichler
Copy link
Contributor Author

lpichler commented Nov 27, 2017

simaishi pushed a commit that referenced this pull request Nov 27, 2017
…sk_types

Fix nil cases of allocated disk types in chargeback reporting
(cherry picked from commit a807056)

https://bugzilla.redhat.com/show_bug.cgi?id=1517956
@simaishi
Copy link
Contributor

Gaprindashvili backport details:

$ git log -1
commit 590c2b5158ffb970ee48ce9e97613517b575eff7
Author: Gregg Tanzillo <[email protected]>
Date:   Mon Nov 27 11:26:28 2017 -0500

    Merge pull request #16434 from lpichler/fix_nil_cases_of_allocated_disk_types
    
    Fix nil cases of allocated disk types in chargeback reporting
    (cherry picked from commit a807056bdfa126b91f6aefe1b350e66c5bbdadc6)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1517956

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.

4 participants