Conversation
* Add the middleware for the request timeout. Make it configurable with custom durations and handlers in case of timeout. * Add configuration environment variables for the timeout used by the middleware for the endpoints, and another for the URL of the Discord webhook. * Add unit tests. * Wrap this middleware for the main server before wrapping the `TracingLogger`.
There was a problem hiding this comment.
Pull request overview
Adds a configurable request-timeout notification middleware to the game-api Actix server, with tracing + Discord webhook handlers and accompanying configuration/tests.
Changes:
- Introduce
RequestTimeoutNotifiermiddleware and timeout handlers (tracing + webhook) with unit tests. - Add env configuration for request timeout duration and the timeout-warning Discord webhook URL.
- Wire the middleware into the server stack and update dependencies / CI Rust toolchain.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
crates/game_api/src/main.rs |
Registers the timeout notifier middleware in the Actix middleware chain. |
crates/game_api/src/env.rs |
Adds REQUEST_TIMEOUT_MS and WEBHOOK_REQUEST_TIMEOUT configuration entries. |
crates/game_api/src/configure/slow_req_mw.rs |
Implements the timeout notifier middleware, handlers, and unit tests. |
crates/game_api/src/configure.rs |
Exposes the new slow_req_mw module. |
crates/game_api/Cargo.toml |
Makes pin-project-lite a non-optional dependency and adjusts feature wiring. |
.github/workflows/docs.yml |
Bumps the Rust toolchain version used for docs workflow. |
.github/workflows/ci.yml |
Bumps the Rust toolchain version used for CI workflow. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Refs: #121.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
TracingLogger.