-
Notifications
You must be signed in to change notification settings - Fork 15
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
Health summary with clusters and databases #878
Conversation
Co-Authored-By: Eugen Maksymenko <eugen.maksymenko@suse.com>
lib/trento/application/usecases/sap_systems/health_summary_service.ex
Outdated
Show resolved
Hide resolved
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
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.
Good looks besides the naming. I'm a bit concerned about using the hana_
prefix here. Maybe, in the future we will need to do so, but right now, I would stick to cluster_id
.
lib/trento/application/usecases/sap_systems/dto/health_summary_dto.ex
Outdated
Show resolved
Hide resolved
lib/trento/application/usecases/sap_systems/health_summary_service.ex
Outdated
Show resolved
Hide resolved
lib/trento/application/usecases/sap_systems/health_summary_service.ex
Outdated
Show resolved
Hide resolved
lib/trento/application/usecases/sap_systems/health_summary_service.ex
Outdated
Show resolved
Hide resolved
Ready to rereview @arbulu89 |
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.
@CDimonaco the changes look good.
Now I have the doubt if we need to send the database_id
, because as far as I can see, they sap_system_id and database_id are the same.
Maybe we can remove this database_id
%Trento.ClusterReadModel{id: cluster_id} = | ||
insert(:cluster, type: ClusterType.hana_scale_up(), health: Health.passing()) | ||
|
||
%Trento.HostReadModel{id: host_1_id} = |
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.
We could rename host_1_id
to host_id
database_health: :warning, | ||
clusters_health: :passing, | ||
hosts_health: :unknown, | ||
database_id: ^sap_system_id, |
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.
now I bit confused it this is the database id or the sap system id hehe
Because if it is the same, we are sending it twice, in the id
and in the database_id
.
Now i'm thinking both of them might have the same id, the difference in the frontend is that we get one with /sap_systems/id
and the other with /databases/id
.
Could you double check this?
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.
As far as I understood, they are not the same 👀
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.
They can but can also be different
Description
The health overview api endpoint, has two new fields, the
database_id
andhana_cluster_id
, we need them in order to achieve new functionalities in the frontend that consumes this api endpoint.How was this tested?
Integration testing for both service and endpoint.