Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .changeset/patch-fix-shellcheck-safe-inputs-startup.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 12 additions & 10 deletions .github/workflows/daily-performance-summary.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 12 additions & 10 deletions .github/workflows/test-python-safe-input.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 12 additions & 10 deletions pkg/workflow/sh/start_safe_inputs_server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,12 @@ echo " Working directory: $(pwd)"
mkdir -p /tmp/gh-aw/safe-inputs/logs

# Create initial server.log file for artifact upload
echo "Safe Inputs MCP Server Log" > /tmp/gh-aw/safe-inputs/logs/server.log
echo "Start time: $(date)" >> /tmp/gh-aw/safe-inputs/logs/server.log
echo "===========================================" >> /tmp/gh-aw/safe-inputs/logs/server.log
echo "" >> /tmp/gh-aw/safe-inputs/logs/server.log
{
echo "Safe Inputs MCP Server Log"
echo "Start time: $(date)"
echo "==========================================="
echo ""
} > /tmp/gh-aw/safe-inputs/logs/server.log

# Start the HTTP server in the background
echo "Starting safe-inputs MCP HTTP server..."
Expand All @@ -47,18 +49,18 @@ for i in {1..10}; do
fi

# Check if server is responding
if curl -s -f http://localhost:$GH_AW_SAFE_INPUTS_PORT/health > /dev/null 2>&1; then
if curl -s -f "http://localhost:$GH_AW_SAFE_INPUTS_PORT/health" > /dev/null 2>&1; then
echo "Safe Inputs MCP server is ready (attempt $i/10)"
break
fi

if [ $i -eq 10 ]; then
if [ "$i" -eq 10 ]; then
echo "ERROR: Safe Inputs MCP server failed to start after 10 seconds"
echo "Process status: $(ps aux | grep '[m]cp-server.cjs' || echo 'not running')"
echo "Process status: $(pgrep -f 'mcp-server.cjs' || echo 'not running')"
echo "Server log contents:"
cat /tmp/gh-aw/safe-inputs/logs/server.log
echo "Checking port availability:"
netstat -tuln | grep $GH_AW_SAFE_INPUTS_PORT || echo "Port $GH_AW_SAFE_INPUTS_PORT not listening"
netstat -tuln | grep "$GH_AW_SAFE_INPUTS_PORT" || echo "Port $GH_AW_SAFE_INPUTS_PORT not listening"
exit 1
fi

Expand All @@ -67,5 +69,5 @@ for i in {1..10}; do
done

# Output the configuration for the MCP client
echo "port=$GH_AW_SAFE_INPUTS_PORT" >> $GITHUB_OUTPUT
echo "api_key=$GH_AW_SAFE_INPUTS_API_KEY" >> $GITHUB_OUTPUT
echo "port=$GH_AW_SAFE_INPUTS_PORT" >> "$GITHUB_OUTPUT"
echo "api_key=$GH_AW_SAFE_INPUTS_API_KEY" >> "$GITHUB_OUTPUT"
Loading