OLS-3743 Wire Agent.spec.timeouts to HTTP client and sandbox requests - #438
OLS-3743 Wire Agent.spec.timeouts to HTTP client and sandbox requests#438vimalk78 wants to merge 1 commit into
Conversation
📝 WalkthroughSummary by CodeRabbit
WalkthroughChangesTimeout propagation
Sequence Diagram(s)sequenceDiagram
participant SandboxAgentCaller
participant AgentConfiguration
participant AgentHTTPClient
participant AgentEndpoint
SandboxAgentCaller->>AgentConfiguration: Read step timeout
AgentConfiguration-->>SandboxAgentCaller: Return configured or default timeout
SandboxAgentCaller->>AgentHTTPClient: Create client with timeout
SandboxAgentCaller->>AgentHTTPClient: Run with timeoutMs
AgentHTTPClient->>AgentEndpoint: Send timeout_ms
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Comment |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
The Agent CRD's per-step timeout fields (analysisSeconds, executionSeconds, verificationSeconds) were defined but never read by the controller. The HTTP client used a hardcoded 5-minute timeout and the sandbox received no timeout_ms in the request body. Thread the per-step timeout from Agent.Spec.Timeouts through callWithSandbox to both NewAgentHTTPClient (sets http.Client.Timeout) and the request body (sets timeout_ms so the sandbox can gracefully wind down). Fall back to the existing 5-minute default when the Agent CR has no timeout configured for the step. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Vimal Kumar <vimal78@gmail.com>
d2aa1af to
619af28
Compare
|
@vimalk78: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
PR needs rebase. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Summary
Agent.spec.timeouts(analysisSeconds, executionSeconds, verificationSeconds) through to the HTTP client timeout and thetimeout_msfield in the sandbox request bodytimeout_mswas never sent, so configured timeouts were silently ignoredtimeoutForStephelper that reads the per-step timeout from the Agent CR and falls back to the 5-minute default when unsettimeout_msso the sandbox can return a structured timeout response instead of being cut off by a transport errorTest plan
timeoutForStepreturns correct duration per step, defaults for nil/unset agenttimeout_mspropagated in request body, omitted when nilcallWithSandboxthreads Agent CR timeout to both HTTP client and request bodyanalysisSeconds: 9with a slow mock agent → sandbox returns structured "Agent timed out after 9000ms" instead of raw transport errormake test,make fmt,make vetpass🤖 Generated with Claude Code