From 0e848f180e29ec67f43e0b8a66923061f610e0f1 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 10 Jan 2026 23:13:25 +0000 Subject: [PATCH 1/2] Initial plan From 390d145b7a0e8352ac0840ddf58bdc562927d70a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 10 Jan 2026 23:18:15 +0000 Subject: [PATCH 2/2] Enable pipefail for check_mcp_servers.sh to catch failures The issue was that when check_mcp_servers.sh was piped through tee, the exit code was ignored because the shell returned tee's exit code (which always succeeds) instead of check_mcp_servers.sh's exit code. This fix enables pipefail before the check and disables it after, so the pipeline returns the exit code of check_mcp_servers.sh. Now when MCP servers fail to connect, the "Start MCP Gateway" step will properly fail as expected. Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- actions/setup/sh/start_mcp_gateway.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/actions/setup/sh/start_mcp_gateway.sh b/actions/setup/sh/start_mcp_gateway.sh index d65159e5850..a68b48bbd3c 100755 --- a/actions/setup/sh/start_mcp_gateway.sh +++ b/actions/setup/sh/start_mcp_gateway.sh @@ -292,6 +292,8 @@ if [ -f /opt/gh-aw/actions/check_mcp_servers.sh ]; then echo "Running MCP server checks..." # Store check diagnostic logs in /tmp/gh-aw/mcp-logs/start-gateway.log for artifact upload # Use tee to output to both stdout and the log file + # Enable pipefail so the exit code comes from check_mcp_servers.sh, not tee + set -o pipefail if ! bash /opt/gh-aw/actions/check_mcp_servers.sh \ /tmp/gh-aw/mcp-config/gateway-output.json \ "http://localhost:${MCP_GATEWAY_PORT}" \ @@ -301,6 +303,7 @@ if [ -f /opt/gh-aw/actions/check_mcp_servers.sh ]; then kill $GATEWAY_PID 2>/dev/null || true exit 1 fi + set +o pipefail else echo "WARNING: MCP server check script not found at /opt/gh-aw/actions/check_mcp_servers.sh" echo "Skipping MCP server functionality checks"