feat: make executor timeout configurable via server config#6285
feat: make executor timeout configurable via server config#6285NETIZEN-11 wants to merge 2 commits into
Conversation
- Add ExecutionTimeout field to EventConfig with 5m default - Update ExecutorEventHandler to accept and use configurable timeout - Implement fallback to DefaultExecutionTimeout for invalid values - Add logging for effective timeout during initialization - Update service layer to pass config timeout to handler - Add comprehensive tests for timeout configuration and fallback - Update example config with execution_timeout documentation Fixes mindersec#6282 Signed-off-by: NETIZEN-11 <kumarnitesh121411@gmail.com>
evankanderson
left a comment
There was a problem hiding this comment.
Thanks for this. Could you coordinate with #6278 (and the comments there), since this seems to be a duplicate of that PR?
In particular, see the comment on #6278 (comment) about testing the timeout / cancellation behavior with a small requested timeout of e.g. 1-5 seconds, and a task which would try to execute for longer?
|
Hello @NETIZEN-11 -- are you likely to return to this PR? |
evankanderson
left a comment
There was a problem hiding this comment.
I'm marking this PR as "request changes" (needs to integrate the cancellation testing from #6278) to help track which outstanding PRs need maintainer action vs contributor action.
|
This PR needs additional information before we can continue. It is now marked as stale because it has been open for 30 days with no activity. Please provide the necessary details to continue or it will be closed in 30 days. |
Description
Fixes #6282
This PR makes the executor timeout configurable via server configuration instead of being hardcoded. Previously, the executor relied on a fixed
DefaultExecutionTimeout, which limited flexibility across different environments (e.g., development, CI, production).With this change, users can now control execution timeout behavior through configuration without modifying code.
Changes
ExecutionTimeoutfield toEventConfig(default: 5m)ExecutorEventHandlerto use configurable timeoutDefaultExecutionTimeoutfor invalid values (≤ 0)Behavior
execution_timeout> 0 → use configured valueexecution_timeout≤ 0 or missing → fallback toDefaultExecutionTimeoutConfiguration Example
Testing
All existing tests pass
Added
TestNewExecutorEventHandler_TimeoutConfigurationCovered:
Custom timeout usage
Zero value fallback
Negative value fallback
No regressions observed
Build and lint checks pass
Notes
Checklist