Skip to content

[ARC/DinD] Pass through tcp:// DOCKER_HOST to AWF in generated runtime command#38913

Merged
lpcox merged 4 commits into
mainfrom
copilot/support-tcp-docker-host
Jun 13, 2026
Merged

[ARC/DinD] Pass through tcp:// DOCKER_HOST to AWF in generated runtime command#38913
lpcox merged 4 commits into
mainfrom
copilot/support-tcp-docker-host

Conversation

Copilot AI commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

AWF command generation in gh-aw detected tcp:// Docker hosts for --docker-host-path-prefix but did not pass the Docker host itself through to AWF. In ARC RunnerScaleSet DinD setups (DOCKER_HOST=tcp://localhost:2375), this prevented native tcp host usage and forced unix-socket workarounds.

  • Runtime AWF command wiring

    • Added tcp host probe and passthrough in BuildAWFCommand:
      • initializes GH_AW_DOCKER_HOST
      • sets it from DOCKER_HOST when ^tcp:// matches
      • conditionally appends --docker-host "$GH_AW_DOCKER_HOST" to AWF invocation
    • Kept existing --docker-host-path-prefix /tmp/gh-aw probing and AWF version gating unchanged.
  • Test coverage updates

    • Expanded firewall command assembly assertions to validate --docker-host probe/setup and argument expansion.
    • Extended ARC/DinD detection script test to assert both:
      • docker-host passthrough value
      • docker-host-path-prefix value
    • Updated wasm golden snapshots affected by command output changes.
