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

Health summary with clusters and databases #878

Merged
merged 6 commits into from
Oct 7, 2022

Conversation

CDimonaco
Copy link
Member

Description

The health overview api endpoint, has two new fields, the database_id and hana_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.

CDimonaco and others added 2 commits October 6, 2022 15:29
Co-Authored-By: Eugen Maksymenko <eugen.maksymenko@suse.com>
@CDimonaco CDimonaco added enhancement New feature or request elixir Pull requests that update Elixir code labels Oct 7, 2022
@CDimonaco CDimonaco self-assigned this Oct 7, 2022
Copy link
Contributor

@dottorblaster dottorblaster left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@arbulu89 arbulu89 left a 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.

@CDimonaco CDimonaco requested a review from arbulu89 October 7, 2022 13:41
@CDimonaco
Copy link
Member Author

Ready to rereview @arbulu89

Copy link
Contributor

@arbulu89 arbulu89 left a 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} =
Copy link
Contributor

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,
Copy link
Contributor

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?

Copy link
Member Author

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 👀

Copy link
Member Author

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

@CDimonaco CDimonaco merged commit b67b5b4 into main Oct 7, 2022
@CDimonaco CDimonaco deleted the health_summary_with_clusters_and_databases branch October 7, 2022 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
elixir Pull requests that update Elixir code enhancement New feature or request
Development

Successfully merging this pull request may close these issues.

4 participants