Return partial MCP logs results before gateway timeout#52412
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
PR TriageCategory: bug | Risk: medium | Priority: medium | Score: 48/100 Score breakdown: impact 25/50, urgency 15/30, quality 8/20 CI: unknown (draft) Recommended action: Useful fix but still draft, no reviews yet, CI unstable. Automated triage — run 52412
|
PR TriageCategory: bug · Risk: medium · Priority: medium Reliability fix for partial MCP logs results before gateway timeout. CI status unavailable; moderate size — deferred pending status confirmation.
|
|
@copilot must indicate that results are partial in response |
There was a problem hiding this comment.
Pull request overview
Adds gateway-aware soft timeouts so MCP log requests return partial results before gateway deadlines expire.
Changes:
- Derives a second-level cutoff from the MCP request deadline.
- Propagates the resolved timeout through log orchestration.
- Adds focused timeout-resolution tests.
Show a summary per file
| File | Description |
|---|---|
pkg/cli/mcp_tools_privileged.go |
Computes and forwards the gateway-aware soft timeout. |
pkg/cli/logs_timeout_test.go |
Tests MCP soft-timeout calculation. |
pkg/cli/logs_orchestrator_unit_test.go |
Tests second-based context deadlines. |
pkg/cli/logs_orchestrator_types.go |
Adds second-level timeout configuration. |
pkg/cli/logs_orchestrator_download.go |
Applies and tracks the resolved timeout duration. |
pkg/cli/logs_command.go |
Adds the hidden internal timeout flag. |
Review details
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 6/6 changed files
- Comments generated: 0
- Review effort level: Balanced
|
@copilot Triage nudge from sous-chef. Please inspect the latest branch state, address any remaining review feedback, refresh the branch, and run the No failed checks were included in the compact candidate set.
|
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
The |
Ran the
Actions taken: verification pass only — no new file changes were required, so nothing new was pushed. |
🔍 PR TriageCategory: bug · Risk: medium · Priority score: 58/100 (impact 25, urgency 18, quality 15) Score breakdown:
|
The
agenticworkflows logsMCP tool could exceed the gateway’s ~60s request deadline on larger filtered queries such ascount+start_date, causing the call to fail instead of returning collected data with a continuation cursor.Gateway-aware soft timeout
gh aw logsso it can stop cleanly before the gateway closes the request.Second-level logs timeout
--timeout-secondssupport for MCP-internal use.--timeoutbehavior unchanged.Timeout propagation
This lets MCP calls return partial JSON plus continuation data instead of failing with
context deadline exceeded.