Improve Docker image pull error message for network connectivity failures (REMOTE-2322) - #115
Draft
seemeroland wants to merge 1 commit into
Draft
Improve Docker image pull error message for network connectivity failures (REMOTE-2322)#115seemeroland wants to merge 1 commit into
seemeroland wants to merge 1 commit into
Conversation
When oz-agent-worker fails to pull a Docker image due to a network connectivity error (connection refused, dial timeout, no such host), add a hint that the failure may be caused by Docker Hub adding new egress IP addresses not yet allowlisted in the environment. This addresses REMOTE-2322 action item #3: improve user-facing error messages when cloud runs fail due to network connectivity issues. Previously the error was a generic 'failed to pull image X: <low-level network error>' which gave no context about the likely root cause. The improved message distinguishes network errors from other pull failures (auth errors, missing images) so operators can quickly identify allowlist gaps vs. other issues. Co-Authored-By: Oz <oz-agent@warp.dev>
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.
Summary
Improves the error message emitted by oz-agent-worker when Docker image pull fails due to a network connectivity error, addressing REMOTE-2322 action item #3 (improve user-facing error messages when cloud runs fail due to network connectivity issues).
Problem
Previously, when
ImagePullfailed with a network error, the logged message was a generic:This gave no context about why the connection might be failing, making it harder to diagnose allowlist gaps.
Change
Adds
isDockerNetworkError()which recognizesnet.OpError,url.Error, and string-based network error indicators (connection refused, dial tcp, etc.).When a network error is detected during image pull, the error message now includes a hint:
Non-network failures (auth errors, missing images, rate limits) continue to produce the original simpler message.
Testing
go build ./...passesgo test ./internal/worker/...passes (all existing tests continue to pass)Conversation: https://staging.warp.dev/conversation/ce430aa1-c96c-4c67-8312-e63b2d8bf3ec
Run: https://oz.staging.warp.dev/runs/019f95f3-a68d-70cf-9c37-1321a20d5b08
This PR was generated with Oz.