Skip to content

Commit 86d844e

Browse files
Copilotpelikhan
andauthored
Move MCP gateway volume mounts from shell script to compiler generation (#9469)
* Initial plan * Initial plan for moving MCP gateway mounts from shell script to compiler Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> * Move MCP gateway mounts from shell script to compiler generation - Add Mounts field to MCPGatewayRuntimeConfig struct - Update ensureDefaultMCPGatewayConfig to set default mounts - Update container command generation to include volume mounts - Remove hardcoded mounts from start_mcp_gateway.sh - Add comprehensive tests for mount generation - Default mounts: /opt:/opt:ro, /tmp:/tmp:rw, ${GITHUB_WORKSPACE}:${GITHUB_WORKSPACE}:rw - Supports custom mount configuration via sandbox.mcp.mounts Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> * Recompile all workflows with new mount generation All lock files now include volume mounts in MCP_GATEWAY_DOCKER_COMMAND: - -v /opt:/opt:ro - -v /tmp:/tmp:rw - -v '${GITHUB_WORKSPACE}:${GITHUB_WORKSPACE}:rw' This completes the migration from hardcoded mounts in the shell script to compiler-generated mounts in the docker command. Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> * Fix docker command format by removing nested quoting for mounts The issue was that mounts were being quoted individually with shellQuote() and then the entire command was quoted again, causing malformed syntax like: -v '\''${GITHUB_WORKSPACE}:${GITHUB_WORKSPACE}:rw'\'' Fixed by not quoting individual mounts since the entire command is wrapped in quotes. Now generates correct format: -v ${GITHUB_WORKSPACE}:${GITHUB_WORKSPACE}:rw Updated test to match the new behavior. Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> * Allow GITHUB_WORKSPACE variable expansion in docker command Changed the docker command export format to allow ${GITHUB_WORKSPACE} to be expanded at runtime. Previously it was wrapped in single quotes which prevented expansion. New format: 'docker run ... -v '"${GITHUB_WORKSPACE}"':'"${GITHUB_WORKSPACE}"':rw ...' This closes the single quote before the variable, adds it in double quotes for expansion, then reopens the single quote. When executed with $MCP_GATEWAY_DOCKER_COMMAND, ${GITHUB_WORKSPACE} will now be properly expanded to the actual workspace path. Added buildDockerCommandWithExpandableVars() function to handle this special quoting for variables that need runtime expansion. Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
1 parent d47f859 commit 86d844e

121 files changed

Lines changed: 299 additions & 124 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/agent-performance-analyzer.lock.yml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/ai-moderator.lock.yml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/archie.lock.yml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/artifacts-summary.lock.yml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/audit-workflows.lock.yml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/blog-auditor.lock.yml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/brave.lock.yml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/breaking-change-checker.lock.yml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/campaign-generator.lock.yml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/changeset.lock.yml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)