fix: healthcheck endpoint during graceful shutdown#71
Conversation
Signed-off-by: Kajetan <cv65kr@gmail.com>
WalkthroughThe recent updates focused on changing the HTTP status code returned by the Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- health.go (1 hunks)
- tests/plugin_test.go (1 hunks)
Additional comments not posted (2)
health.go (1)
30-30: The change to return HTTP 200 OK during a graceful shutdown is aligned with the PR objectives. Consider adding a comment explaining why a 200 status code is used during shutdown, as it might not be immediately clear to other developers or maintainers.tests/plugin_test.go (1)
572-572: The updated assertions in the test cases correctly check for the expected HTTP status codes during a graceful shutdown. Consider adding comments to explain why the /health endpoint returns 200 OK and the /ready endpoint returns 503 Service Unavailable during a shutdown, to clarify the test's intent.Also applies to: 580-580
Reason for This PR
Follow up for #65
Description of Changes
During shutdown
/health endpoint should returns 200
/ready endpoint should returns 503
License Acceptance
By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.
PR Checklist
[Author TODO: Meet these criteria.][Reviewer TODO: Verify that these criteria are met. Request changes if not]git commit -s).CHANGELOG.md.Summary by CodeRabbit
Bug Fixes
Tests