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

Move VIRTUAL_COL_USES translation to col_index method in ChargeableField #17747

Conversation

lpichler
Copy link
Contributor

@lpichler lpichler commented Jul 23, 2018

Caused by #17592

Chargeback for Projects is using v_derived_cpu_total_cores_used from yaml definition but
we are using from MetricRollup#cpu_usage_rate_average to get metric value and use it in chargeback calculation.

But reason why it was not caught by specs is that we were using cpu_usage_rate_average in rspec factories(instead of v_derived_cpu_total_cores_used as it is used in yaml) and thanks to that this case have not been covered.

Links

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

@miq-bot miq-bot added the wip label Jul 23, 2018
@lpichler lpichler force-pushed the fix_translation_from_v_derived_cpu_total_cores_used_to_cpu_usage_rate_average_chargeback_for_projects branch from 4c6afa6 to ca8de9e Compare July 24, 2018 09:33
@lpichler lpichler closed this Jul 24, 2018
@lpichler lpichler reopened this Jul 24, 2018
@lpichler lpichler closed this Jul 24, 2018
@lpichler lpichler reopened this Jul 24, 2018
@lpichler lpichler force-pushed the fix_translation_from_v_derived_cpu_total_cores_used_to_cpu_usage_rate_average_chargeback_for_projects branch from ca8de9e to 07760c5 Compare July 24, 2018 12:58
@lpichler lpichler changed the title [WIP] Fix getting values for cpu_usage_rate_average_chargeback_for_projects [WIP] Move VIRTUAL_COL_USES translation to method values Jul 24, 2018
@lpichler lpichler force-pushed the fix_translation_from_v_derived_cpu_total_cores_used_to_cpu_usage_rate_average_chargeback_for_projects branch 2 times, most recently from 91e1387 to 5d04ec5 Compare July 24, 2018 13:39
@lpichler lpichler closed this Jul 24, 2018
@lpichler lpichler reopened this Jul 24, 2018
@lpichler lpichler force-pushed the fix_translation_from_v_derived_cpu_total_cores_used_to_cpu_usage_rate_average_chargeback_for_projects branch from 5d04ec5 to d81064b Compare July 24, 2018 15:07
@lpichler lpichler force-pushed the fix_translation_from_v_derived_cpu_total_cores_used_to_cpu_usage_rate_average_chargeback_for_projects branch from d81064b to 485da7e Compare July 24, 2018 18:57
@lpichler lpichler changed the title [WIP] Move VIRTUAL_COL_USES translation to method values Move VIRTUAL_COL_USES translation to col_index method in ChargeableField Jul 24, 2018
@lpichler
Copy link
Contributor Author

@miq-bot add_label blocker, chargeback

@miq-bot assign @gtanzillo

@miq-bot
Copy link
Member

miq-bot commented Jul 24, 2018

Checked commit lpichler@485da7e with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0
3 files checked, 0 offenses detected
Everything looks fine. ⭐

@miq-bot miq-bot removed the wip label Jul 24, 2018
@gtanzillo gtanzillo added this to the Sprint 92 Ending Aug 13, 2018 milestone Aug 1, 2018
@gtanzillo gtanzillo merged commit ee216b0 into ManageIQ:master Aug 1, 2018
@lpichler lpichler deleted the fix_translation_from_v_derived_cpu_total_cores_used_to_cpu_usage_rate_average_chargeback_for_projects branch August 1, 2018 13:40
@simaishi
Copy link
Contributor

simaishi commented Aug 7, 2018

@lpichler Can this be gaprindashvili/yes?

@lpichler
Copy link
Contributor Author

lpichler commented Aug 7, 2018

@simaishi yes,

@miq_bot add_label gaprindashvili/yes

@yrudman
Copy link
Contributor

yrudman commented Aug 7, 2018

@miq-bot add-label gaprindashvili/yes

simaishi pushed a commit that referenced this pull request Aug 17, 2018
…d_cpu_total_cores_used_to_cpu_usage_rate_average_chargeback_for_projects

Move VIRTUAL_COL_USES translation to col_index method in ChargeableField
(cherry picked from commit ee216b0)

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

Gaprindashvili backport details:

$ git log -1
commit ced41ae549f2075210adeccf4be44a3f27ba0c4b
Author: Gregg Tanzillo <gtanzill@redhat.com>
Date:   Wed Aug 1 09:39:51 2018 -0400

    Merge pull request #17747 from lpichler/fix_translation_from_v_derived_cpu_total_cores_used_to_cpu_usage_rate_average_chargeback_for_projects
    
    Move VIRTUAL_COL_USES translation to col_index method in ChargeableField
    (cherry picked from commit ee216b089a981c8a09916f130979989df95bca40)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1613295

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.

5 participants