dockstore / dockstore

Our VM/Docker sharing infrastructure and management component
https://dockstore.org/
Apache License 2.0
116 stars 27 forks source link

Make ConnectionPoolHealthCheck always healthy #5888

Closed coverbeck closed 1 month ago

coverbeck commented 1 month ago

Description We were considering all active DB connections in use as meaning the container is unhealthy. But it doesn't necessarily mean that, it could be the results of a wave of requests. If that's the case, marking the container unhealthy will only exacerbate the problem, as it can push more load on the healthy containers, making them unhealthy, etc. See SEAB-4879's comments, where this is discussed in more detail.

We could just remove the health check entirely, but then it's another PR to dockstore-deploy to not invoke the check. I figured it was better/easier to keep the framework and log a message. And if we find a way to determine unhealthiness in the future, the scaffolding is there. But if others feel we should just remove the check entirely, please opine.

Review Instructions Hard to review, try to slam environment to chew up DB connections, and make sure that container does not get shut down due to being unhealthy. Even without this change, I've been unable to make the container go unhealthy, so it will be hard to verify. Make sure there's no regression at least.

Issue SEAB-4879

Security and Privacy

If there are any concerns that require extra attention from the security team, highlight them here and check the box when complete.

e.g. Does this change...

Please make sure that you've checked the following before submitting your pull request. Thanks!

sonarcloud[bot] commented 1 month ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
100.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

codecov[bot] commented 1 month ago

Codecov Report

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

Project coverage is 73.73%. Comparing base (0430bbe) to head (d726867).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #5888 +/- ## ========================================== Coverage 73.72% 73.73% Complexity 5260 5260 ========================================== Files 371 371 Lines 19206 19205 -1 Branches 2012 2012 ========================================== Hits 14160 14160 + Misses 4091 4090 -1 Partials 955 955 ``` | [Flag](https://app.codecov.io/gh/dockstore/dockstore/pull/5888/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dockstore) | Coverage Δ | | |---|---|---| | [bitbuckettests](https://app.codecov.io/gh/dockstore/dockstore/pull/5888/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dockstore) | `27.13% <0.00%> (+<0.01%)` | :arrow_up: | | [integrationtests](https://app.codecov.io/gh/dockstore/dockstore/pull/5888/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dockstore) | `58.37% <100.00%> (+<0.01%)` | :arrow_up: | | [languageparsingtests](https://app.codecov.io/gh/dockstore/dockstore/pull/5888/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dockstore) | `11.08% <0.00%> (+<0.01%)` | :arrow_up: | | [localstacktests](https://app.codecov.io/gh/dockstore/dockstore/pull/5888/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dockstore) | `21.68% <0.00%> (+<0.01%)` | :arrow_up: | | [toolintegrationtests](https://app.codecov.io/gh/dockstore/dockstore/pull/5888/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dockstore) | `30.48% <0.00%> (+<0.01%)` | :arrow_up: | | [unit-tests_and_non-confidential-tests](https://app.codecov.io/gh/dockstore/dockstore/pull/5888/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dockstore) | `28.46% <0.00%> (+<0.01%)` | :arrow_up: | | [workflowintegrationtests](https://app.codecov.io/gh/dockstore/dockstore/pull/5888/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dockstore) | `38.67% <0.00%> (+0.01%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dockstore#carryforward-flags-in-the-pull-request-comment) to find out more.

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