hashgraph / hedera-mirror-node

Hedera Mirror Node archives data from consensus nodes and serves it via an API
Apache License 2.0
117 stars 109 forks source link

Report DOWN on Rest API connection issue in monitor #8585

Closed xin-hedera closed 2 weeks ago

xin-hedera commented 2 weeks ago

Description:

This PR changes the cluster health indicator to return DOWN when there is Rest API connection issue.

Related issue(s):

Fixes #8509

Notes for reviewer:

The scenario is, when there is db issue, /api/v1/network/stake will return 500 code at the beginning. However the same db issue will also cause the rest pod readiness probe to fail and eventually mirror-rest service will be unavailable and thus cause connection issue, so we need to report DOWN as well.

Checklist

codecov[bot] commented 2 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 92.41%. Comparing base (1a273a8) to head (726da0e).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #8585 +/- ## ========================================= Coverage 92.41% 92.41% - Complexity 7474 7475 +1 ========================================= Files 913 913 Lines 29792 29795 +3 Branches 3626 3627 +1 ========================================= + Hits 27531 27534 +3 Misses 1442 1442 Partials 819 819 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

sonarcloud[bot] commented 2 weeks ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud