Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 2, 2026

Extracted inline bash logic from generateMCPGatewayHealthCheckStep() into a standalone shell script following the pattern used by other action scripts (validate_multi_secret.sh, start_safe_inputs_server.sh).

Changes

  • Created actions/setup/sh/verify_mcp_gateway_health.sh - accepts gateway URL, MCP config path, and logs folder as parameters
  • Simplified pkg/workflow/gateway.go:generateMCPGatewayHealthCheckStep() from ~75 lines of inline bash to 2 lines invoking the script
  • Updated test expectations in gateway_test.go to verify script invocation pattern

Before/After

Before:

stepLines := []string{
    "      - name: Verify MCP Gateway Health",
    "        run: |",
    "          echo 'Waiting for MCP Gateway to be ready...'",
    "          # ... 70+ lines of inline bash ...",
}

After:

stepLines := []string{
    "      - name: Verify MCP Gateway Health",
    fmt.Sprintf("        run: bash /tmp/gh-aw/actions/verify_mcp_gateway_health.sh \"%s\" \"%s\" \"%s\"",
        gatewayURL, mcpConfigPath, MCPGatewayLogsFolder),
}

The existing setup.sh already copies all .sh files from actions/setup/sh/ to /tmp/gh-aw/actions with executable permissions - no changes required.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/user
    • Triggering command: /usr/bin/gh gh api user --jq .login -json GO111MODULE ux-amd64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE rg/toolchain@v0.GOMODCACHE GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api user --jq .login ithub/workflows GOPROXY (http block)
    • Triggering command: /usr/bin/gh gh api user --jq .login ithub/workflows log ps l --format=format:run 06b29b90c218 ps patc�� ns/setup.git go /usr/bin/gh -json GO111MODULE ux-amd64/bin/go gh (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

Refactor "Verify MCP gateway health" shell script to actions/setup, update setup.sh and invoke it in the step.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits January 2, 2026 00:55
- Created verify_mcp_gateway_health.sh in actions/setup/sh/
- Updated generateMCPGatewayHealthCheckStep() to invoke shell script
- Updated tests to match new implementation
- setup.sh already handles copying all .sh files from sh/ directory

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Refactor verify MCP gateway health script to use actions/setup Refactor MCP gateway health check to shell script Jan 2, 2026
Copilot AI requested a review from pelikhan January 2, 2026 01:06
@pelikhan pelikhan marked this pull request as ready for review January 2, 2026 01:07
@pelikhan pelikhan merged commit 401e032 into main Jan 2, 2026
129 checks passed
@pelikhan pelikhan deleted the copilot/refactor-verify-mcp-gateway-health branch January 2, 2026 01:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants