Invoke MCP gateway /close endpoint before kill in stop script#9522
Merged
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
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] Update close MCP gateway script to invoke /close endpoint first
Invoke MCP gateway /close endpoint before kill in stop script
Jan 10, 2026
Contributor
|
🌑 The shadows whisper... Smoke Codex failed. The oracle requires further meditation... |
Contributor
|
💫 TO BE CONTINUED... Smoke Claude failed! Our hero faces unexpected challenges... |
Contributor
|
💀 Blimey! Changeset Generator failed and walked the plank! No treasure today, matey! ☠️ |
Contributor
|
📰 DEVELOPING STORY: Smoke Copilot reports failed. Our correspondents are investigating the incident... |
pelikhan
approved these changes
Jan 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The MCP gateway stop script was directly killing the gateway process without attempting graceful shutdown via the
/closeendpoint specified in MCP Gateway Specification v1.1.0 §5.1.3.Changes
stop_mcp_gateway.sh: Invoke/closeendpoint before killhttp://localhost:${MCP_GATEWAY_PORT}/closewith Authorization headerstart_mcp_gateway.sh: Export gateway configuration to step outputsgateway-portandgateway-api-keyto$GITHUB_OUTPUTCompiler: Wire gateway configuration to stop step
MCP_GATEWAY_PORTandMCP_GATEWAY_API_KEYas environment variablesstart-mcp-gatewaystep outputsBehavior
Per spec, the
/closeendpoint stops accepting requests, completes in-flight operations, terminates containers (SIGTERM → SIGKILL), and exits cleanly.Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.