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

feat_: status-backend health endpoint #6201

Merged
merged 3 commits into from
Dec 17, 2024

Conversation

igor-sirotin
Copy link
Collaborator

@igor-sirotin igor-sirotin commented Dec 11, 2024

  1. Implemented basic healthcheck endpoint for status-backend
  2. Used it in functional tests.

At first I brought back docker healthcheck feature, but it didn't make sense. Even having it running in background, we wouldn't get notified and stop the tests. And it wouldn't work when running status-backend locally not in docker.
At the same time all tests have timeout for all requests.

@status-im-auto
Copy link
Member

status-im-auto commented Dec 11, 2024

Jenkins Builds

Click to see older builds (26)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 663c482 #1 2024-12-11 22:42:27 ~3 min macos 📦zip
✔️ 663c482 #1 2024-12-11 22:42:36 ~3 min ios 📦zip
✔️ 663c482 #1 2024-12-11 22:43:50 ~5 min android 📦aar
✔️ 663c482 #1 2024-12-11 22:43:57 ~5 min linux 📦zip
✔️ 663c482 #1 2024-12-11 22:44:30 ~5 min windows 📦zip
✔️ 663c482 #1 2024-12-11 22:45:10 ~6 min tests-rpc 📄log
✔️ 663c482 #1 2024-12-11 22:47:06 ~8 min macos 📦zip
✔️ 663c482 #1 2024-12-11 23:09:20 ~30 min tests 📄log
✔️ a97309c #2 2024-12-13 14:42:23 ~3 min windows 📦zip
✔️ a97309c #2 2024-12-13 14:42:50 ~4 min macos 📦zip
✔️ a97309c #2 2024-12-13 14:43:07 ~4 min ios 📦zip
✔️ a97309c #2 2024-12-13 14:43:27 ~5 min linux 📦zip
✔️ a97309c #2 2024-12-13 14:43:34 ~5 min android 📦aar
✖️ a97309c #2 2024-12-13 14:44:43 ~6 min tests-rpc 📄log
✔️ a97309c #2 2024-12-13 14:46:52 ~8 min macos 📦zip
✖️ a97309c #3 2024-12-13 14:54:36 ~4 min tests-rpc 📄log
✔️ a97309c #2 2024-12-13 15:08:32 ~30 min tests 📄log
✔️ c4a7191 #3 2024-12-13 16:17:37 ~3 min windows 📦zip
✔️ c4a7191 #3 2024-12-13 16:18:07 ~4 min macos 📦zip
✔️ c4a7191 #3 2024-12-13 16:18:08 ~4 min linux 📦zip
✔️ c4a7191 #3 2024-12-13 16:18:10 ~4 min ios 📦zip
✔️ c4a7191 #3 2024-12-13 16:19:01 ~5 min android 📦aar
✖️ c4a7191 #4 2024-12-13 16:20:44 ~7 min tests-rpc 📄log
✔️ c4a7191 #3 2024-12-13 16:22:51 ~9 min macos 📦zip
✔️ c4a7191 #5 2024-12-13 16:34:16 ~5 min tests-rpc 📄log
✔️ c4a7191 #3 2024-12-13 16:44:54 ~31 min tests 📄log
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ bc8398d #4 2024-12-16 12:18:48 ~3 min macos 📦zip
✔️ bc8398d #4 2024-12-16 12:18:55 ~4 min ios 📦zip
✔️ bc8398d #4 2024-12-16 12:18:59 ~4 min windows 📦zip
✔️ bc8398d #4 2024-12-16 12:19:48 ~4 min linux 📦zip
✔️ bc8398d #4 2024-12-16 12:20:05 ~5 min android 📦aar
✖️ bc8398d #6 2024-12-16 12:20:40 ~5 min tests-rpc 📄log
✔️ bc8398d #4 2024-12-16 12:24:20 ~9 min macos 📦zip
✔️ bc8398d #4 2024-12-16 12:44:59 ~30 min tests 📄log
✔️ af757a2 #5 2024-12-17 11:42:23 ~4 min ios 📦zip
✔️ af757a2 #5 2024-12-17 11:42:56 ~4 min macos 📦zip
✔️ af757a2 #5 2024-12-17 11:43:02 ~4 min windows 📦zip
✔️ af757a2 #5 2024-12-17 11:43:25 ~5 min linux 📦zip
✔️ af757a2 #5 2024-12-17 11:44:16 ~6 min android 📦aar
✔️ af757a2 #7 2024-12-17 11:44:22 ~6 min tests-rpc 📄log
✔️ af757a2 #5 2024-12-17 11:47:50 ~9 min macos 📦zip
✔️ af757a2 #5 2024-12-17 12:08:02 ~29 min tests 📄log

Copy link

codecov bot commented Dec 11, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 3 lines in your changes missing coverage. Please review.

Project coverage is 61.42%. Comparing base (6a5623b) to head (af757a2).
Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
cmd/status-backend/server/api/health.go 62.50% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #6201   +/-   ##
========================================
  Coverage    61.41%   61.42%           
========================================
  Files          833      834    +1     
  Lines       109925   109934    +9     
========================================
+ Hits         67511    67526   +15     
- Misses       34518    34522    +4     
+ Partials      7896     7886   -10     
Flag Coverage Δ
functional 20.78% <66.66%> (+0.10%) ⬆️
unit 60.01% <11.11%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
cmd/status-backend/server/server.go 66.07% <100.00%> (+0.30%) ⬆️
cmd/status-backend/server/api/health.go 62.50% <62.50%> (ø)

... and 32 files with indirect coverage changes

@igor-sirotin igor-sirotin force-pushed the feat/status-backend-healthcheck branch from 663c482 to a97309c Compare December 13, 2024 14:38
@igor-sirotin
Copy link
Collaborator Author

@antdanchenko please take another look, I added /health calls to tests.

Comment on lines 26 to 27
backend_client.verify_json_schema(
backend_client.wait_for_login(), "signal_node_login")
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's better to check login first, because it properly processes results of restore_account_and_login in case of an error. While other signals are just never sent in case of an error.

@igor-sirotin igor-sirotin force-pushed the feat/status-backend-healthcheck branch from c4a7191 to bc8398d Compare December 16, 2024 12:14
@igor-sirotin igor-sirotin force-pushed the feat/status-backend-healthcheck branch from bc8398d to af757a2 Compare December 17, 2024 11:37
@igor-sirotin igor-sirotin merged commit 309d17a into develop Dec 17, 2024
18 checks passed
@igor-sirotin igor-sirotin deleted the feat/status-backend-healthcheck branch December 17, 2024 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants