Make proxy request read timeout configurable - #6285
Open
Sanskarzz wants to merge 1 commit into
Open
Conversation
Sanskarzz
requested review from
ChrisJBurns,
JAORMX,
amirejaz,
aponcedeleonch,
blkt,
jerm-dro,
jhrozek,
rdimitrov,
reyortiz3 and
tgrunnagle
as code owners
August 12, 2026 09:31
Sanskarzz
force-pushed
the
configurable-1
branch
from
August 12, 2026 09:32
9c4f247 to
14532df
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6285 +/- ##
==========================================
- Coverage 72.86% 72.86% -0.01%
==========================================
Files 742 742
Lines 77807 77842 +35
==========================================
+ Hits 56694 56716 +22
- Misses 17141 17152 +11
- Partials 3972 3974 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Sanskarzz
force-pushed
the
configurable-1
branch
7 times, most recently
from
August 14, 2026 06:59
2b12ef8 to
0bb5a30
Compare
Signed-off-by: Sanskarzz <sanskar.gur@gmail.com>
Sanskarzz
force-pushed
the
configurable-1
branch
from
August 14, 2026 07:38
0bb5a30 to
f6df8b5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Proxy HTTP servers currently protect against slow or stalled request uploads with a fixed 30-second read timeout.
That secure default cannot be adjusted for workloads that legitimately need more time, or tightened for environments that
want a shorter limit.
thv run --proxy-read-timeoutand MCPServerspec.proxyReadTimeoutconfiguration.Fixes #5503
Type of change
Test plan
task test)task test-e2e)task lint-fix)task build)task operator-test-integration)Generated artifacts were refreshed with
task operator-generate,task operator-manifests,task crdref-gen, andtask docs.API Compatibility
v1beta1API, OR theapi-break-allowedlabel is applied and the migration guidance is described above.The MCPServer API change is additive and optional. Existing resources continue to use the proxy's 30-second default.
Changes
cmd/thv/app/run_flags.go--proxy-read-timeoutCLI flag and RunConfig builder wiring.pkg/runner/{config.go,config_builder.go,runner.go}pkg/transport/{types/transport.go,factory.go,stdio.go,http.go}cmd/thv-operator/api/v1beta1/mcpserver_types.gocmd/thv-operator/controllers/mcpserver_runconfig.goDoes this introduce a user-facing change?
Yes. CLI users can set
thv run --proxy-read-timeout <duration>, and Kubernetes users can setMCPServer.spec.proxyReadTimeout.Both accept Go duration values such as
45sor2m. Omitting the setting or specifying zero retains the 30-second default.Implementation plan
Approved implementation plan
persisted RunConfig boundaries.
transport.Configand the existingtransport factory to each proxy's typed
WithReadTimeoutoption.option for zero values.
affected documentation and CRD/OpenAPI artifacts.
Special notes for reviewers
mechanism.
WriteTimeout, so long-lived SSE responses remain unaffected.thv mcp serveretain their independent timeout behavior.