Introduce timeout keepalive timeout for connections with buildkit agents
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 4.5k
- Forks
- 682
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 29
Description
Description
Narrowing the scope of #1923 to a smaller change:
in our pipelines, while building larger images we experience occasional network interruptions in connections between buildx and buildkit which results in a "stale" connection where buildx waits for an undefined period of time (it times out due to our CI jobs having time limit) . Having a parameter to define wait time could help to detect broken connections sooner and retry rather than waiting indefinite amount of time for it to eventually fail and then retry.
To clarify - we could shorten timeouts for our jobs, but those timeouts cover the actual build and it can legitimately stretch for the entire duration of a timeout. However it's impossible from pipeline (or any scripting, really) perspective to distinguish between ongoing build and stale connection. Thus adding a timeout where we can state that "buildx is to give up connection with buildkit if there were no network exchange between the two for at least X minutes".
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how buildx manages connections to BuildKit agents and review any existing timeout or retry handling. The change is complete when a configurable idle network timeout detects stale connections, allows retrying, and does not limit legitimately long-running builds.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, go
- Domain
- build-system, networking
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100