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
16 changes: 12 additions & 4 deletions packages/core/src/awsService/sagemaker/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ export async function stopSpace(
await client.deleteApp({
DomainId: node.spaceApp.DomainId!,
SpaceName: spaceName,
AppType: node.spaceApp.App!.AppType!,
AppType: node.spaceApp.SpaceSettingsSummary!.AppType!,
AppName: node.spaceApp.App?.AppName,
})
} catch (err) {
Expand Down Expand Up @@ -319,7 +319,7 @@ async function handleRunningSpaceWithDisabledAccess(
await client.deleteApp({
DomainId: node.spaceApp.DomainId!,
SpaceName: spaceName,
AppType: node.spaceApp.App!.AppType!,
AppType: node.spaceApp.SpaceSettingsSummary!.AppType!,
AppName: node.spaceApp.App?.AppName,
})

Expand All @@ -329,7 +329,11 @@ async function handleRunningSpaceWithDisabledAccess(
// Start the space with remote access enabled (skip prompts since user already consented)
await client.startSpace(spaceName, node.spaceApp.DomainId!, true)
await tryRefreshNode(node)
await client.waitForAppInService(node.spaceApp.DomainId!, spaceName, node.spaceApp.App!.AppType!)
await client.waitForAppInService(
node.spaceApp.DomainId!,
spaceName,
node.spaceApp.SpaceSettingsSummary!.AppType!
)
await tryRemoteConnection(node, ctx, progress)
} catch (err: any) {
// Handle user declining instance type upgrade
Expand Down Expand Up @@ -369,7 +373,11 @@ async function handleStoppedSpace(
},
async (progress) => {
progress.report({ message: 'Starting the space' })
await client.waitForAppInService(node.spaceApp.DomainId!, spaceName, node.spaceApp.App!.AppType!)
await client.waitForAppInService(
node.spaceApp.DomainId!,
spaceName,
node.spaceApp.SpaceSettingsSummary!.AppType!
)
await tryRemoteConnection(node, ctx, progress)
}
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ describe('SageMaker Commands', () => {
AppName: 'default',
},
SpaceSettingsSummary: {
AppType: 'JupyterLab',
RemoteAccess: 'DISABLED',
},
},
Expand Down
Loading