-
Notifications
You must be signed in to change notification settings - Fork 898
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
Add uniqueness of service for generation chargeback report for SSUI #17082
Conversation
Chargeback report in summary dashboard screen is calculated from data from this API request: /api/services?expand=resources&filter[]=service_id%3Dnil&attributes=chargeback_report and this request is returing data from each service service1: chargeback_data_for_service_my_service service2: chargeback_data_for_service_my_service service3: chargeback_data_for_service_my_service but for each service has been used same name of report because Services could be named by same name. So when there is generated result for service3 and this result is empty then in final API request will have all services empty result as well because report results from service1 and 2 have been overwriten by empty result from service 3 - thanks to the distiguishing by just name. So I am adding Service#id for distiguishing and ensuring uniqueness.
Checked commit lpichler@dfed1c2 with ruby 2.3.3, rubocop 0.52.0, haml-lint 0.20.0, and yamllint 1.10.0 |
It looks like very corner case to have several services with the same name, but in case it would happen - we will be prepared. |
I think that it is ok to have id in report name. Or maybe I would like to have only ID here because it is unique and unchangeable identifier.
|
@lpichler you are correct, my previous suggestion is wrong, reports's name is using title: manageiq/app/models/miq_report/generator.rb Line 146 in 7a68d86
all looks good to me |
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 👍
Add uniqueness of service for generation chargeback report for SSUI (cherry picked from commit c2f76b6) https://bugzilla.redhat.com/show_bug.cgi?id=1552817
Gaprindashvili backport details:
|
Chargeback report in summary dashboard screen is calculated
from data from this API request:
and this request is returing data from each service let's say in this structure:
(Assume that we 3 different service with same name but with different ID)
but for each service has been used
same name of report because services could be
named by same name.
So when there is generated result for
service3
andthis result is empty then in final API request
will have all services empty result too because
report results from service1 and service2 have been
overwritten by empty result from service 3 -
thanks to the distinguishing by just name.
So I am adding Service#id for distiguishing and
ensuring uniqueness to fetch correct chargeback
report result for each service.
Links
@miq-bot assign @gtanzillo
@yrudman can you review it please ?
@miq-bot add_label chargeback, bug, gaprindashvili/yes