Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughAdded a new documentation page for Armeria's graceful shutdown and updated the site sidebar to include the new page. The doc describes the two-phase shutdown (quiet period + timeout), configuration APIs, Spring Boot integration defaults, and operational guidance. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@site-new/src/content/docs/server/graceful-shutdown.mdx`:
- Around line 27-40: The Java examples calling HttpResponse.of("OK") are missing
the import for com.linecorp.armeria.common.HttpResponse; update the examples
(the snippets that build Server/ServerBuilder and call HttpResponse.of) to
include the import statement for HttpResponse alongside the existing imports so
the code is copy-paste runnable and references the HttpResponse class used by
ServerBuilder/Server.
- Line 25: Update the incomplete link syntax for the ServerBuilder references:
replace the occurrences of "(type)" used after "ServerBuilder" with the full
scheme format used elsewhere, i.e. "(type://serverbuilder)" so the API link
matches the existing "(type://...)" pattern and points to the ServerBuilder type
consistently.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 7cfed2bd-a420-4eed-b47a-945ca282e608
📒 Files selected for processing (2)
site-new/sidebars.tssite-new/src/content/docs/server/graceful-shutdown.mdx
| 1. **Quiet period** - The server waits until there are no pending responses and no active | ||
| blocking tasks. Once this idle state persists for the configured quiet period duration, | ||
| the server proceeds to shut down. |
There was a problem hiding this comment.
nit; in terms of wording, what do you think of the following which gives more context on the purpose of quiet period?
| 1. **Quiet period** - The server waits until there are no pending responses and no active | |
| blocking tasks. Once this idle state persists for the configured quiet period duration, | |
| the server proceeds to shut down. | |
| 1. **Quiet period** - When shutdown begins, the server stops passing health checks and enters a quiet period. During this period, existing requests and blocking tasks are allowed to complete, and clients can observe that the server is no longer healthy. After the configured quiet period has passed since the last running request completed, the server proceeds with shutdown. |
There was a problem hiding this comment.
Thanks! Updated the quiet period description to clarify the health check transition and the observation window before shutdown.
| :::tip | ||
|
|
||
| Even if `toExceptionFunction` throws an unexpected exception, the server will fall back to the | ||
| default `503 Service Unavailable` response. This ensures that a bug in your custom function | ||
| never breaks the shutdown process. | ||
|
|
||
| ::: |
There was a problem hiding this comment.
nit) I prefer this is not in the documentation as I don't want to encourage users to throw an exception in the function
There was a problem hiding this comment.
Removed the tip. Agreed that it could read as encouraging exceptions from the function.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6713 +/- ##
============================================
- Coverage 74.46% 0 -74.47%
============================================
Files 1963 0 -1963
Lines 82437 0 -82437
Branches 10764 0 -10764
============================================
- Hits 61385 0 -61385
+ Misses 15918 0 -15918
+ Partials 5134 0 -5134 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Motivation:
Users frequently ask about
GracefulShutdownconfiguration, but there is nodedicated documentation page. The only references exist in release notes and
Spring Boot integration code, making it hard for users to discover and
understand the graceful shutdown behavior.
Modifications:
server/graceful-shutdown.mdxcovering:ServerBuilder.gracefulShutdownTimeout()GracefulShutdown.builder()with customshutdown responses using
toExceptionFunction()server/graceful-shutdownentry tosidebars.tsunder the Servercategory, after
timeoutsResult:
GracefulShutdown#6345in Armeria servers