feat: add configurable HTTP client timeouts via config file#1882
feat: add configurable HTTP client timeouts via config file#1882piotrjanik wants to merge 1 commit intoopen-component-model:mainfrom
Conversation
e75480a to
b509b62
Compare
8e071bf to
792d8f5
Compare
| ) | ||
|
|
||
| const ( | ||
| ATTR_KEY = "ocm.software/ocm/api/datacontext/attrs/httptimeout" |
There was a problem hiding this comment.
nit: if this is an attribute config and not a normal config its impossible for us to use in v2, so im wondering if an attr should even be included
There was a problem hiding this comment.
@jakobmoellerdev I followed the rootcertsattr implementation and replicated it here. Why could this be a problem for v2?
There was a problem hiding this comment.
because attribute configs by design are problematic in v2 due to our plugin nature so we do not support any attribtue configuration in v2 atm
There was a problem hiding this comment.
@jakobmoellerdev I have created this PR with different approach: https://github.com/open-component-model/ocm/pull/1887/changes
This one should use config file only.
jakobmoellerdev
left a comment
There was a problem hiding this comment.
2 nits on parsing, apart from that LGTM
matthiasbruns
left a comment
There was a problem hiding this comment.
lgtm now - only the nits from jakob
c7fcbcc to
2ed48d4
Compare
<!-- markdownlint-disable MD041 --> Introduce the `http.config.ocm.software/v1alpha1` config type for controlling HTTP client timeouts (dial, TLS handshake, response header, idle connection, keep-alive, and overall timeout). Timeouts are configured exclusively through the OCM config file using Go duration strings. When not set, `http.DefaultTransport` values are preserved unchanged. - Add `httpcfgattr` package with Duration type - Add `api/utils/httpclient` transport factory (clones DefaultTransport, selectively overrides from config) - Wire HTTP settings into docker daemon and OCI registry clients - Add integration tests using toxiproxy for timeout verification - Update docs with new config type documentation Fixes: open-component-model#1731 Signed-off-by: Piotr Janik <piotr.janik@sap.com>
2ed48d4 to
1453795
Compare
|
so this can be closed for the other pr? #1887 |
Introduce the
http.config.ocm.software/v1alpha1config type forcontrolling HTTP client timeouts (dial, TLS handshake, response header,
idle connection, keep-alive, and overall timeout). Timeouts are configured exclusively through the OCM config. When not set,
http.DefaultTransportvalues are preserved unchanged.api/utils/httpclienttransport factory (clones DefaultTransport,selectively overrides from config)
Fixes: #1731