GH_AW_DOCKER_HOST=""
if [[ "${DOCKER_HOST:-}" =~ ^tcp:// ]]; then
  GH_AW_DOCKER_HOST="${DOCKER_HOST}"
fi

sudo -E awf ... ${GH_AW_DOCKER_HOST:+--docker-host "$GH_AW_DOCKER_HOST"} ...

Changeset

  • Type: patch
  • Description: Pass through DOCKER_HOST to AWF in generated runtime commands for ARC/DinD tcp hosts.

Generated by 📋 Changeset Generator for issue #38913 · 15.6 AIC · ⊞ 14.6K ·



✨ PR Review Safe Output Test - Run 27447488948

Warning

Firewall blocked 6 domains

The following domains were blocked by the firewall during workflow execution:

  • accounts.google.com
  • android.clients.google.com
  • clients2.google.com
  • contentautofill.googleapis.com
  • safebrowsingohttpgateway.googleapis.com
  • www.google.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "accounts.google.com"
    - "android.clients.google.com"
    - "clients2.google.com"
    - "contentautofill.googleapis.com"
    - "safebrowsingohttpgateway.googleapis.com"
    - "www.google.com"

See Network Configuration for more information.

💥 [THE END] — Illustrated by Smoke Claude · 80.9 AIC · ⌖ 9.18 AIC · ⊞ 8.1K ·

Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
Copilot AI changed the title [WIP] Support tcp:// DOCKER_HOST natively without unix socket workaround [ARC/DinD] Pass through tcp:// DOCKER_HOST to AWF in generated runtime command Jun 12, 2026
Copilot finished work on behalf of lpcox June 12, 2026 20:18
Copilot AI requested a review from lpcox June 12, 2026 20:18
@lpcox lpcox marked this pull request as ready for review June 12, 2026 21:38
Copilot AI review requested due to automatic review settings June 12, 2026 21:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates gh-aw’s AWF runtime command generation to correctly pass through DOCKER_HOST=tcp://... to AWF (via --docker-host) in ARC RunnerScaleSet DinD setups, while preserving existing --docker-host-path-prefix behavior and version gating.

Changes:

  • Added a DOCKER_HOST tcp:// probe that sets GH_AW_DOCKER_HOST and conditionally appends --docker-host "$GH_AW_DOCKER_HOST" to the generated AWF invocation.
  • Updated unit tests to assert the new probe/expansion ordering and validate runtime behavior for both docker-host passthrough and docker-host-path-prefix.
  • Refreshed WASM golden fixtures impacted by the command output change.
Show a summary per file
File Description
pkg/workflow/awf_helpers.go Adds GH_AW_DOCKER_HOST probe and conditional --docker-host expansion in generated AWF command.
pkg/workflow/firewall_args_test.go Expands assertions to validate docker-host passthrough probe/setup and correct ordering with existing path-prefix logic.
pkg/workflow/awf_helpers_test.go Extends ARC/DinD detection test to assert both docker-host value and docker-host-path-prefix value.
pkg/workflow/testdata/TestWasmGolden_CompileFixtures/with-imports.golden Updates golden output to include GH_AW_DOCKER_HOST init/probe and --docker-host expansion.
pkg/workflow/testdata/TestWasmGolden_CompileFixtures/smoke-copilot.golden Updates golden output to include GH_AW_DOCKER_HOST init/probe and --docker-host expansion.
pkg/workflow/testdata/TestWasmGolden_CompileFixtures/playwright-cli-mode.golden Updates golden output to include GH_AW_DOCKER_HOST init/probe and --docker-host expansion.
pkg/workflow/testdata/TestWasmGolden_CompileFixtures/basic-copilot.golden Updates golden output to include GH_AW_DOCKER_HOST init/probe and --docker-host expansion.
pkg/workflow/testdata/TestWasmGolden_AllEngines/pi.golden Updates golden output to include GH_AW_DOCKER_HOST init/probe and --docker-host expansion.
pkg/workflow/testdata/TestWasmGolden_AllEngines/gemini.golden Updates golden output to include GH_AW_DOCKER_HOST init/probe and --docker-host expansion.
pkg/workflow/testdata/TestWasmGolden_AllEngines/copilot.golden Updates golden output to include GH_AW_DOCKER_HOST init/probe and --docker-host expansion.
pkg/workflow/testdata/TestWasmGolden_AllEngines/codex.golden Updates golden output to include GH_AW_DOCKER_HOST init/probe and --docker-host expansion.
pkg/workflow/testdata/TestWasmGolden_AllEngines/claude.golden Updates golden output to include GH_AW_DOCKER_HOST init/probe and --docker-host expansion.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 12/12 changed files
  • Comments generated: 1

Comment thread pkg/workflow/awf_helpers.go Outdated
Comment on lines 201 to 203
@@ -202,6 +203,15 @@ func BuildAWFCommand(config AWFCommandConfig) string {
// This avoids requiring workflow-authored sandbox.agent.args for standard ARC DinD setups.
@github-actions

Copy link
Copy Markdown
Contributor

``
@copilot review all comments and address unresolved review feedback.

Generated by 👨‍🍳 PR Sous Chef · 50.1 AIC · ⌖ 1.01 AIC · ⊞ 17.3K ·

@github-actions

Copy link
Copy Markdown
Contributor

``
Refresh the branch, rerun checks, and share the remaining blocker summary.

Generated by 👨‍🍳 PR Sous Chef · 50.1 AIC · ⌖ 1.01 AIC · ⊞ 17.3K ·

@lpcox

lpcox commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

@copilot address review feedback

Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>

Copilot AI commented Jun 12, 2026

Copy link
Copy Markdown
Contributor Author

@copilot address review feedback

Updated the comment in [Fix inaccurate comment above ARC/DinD probe in BuildAWFCommand]($(git -C /home/runner/work/gh-aw/gh-aw rev-parse HEAD)). The comment now accurately describes both the DOCKER_HOST tcp:// probe/passthrough and the --docker-host-path-prefix emission.

@copilot address review feedback

Updated the comment in fd0e786. The comment now accurately describes both the DOCKER_HOST tcp:// probe/passthrough and the --docker-host-path-prefix emission.

@github-actions

github-actions Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟

No action needed: smoke test requires local verification and write-side effects, but no GitHub mutation has been completed yet.

@github-actions

github-actions Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

🎬 THE ENDSmoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨

@github-actions

github-actions Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

🚀 Smoke Antigravity MISSION COMPLETE! Antigravity has spoken. ✨

@github-actions

github-actions Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

⚠️ Smoke Gemini failed. Gemini encountered unexpected challenges...

@github-actions

github-actions Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

🚀 Smoke Pi MISSION COMPLETE! Pi delivered. 🥧

@github-actions

github-actions Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

✅ All tools validated successfully! Agent Container Smoke Test confirms agent container is ready.

@github-actions

Copy link
Copy Markdown
Contributor

📰 BREAKING: Smoke Copilot - AOAI (Entra) is now investigating this pull request. Sources say the story is developing...

@github-actions

Copy link
Copy Markdown
Contributor

📰 BREAKING: Smoke Copilot is now investigating this pull request. Sources say the story is developing...

@github-actions

Copy link
Copy Markdown
Contributor

📰 BREAKING: Smoke Copilot - AOAI (apikey) is now investigating this pull request. Sources say the story is developing...

@github-actions

Copy link
Copy Markdown
Contributor

Commit pushed: 3f0cf58

Generated by Changeset Generator · 15.6 AIC · ⊞ 14.6K

@github-actions

Copy link
Copy Markdown
Contributor

Agent Container Tool Check

Tool Status Version
bash 5.2.21
sh available
git 2.54.0
jq 1.7
yq v4.53.3
curl 8.5.0
gh 2.93.0
node v22.22.3
python3 3.11.15 (PyPy 7.3.23)
go 1.24.13
java 21.0.11 (Temurin)
dotnet 10.0.300

Result: 12/12 tools available ✅

Overall Status: PASS

🔧 Tool validation by Agent Container Smoke Test · 40.8 AIC · ⌖ 12.5 AIC · ⊞ 28.1K ·

@github-actions

Copy link
Copy Markdown
Contributor

Comment Memory

Quiet build logs hum
Merged PRs and fresh temp files
Smoke test breathes green

Note

This comment is managed by comment memory.

It stores persistent context for this thread in the code block at the top of this comment.
Edit only the text inside the backtick fences; workflow metadata and the footer are regenerated automatically.

Learn more about comment memory

Warning

Firewall blocked 6 domains

The following domains were blocked by the firewall during workflow execution:

  • accounts.google.com
  • android.clients.google.com
  • clients2.google.com
  • contentautofill.googleapis.com
  • safebrowsingohttpgateway.googleapis.com
  • www.google.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "accounts.google.com"
    - "android.clients.google.com"
    - "clients2.google.com"
    - "contentautofill.googleapis.com"
    - "safebrowsingohttpgateway.googleapis.com"
    - "www.google.com"

See Network Configuration for more information.

🔮 The oracle has spoken through Smoke Codex · 25.3 AIC · ⌖ 4.2 AIC · ⊞ 11.1K ·

@github-actions

Copy link
Copy Markdown
Contributor

💥 Smoke Test: Claude — Run 27447488948

Core #1-12: ✅ all passed
PR Review #13-18: ✅ all passed
#19 Close PR: ⚠️ skipped (no safe test PR)

Overall: PARTIAL ✅ (all executed tests passed)

Warning

Firewall blocked 6 domains

The following domains were blocked by the firewall during workflow execution:

  • accounts.google.com
  • android.clients.google.com
  • clients2.google.com
  • contentautofill.googleapis.com
  • safebrowsingohttpgateway.googleapis.com
  • www.google.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "accounts.google.com"
    - "android.clients.google.com"
    - "clients2.google.com"
    - "contentautofill.googleapis.com"
    - "safebrowsingohttpgateway.googleapis.com"
    - "www.google.com"

See Network Configuration for more information.

💥 [THE END] — Illustrated by Smoke Claude · 80.9 AIC · ⌖ 9.18 AIC · ⊞ 8.1K ·

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💥 Automated smoke test review - all systems nominal!

Warning

Firewall blocked 6 domains

The following domains were blocked by the firewall during workflow execution:

  • accounts.google.com
  • android.clients.google.com
  • clients2.google.com
  • contentautofill.googleapis.com
  • safebrowsingohttpgateway.googleapis.com
  • www.google.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "accounts.google.com"
    - "android.clients.google.com"
    - "clients2.google.com"
    - "contentautofill.googleapis.com"
    - "safebrowsingohttpgateway.googleapis.com"
    - "www.google.com"

See Network Configuration for more information.

💥 [THE END] — Illustrated by Smoke Claude · 80.9 AIC · ⌖ 9.18 AIC · ⊞ 8.1K

cp "${RUNNER_TEMP}/gh-aw/awf-config.json" /tmp/gh-aw/awf-config.json
export GH_AW_MODELS_JSON_PATH="/tmp/gh-aw/models.json"
GH_AW_DOCKER_HOST=""
if [[ "${DOCKER_HOST:-}" =~ ^tcp:// ]]; then

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Smoke test review: this (redacted) guard for GH_AW_DOCKER_HOST looks consistent with the path-prefix block above. 💥

fi
# shellcheck disable=SC1003
sudo -E awf --config "${RUNNER_TEMP}/gh-aw/awf-config.json" --container-workdir "${GITHUB_WORKSPACE}" --mount "${RUNNER_TEMP}/gh-aw:${RUNNER_TEMP}/gh-aw:ro" --mount "${RUNNER_TEMP}/gh-aw:/host${RUNNER_TEMP}/gh-aw:ro" ${GH_AW_TOOL_CACHE_MOUNT:+--mount "$GH_AW_TOOL_CACHE_MOUNT"} ${GH_AW_DOCKER_HOST_PATH_PREFIX_ARGS} --env-all --exclude-env COPILOT_GITHUB_TOKEN --exclude-env GITHUB_MCP_SERVER_TOKEN --exclude-env MCP_GATEWAY_API_KEY --log-level info --proxy-logs-dir /tmp/gh-aw/sandbox/firewall/logs --audit-dir /tmp/gh-aw/sandbox/firewall/audit --enable-host-access --allow-host-ports 80,443,8080 --skip-pull \
sudo -E awf --config "${RUNNER_TEMP}/gh-aw/awf-config.json" --container-workdir "${GITHUB_WORKSPACE}" --mount "${RUNNER_TEMP}/gh-aw:${RUNNER_TEMP}/gh-aw:ro" --mount "${RUNNER_TEMP}/gh-aw:/host${RUNNER_TEMP}/gh-aw:ro" ${GH_AW_TOOL_CACHE_MOUNT:+--mount "$GH_AW_TOOL_CACHE_MOUNT"} ${GH_AW_DOCKER_HOST:+--docker-host "$GH_AW_DOCKER_HOST"} ${GH_AW_DOCKER_HOST_PATH_PREFIX_ARGS} --env-all --exclude-env COPILOT_GITHUB_TOKEN --exclude-env GITHUB_MCP_SERVER_TOKEN --exclude-env MCP_GATEWAY_API_KEY --log-level info --proxy-logs-dir /tmp/gh-aw/sandbox/firewall/logs --audit-dir /tmp/gh-aw/sandbox/firewall/audit --enable-host-access --allow-host-ports 80,443,8080 --skip-pull \

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Smoke test review: passing --docker-host conditionally via parameter expansion is a clean approach. 👍

@github-actions

Copy link
Copy Markdown
Contributor

Smoke Test Results:

  1. GitHub MCP: ✅
  2. mcpscripts-gh: ✅
  3. Serena CLI: ✅
  4. Playwright CLI: ✅
  5. Web fetch: ✅
  6. File+bash: ✅
  7. Discussion comment: ✅
  8. Build: ✅
  9. Artifact upload: skipped
    Overall: PASS

📰 BREAKING: Report filed by Smoke Copilot - AOAI (Entra) · 117.8 AIC · ⌖ 5.09 AIC · ⊞ 19K ·

@github-actions

Copy link
Copy Markdown
Contributor

PR: [ARC/DinD] Pass through (redacted) DOCKER_HOST to AWF in generated runtime command
1 ✅ MCP fallback read / ❌ no MCP tool
2 ✅ mcpscripts
3 ✅ Serena
4 ✅ Playwright
5 ❌ no web-fetch tool
6 ✅ file+bash
7-15 pending/done in issue
FAIL · @app/copilot-swe-agent · assignees: lpcox, Copilot

Warning

Firewall blocked 6 domains

The following domains were blocked by the firewall during workflow execution:

  • accounts.google.com
  • android.clients.google.com
  • clients2.google.com
  • contentautofill.googleapis.com
  • safebrowsingohttpgateway.googleapis.com
  • www.google.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "accounts.google.com"
    - "android.clients.google.com"
    - "clients2.google.com"
    - "contentautofill.googleapis.com"
    - "safebrowsingohttpgateway.googleapis.com"
    - "www.google.com"

See Network Configuration for more information.

📰 BREAKING: Report filed by Smoke Copilot · 218.8 AIC · ⌖ 16.6 AIC · ⊞ 20.3K ·

@lpcox lpcox merged commit 6995b39 into main Jun 13, 2026
30 checks passed
@lpcox lpcox deleted the copilot/support-tcp-docker-host branch June 13, 2026 00:29
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.

3 participants