-
Notifications
You must be signed in to change notification settings - Fork 27
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
✨ adding background check for running services (⚠️ OPS) 🗃️ #4925
✨ adding background check for running services (⚠️ OPS) 🗃️ #4925
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4925 +/- ##
========================================
+ Coverage 86.2% 86.8% +0.6%
========================================
Files 1237 1207 -30
Lines 50897 50028 -869
Branches 1078 1078
========================================
- Hits 43886 43466 -420
+ Misses 6774 6325 -449
Partials 237 237
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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.
Looks good! thx! Left a few comments and suggestions I would like you to check.
...ages/postgres-database/src/simcore_postgres_database/models/resource_tracker_service_runs.py
Show resolved
Hide resolved
services/resource-usage-tracker/src/simcore_service_resource_usage_tracker/core/settings.py
Show resolved
Hide resolved
services/resource-usage-tracker/tests/unit/with_dbs/test_background_task.py
Outdated
Show resolved
Hide resolved
...acker/src/simcore_service_resource_usage_tracker/modules/db/repositories/resource_tracker.py
Outdated
Show resolved
Hide resolved
services/resource-usage-tracker/src/simcore_service_resource_usage_tracker/resource_tracker.py
Outdated
Show resolved
Hide resolved
services/resource-usage-tracker/tests/unit/with_dbs/test_background_task.py
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.
nice! some comments
..._postgres_database/migration/versions/22404057a50c_resource_tracker_service_runs_helpers_.py
Outdated
Show resolved
Hide resolved
..._postgres_database/migration/versions/22404057a50c_resource_tracker_service_runs_helpers_.py
Show resolved
Hide resolved
...ages/postgres-database/src/simcore_postgres_database/models/resource_tracker_service_runs.py
Show resolved
Hide resolved
services/resource-usage-tracker/src/simcore_service_resource_usage_tracker/core/settings.py
Show resolved
Hide resolved
...e-tracker/src/simcore_service_resource_usage_tracker/models/resource_tracker_service_runs.py
Outdated
Show resolved
Hide resolved
...e-tracker/src/simcore_service_resource_usage_tracker/models/resource_tracker_service_runs.py
Outdated
Show resolved
Hide resolved
...usage-tracker/src/simcore_service_resource_usage_tracker/resource_tracker_background_task.py
Outdated
Show resolved
Hide resolved
...usage-tracker/src/simcore_service_resource_usage_tracker/resource_tracker_background_task.py
Show resolved
Hide resolved
...sage-tracker/src/simcore_service_resource_usage_tracker/resource_tracker_process_messages.py
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.
I have some questions let's have a look together
...acker/src/simcore_service_resource_usage_tracker/modules/db/repositories/resource_tracker.py
Outdated
Show resolved
Hide resolved
...sage-tracker/src/simcore_service_resource_usage_tracker/resource_tracker_process_messages.py
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.
thx!
...usage-tracker/src/simcore_service_resource_usage_tracker/resource_tracker_background_task.py
Show resolved
Hide resolved
ef41ae3
to
e665804
Compare
e665804
to
d8c9687
Compare
SonarCloud Quality Gate failed. 0 Bugs No Coverage information Catch issues before they fail your Quality Gate with our IDE extension SonarLint |
Code Climate has analyzed commit d8c9687 and detected 0 issues on this pull request. View more on Code Climate. |
What do these changes do?
Resource tracker will be checking every 5 minutes all running services. If there is a service for which RUT didn't receive a heartbeat in the last 5 minutes it will increase the missed heartbeat counter. If the counter reaches 6 it will consider the service as unhealthy.
resource_tracker_service_runs
tableRelated issue/s
How to test
DevOps Checklist
New Resource Usage Tracker ENV vars⚠️ :
RESOURCE_USAGE_TRACKER_MISSED_HEARTBEAT_CHECK_ENABLED
=1RESOURCE_USAGE_TRACKER_MISSED_HEARTBEAT_INTERVAL_SEC
=300RESOURCE_USAGE_TRACKER_MISSED_HEARTBEAT_COUNTER_FAIL
=6