refactor(server): Remove unused delay-shutdown REST endpoint#205
Merged
refactor(server): Remove unused delay-shutdown REST endpoint#205
Conversation
Remove the /delay-shutdown HTTP endpoint and its _delayShutdown() method from remoteExtensionHostAgentServer. This feature is not used by the service and the shutdown lifecycle is fully managed by the extension host connection events.
sachinh-amazon
approved these changes
Apr 20, 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.
Issue
P398067552
Description of Changes
Remove the unused
/delay-shutdownREST endpoint and its backing_delayShutdown()method fromremoteExtensionHostAgentServer.ts.This endpoint allowed callers to reset the auto-shutdown timer, indefinitely extending the lifetime of the Code Editor process even when there are no active connections. The feature is not
used by the service — the shutdown lifecycle is fully managed by extension host connection events (
_onDidCloseExtHostConnection).The change is implemented as a quilt patch (
patches/sagemaker/remove-delay-shutdown-endpoint.diff) appended to the end ofsagemaker.series.Testing
prepare-src.sh code-editor-sagemaker-serversucceeds)delay-shutdownor_delayShutdownremain in the patched source_cancelShutdown()and_waitThenShutdown()are preserved (still used by_onDidCloseExtHostConnection)GET /delay-shutdownwithout connection token →403 Forbidden(previously200 OK)GET /delay-shutdownwith valid connection token →404 Not FoundScreenshots/Videos
N/A
Additional Notes
/delay-shutdownhandler was positioned before the connection token validation check, meaning it required no authenticationSHUTDOWN_TIMEOUTtimerBackporting
This change is submitted as separate PRs against all active release streams:
main1.11.0By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.