feat: configuration tunables#165
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughAdds configurable server ChangesProxy Timeout and Connection Pooling Configuration
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@internal/adapter/proxy/factory.go`:
- Around line 50-56: The current single type assertion that requires both
GetTLSHandshakeTimeout and GetResponseHeaderTimeout causes all optional mappings
to be skipped if any single method is missing; update the mapping to perform
separate, independent type assertions (or method-existence checks) for each
optional getter so each optional field on sherpaConfig (e.g.,
TLSHandshakeTimeout, ResponseHeaderTimeout and other optional Olla/pool
tunables) is set only when its specific getter exists — locate the block using
tlsCfg/GetTLSHandshakeTimeout/GetResponseHeaderTimeout and the similar block
around lines 71-83 and replace the combined assertion with per-method checks
that individually assign sherpaConfig fields when the corresponding getter is
present.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 020a9fe6-89b9-48c8-bf34-911fc434660b
📒 Files selected for processing (14)
config/config.yamldocs/content/configuration/reference.mdinternal/adapter/proxy/config.gointernal/adapter/proxy/config/unified.gointernal/adapter/proxy/factory.gointernal/adapter/proxy/olla/service.gointernal/adapter/proxy/olla/service_transport_test.gointernal/adapter/proxy/sherpa/service.gointernal/app/config.gointernal/app/services/http.gointernal/app/services/proxy.gointernal/config/config.gointernal/config/config_test.gointernal/config/types.go
Extends #164 to add extra tunables to Olla for tweaking things.
read_header_timeoutserver10sOLLA_SERVER_READ_HEADER_TIMEOUTconnection_keep_aliveproxy30sOLLA_PROXY_CONNECTION_KEEP_ALIVEresponse_header_timeoutproxy30sOLLA_PROXY_RESPONSE_HEADER_TIMEOUTtls_handshake_timeoutproxy10sOLLA_PROXY_TLS_HANDSHAKE_TIMEOUTAll four follow zero-value-means-default, so existing configs are unaffected. Each is also overridable via its
OLLA_env var, consistent with the rest of the config.Also in this PR (follow-ups to #164)
UpdateConfigdroppingResponseHeaderTimeout/TLSHandshakeTimeouton config reloadresponse_header_timeoutto the Sherpa engine (was hardcoded)config/config.yamland the canonical docs config blockSummary by CodeRabbit
New Features
Documentation
Tests