feat: add configurable HTTP client timeouts via config file#1887
Merged
piotrjanik merged 12 commits intoApr 14, 2026
Conversation
8599a48 to
b8ce426
Compare
0a0b33f to
3323822
Compare
jakobmoellerdev
previously approved these changes
Mar 31, 2026
Skarlso
reviewed
Mar 31, 2026
Contributor
Skarlso
left a comment
There was a problem hiding this comment.
Largely okay, just spotted a few things here :)
3323822 to
d76a870
Compare
d76a870 to
2afa846
Compare
2afa846 to
4463564
Compare
fabianburth
reviewed
Apr 8, 2026
frewilhelm
reviewed
Apr 8, 2026
b4c1225 to
eec9940
Compare
morri-son
reviewed
Apr 8, 2026
5ce8494 to
6ab17a2
Compare
6ab17a2 to
9e2fae1
Compare
Adds a new `http.config.ocm.software` config type that allows users to
configure HTTP client timeout settings for OCI registry and Docker daemon
connections. This prevents requests from hanging indefinitely on slow or
broken networks.
Supported timeout fields (all optional, Go duration strings like "30s", "5m"):
- timeout — overall http.Client deadline
- tcpDialTimeout — TCP connection establishment
- tcpKeepAlive — TCP keep-alive probe interval
- tlsHandshakeTimeout — TLS handshake
- responseHeaderTimeout — waiting for response headers
- idleConnTimeout — idle connection lifetime
Design:
- Follows the regular OCI config pattern (like credentials config) —
HTTPSettings is stored on the OCI context via
GetHTTPSettings()/SetHTTPSettings(), not as a datacontext attribute.
- Duration is a validated string type with TimeDuration() returning
(*time.Duration, error) — nil means "not configured" (use default),
distinct from zero ("explicitly disabled").
- httpclient.NewTransport() clones http.DefaultTransport and selectively
overrides only the configured timeouts.
- Integration tests use Toxiproxy to verify timeout behavior against a
real registry with injected latency.
Fixes: open-component-model#1731
Signed-off-by: Piotr Janik <piotr.janik@sap.com>
# Conflicts:
# go.mod
# go.sum
Signed-off-by: Piotr Janik <piotr.janik@sap.com> # Conflicts: # go.mod # go.sum
Signed-off-by: Piotr Janik <piotr.janik@sap.com>
Signed-off-by: Piotr Janik <piotr.janik@sap.com>
Signed-off-by: Piotr Janik <piotr.janik@sap.com>
Signed-off-by: Piotr Janik <piotr.janik@sap.com>
Signed-off-by: Piotr Janik <piotr.janik@sap.com>
9e2fae1 to
5ef77a3
Compare
Signed-off-by: Piotr Janik <piotr.janik@sap.com>
5ef77a3 to
5e31965
Compare
jakobmoellerdev
approved these changes
Apr 13, 2026
Skarlso
approved these changes
Apr 14, 2026
Member
|
please go through and resolve conversations |
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.
What this PR does / why we need it
Adds a new
http.config.ocm.softwareconfig type that allows users to configure HTTP client timeout settings for OCI registry and Docker daemon connections. This prevents requests from hanging indefinitely on slow or broken networks.Supported timeout fields (all optional, Go duration strings like "30s", "5m"):
Design:
Which issue(s) this PR fixes
Fixes: #1731
What this PR does / why we need it
Which issue(s) this PR is related to