Skip to content

refactor(server): Remove unused delay-shutdown REST endpoint#203

Merged
azmkercso merged 1 commit intoaws:1.0from
azmkercso:remove-delay-shutdown-endpoint-1.0
Apr 20, 2026
Merged

refactor(server): Remove unused delay-shutdown REST endpoint#203
azmkercso merged 1 commit intoaws:1.0from
azmkercso:remove-delay-shutdown-endpoint-1.0

Conversation

@azmkercso
Copy link
Copy Markdown
Contributor

Issue

P398067552

Description of Changes

Remove the unused /delay-shutdown REST endpoint and its backing _delayShutdown() method from remoteExtensionHostAgentServer.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 of sagemaker.series.

Testing

  • Verified all existing patches apply cleanly with the new patch appended (prepare-src.sh code-editor-sagemaker-server succeeds)
  • Confirmed no references to delay-shutdown or _delayShutdown remain in the patched source
  • Confirmed _cancelShutdown() and _waitThenShutdown() are preserved (still used by _onDidCloseExtHostConnection)
  • Expected behavior after the change:
    • GET /delay-shutdown without connection token → 403 Forbidden (previously 200 OK)
    • GET /delay-shutdown with valid connection token → 404 Not Found

Screenshots/Videos

N/A

Additional Notes

  • The /delay-shutdown handler was positioned before the connection token validation check, meaning it required no authentication
  • The auto-shutdown mechanism continues to work as before — it is triggered when the last extension host connection closes and runs on the SHUTDOWN_TIMEOUT timer

Backporting

This change is submitted as separate PRs against all active release streams:

  • main
  • 1.1
  • 1.0

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

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.
@azmkercso azmkercso requested review from a team as code owners April 20, 2026 10:41
@azmkercso azmkercso merged commit 66f0554 into aws:1.0 Apr 20, 2026
1 check passed
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