Skip to content

Commit 8e9d6c2

Browse files
Merge master into feature/emr
2 parents 2b98773 + 9951253 commit 8e9d6c2

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

packages/core/src/awsService/sagemaker/commands.ts

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ export async function stopSpace(
171171
await client.deleteApp({
172172
DomainId: node.spaceApp.DomainId!,
173173
SpaceName: spaceName,
174-
AppType: node.spaceApp.App!.AppType!,
174+
AppType: node.spaceApp.SpaceSettingsSummary!.AppType!,
175175
AppName: node.spaceApp.App?.AppName,
176176
})
177177
} catch (err) {
@@ -319,7 +319,7 @@ async function handleRunningSpaceWithDisabledAccess(
319319
await client.deleteApp({
320320
DomainId: node.spaceApp.DomainId!,
321321
SpaceName: spaceName,
322-
AppType: node.spaceApp.App!.AppType!,
322+
AppType: node.spaceApp.SpaceSettingsSummary!.AppType!,
323323
AppName: node.spaceApp.App?.AppName,
324324
})
325325

@@ -329,7 +329,11 @@ async function handleRunningSpaceWithDisabledAccess(
329329
// Start the space with remote access enabled (skip prompts since user already consented)
330330
await client.startSpace(spaceName, node.spaceApp.DomainId!, true)
331331
await tryRefreshNode(node)
332-
await client.waitForAppInService(node.spaceApp.DomainId!, spaceName, node.spaceApp.App!.AppType!)
332+
await client.waitForAppInService(
333+
node.spaceApp.DomainId!,
334+
spaceName,
335+
node.spaceApp.SpaceSettingsSummary!.AppType!
336+
)
333337
await tryRemoteConnection(node, ctx, progress)
334338
} catch (err: any) {
335339
// Handle user declining instance type upgrade
@@ -369,7 +373,11 @@ async function handleStoppedSpace(
369373
},
370374
async (progress) => {
371375
progress.report({ message: 'Starting the space' })
372-
await client.waitForAppInService(node.spaceApp.DomainId!, spaceName, node.spaceApp.App!.AppType!)
376+
await client.waitForAppInService(
377+
node.spaceApp.DomainId!,
378+
spaceName,
379+
node.spaceApp.SpaceSettingsSummary!.AppType!
380+
)
373381
await tryRemoteConnection(node, ctx, progress)
374382
}
375383
)

packages/core/src/test/awsService/sagemaker/commands.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ describe('SageMaker Commands', () => {
5959
AppName: 'default',
6060
},
6161
SpaceSettingsSummary: {
62+
AppType: 'JupyterLab',
6263
RemoteAccess: 'DISABLED',
6364
},
6465
},

0 commit comments

Comments
 (0)