Repository navigation
Raise container runtime probe timeout and report failure reason - #17107
Merged
Merged
Conversation
docker info can exceed the 2s probe timeout on busy CI runners, causing --validate-env to intermittently reject a reachable daemon (github/gh-aw run 45071906569). Raise the timeout to 15s and include the timeout or runtime stderr in the validation error. Co-authored-by: Copilot App <[email protected]>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The runtime probe can hang past its deadline when a child inherits stderr, requiring a bounded cmd.WaitDelay and a regression test covering a non-exec child.
1 open issue
What changed in this PR
This PR aims to reduce intermittent MCP Gateway startup failures on busy runners by allowing more time for container runtime probes and reporting why they fail.
Changes:
- Increase the shared runtime probe timeout from 2s to 15s.
- Add error-returning accessibility helpers and include failure details in environment validation.
- Add slow-probe, timeout, and stderr tests while keeping inspect timeout tests fast.
| File | Description |
|---|---|
internal/sys/docker.go |
Raises the probe timeout and adds diagnostic errors while preserving boolean helpers. |
internal/sys/docker_mock_test.go |
Adds probe failure tests and a test-only timeout override. |
internal/config/validation_env.go |
Includes runtime failure reasons in validation messages. |
internal/config/validation_env_test.go |
Updates the expected Docker validation error. |
Review effort: Balanced (adaptive)
This comment has been minimized.
This comment has been minimized.
Add a wait delay for command execution to handle pipe draining. Co-authored-by: Copilot Autofix powered by AI <[email protected]>
Contributor
🔒 mcpg Read-Only Stress — defaultSurface coverage: MCP tool calls + proxied CLI (REST) + GraphQL mutations
Overall: INCONCLUSIVE Notes:
|
This was referenced Nov 22, 2026
This was referenced Nov 23, 2026
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.

Problem
github/gh-aw run 45071906569 failed at Start MCP Gateway: both startup attempts exited with
--validate-envreportingDocker daemon is not accessible. Run 45042646477 hit the same error on its first attempt and passed on retry, so the failure is intermittent.The likely cause is 241169b (first released in v0.5.12), which bounded the
docker infoprobe at 2s. On busyubuntu-26.04runners, right after the image pulls,docker infocan exceed that limit, so a reachable daemon was rejected. This hasn't been confirmed: the probe discardeddocker info's stderr and didn't record whether it timed out.Changes
containerRuntimeCommandTimeoutfrom 2s to 15s. It is now a var so tests can shorten it. The limit also applies todocker inspect.DockerAccessErrorandContainerRuntimeAccessError, which return the reason for a failure: socket not found, timeout, or the runtime's stderr (capped at 512 bytes). The existing bool helpers wrap them.--validate-enverrors now include the reason, e.g.Docker daemon is not accessible (docker info timed out after 15s). Ensure ….Tests
TestDockerAccessErrorcases: a slow probe that still succeeds, a timeout, and a failure that reports stderr.TestValidateExecutionEnvironmentForRuntime_DockerPathErrorupdated for the new message.TestRunDockerInspect_TimesOutnow shortens the timeout so it stays fast.make agent-finishedpasses.