You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(sagemaker): Use SpaceSettingsSummary.AppType instead of App.AppType (#8276)
## Problem
- Fixes crash when connecting to spaces that have been stopped for long
- The code was incorrectly accessing node.spaceApp.App.AppType, but the
App object is undefined for spaces stopped for long as it deletes the
App resource . This caused below error
```
Error running command aws.smus.openRemoteConnection: Remote connection failed: Cannot read properties of undefined (reading 'AppType'). This is likely caused by the extension that contributes aws.smus.openRemoteConnection.
```
## Solution
Changed to use node.spaceApp.SpaceSettingsSummary.AppType instead, which
-
- Is always available (part of space configuration, not runtime state)
- Contains the correct AppType value needed for start/stop operations
- SpaceSettingsSummary comes from ListSpaces API call and it will always
returns SpaceSettingsSummary as part of the SpaceDetails.
- AppType is a required field in SpaceSettingsSummary because every
SageMaker space must have an application type (JupyterLab or
CodeEditor).
---
- Treat all work as PUBLIC. Private `feature/x` branches will not be
squash-merged at release time.
- Your code changes must meet the guidelines in
[CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines).
- License: I confirm that my contribution is made under the terms of the
Apache 2.0 license.
0 commit comments