-
Notifications
You must be signed in to change notification settings - Fork 897
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
Fix nil cases of allocated disk types in chargeback reporting #16434
Conversation
@lpichler Cannot apply the following label because they are not recognized: gapridashvili/yes |
@miq-bot add_label gaprindashvili/yes |
f095fa6
to
631ee29
Compare
631ee29
to
c18d0c0
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.
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 |
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.
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
c18d0c0
to
a1579ec
Compare
@gtanzillo thanks , fixed 👍 |
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 |
@miq-bot remove_label wip |
…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
Gaprindashvili backport details:
|
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