Skip to content

docker-container: give readiness wait a full startup timeout - #4050

Open
crazy-max wants to merge 1 commit into
docker:masterfrom
crazy-max:fix-docker-container-readiness-wait
Open

docker-container: give readiness wait a full startup timeout#4050
crazy-max wants to merge 1 commit into
docker:masterfrom
crazy-max:fix-docker-container-readiness-wait

Conversation

@crazy-max

Copy link
Copy Markdown
Member

relates to https://github.com/docker/buildx/actions/runs/33654939933/job/100331039441#step:7:2387

=== Failed
=== FAIL: tests TestIntegration/TestBuildPolicyImageName/worker=docker-container/config-label-allow (0.07s)
    policy_build.go:579:
        	Error Trace:	/src/tests/policy_build.go:579
        	Error:      	Received unexpected error:
        	            	exit status 1
        	Test:       	TestIntegration/TestBuildPolicyImageName/worker=docker-container/config-label-allow
        	Messages:   	ERROR: failed to build: waiting for BuildKit: DeadlineExceeded: context deadline exceeded while waiting for connections to become ready
        --- FAIL: TestIntegration/TestBuildPolicyImageName/worker=docker-container/config-label-allow (0.07s)

A recently started builder should use its StartedAt timestamp to decide whether BuildKit may still be coming up, but not as the absolute deadline for the client readiness wait.

When the first client request arrived near the end of that startup window, the wait could inherit only a few milliseconds and fail with DeadlineExceeded even though the builder was still legitimately starting. Give those recent containers a fresh bounded wait from the current time while continuing to skip the wait for established builders.

A recently started builder should use its StartedAt timestamp to decide whether BuildKit may
still be coming up, but not as the absolute deadline for the client readiness wait.

When the first client request arrived near the end of that startup window, the wait could inherit
only a few milliseconds and fail with DeadlineExceeded even though the builder was still
legitimately starting. Give those recent containers a fresh bounded wait from the current time
while continuing to skip the wait for established builders.

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant