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

Make ConnectionPoolHealthCheck always healthy #5888

Merged
merged 1 commit into from
May 21, 2024

Conversation

coverbeck
Copy link
Contributor

@coverbeck coverbeck commented May 17, 2024

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.

  • Security and Privacy assessed

e.g. Does this change...

  • Any user data we collect, or data location?
  • Access control, authentication or authorization?
  • Encryption features?

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

  • Check that you pass the basic style checks and unit tests by running mvn clean install
  • Ensure that the PR targets the correct branch. Check the milestone or fix version of the ticket.
  • Follow the existing JPA patterns for queries, using named parameters, to avoid SQL injection
  • If you are changing dependencies, check the Snyk status check or the dashboard to ensure you are not introducing new high/critical vulnerabilities
  • Assume that inputs to the API can be malicious, and sanitize and/or check for Denial of Service type values, e.g., massive sizes
  • Do not serve user-uploaded binary images through the Dockstore API
  • Ensure that endpoints that only allow privileged access enforce that with the @RolesAllowed annotation
  • Do not create cookies, although this may change in the future
  • If this PR is for a user-facing feature, create and link a documentation ticket for this feature (usually in the same milestone as the linked issue). Style points if you create a documentation PR directly and link that instead.

@coverbeck coverbeck self-assigned this May 17, 2024
Copy link

sonarcloud bot commented May 17, 2024

Copy link

codecov bot commented May 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

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

Additional details and impacted files
@@            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 Coverage Δ
bitbuckettests 27.13% <0.00%> (+<0.01%) ⬆️
integrationtests 58.37% <100.00%> (+<0.01%) ⬆️
languageparsingtests 11.08% <0.00%> (+<0.01%) ⬆️
localstacktests 21.68% <0.00%> (+<0.01%) ⬆️
toolintegrationtests 30.48% <0.00%> (+<0.01%) ⬆️
unit-tests_and_non-confidential-tests 28.46% <0.00%> (+<0.01%) ⬆️
workflowintegrationtests 38.67% <0.00%> (+0.01%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@coverbeck coverbeck merged commit 23aa2ea into develop May 21, 2024
18 checks passed
@coverbeck coverbeck deleted the feature/seab-4879/dbconnections branch May 21, 2024 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants