Skip to content

Commit 1553470

Browse files
committed
add codeeditor subdomain
1 parent 71a4aef commit 1553470

File tree

4 files changed

+17
-11
lines changed

4 files changed

+17
-11
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ export async function deeplinkConnect(
8585
session: string,
8686
wsUrl: string,
8787
token: string,
88-
domain: string
88+
domain: string,
89+
appType: string
8990
) {
9091
getLogger().debug(
9192
`sm:deeplinkConnect: connectionIdentifier: ${connectionIdentifier} session: ${session} wsUrl: ${wsUrl} token: ${token}`
@@ -104,7 +105,8 @@ export async function deeplinkConnect(
104105
session,
105106
wsUrl,
106107
token,
107-
domain
108+
domain,
109+
appType
108110
)
109111

110112
await startVscodeRemote(

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

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,15 +79,16 @@ export async function persistSSMConnection(
7979
domain: string,
8080
session?: string,
8181
wsUrl?: string,
82-
token?: string
82+
token?: string,
83+
appType?: string
8384
): Promise<void> {
8485
const { region } = parseArn(appArn)
8586
const endpoint = DevSettings.instance.get('endpoints', {})['sagemaker'] ?? ''
8687

87-
// TODO: Hardcoded to 'jupyterlab' due to a bug in Studio that only supports refreshing
88-
// the token for both CodeEditor and JupyterLab Apps in the jupyterlab subdomain.
89-
// This will be fixed shortly after NYSummit launch to support refresh URL in CodeEditor subdomain.
90-
const appSubDomain = 'jupyterlab'
88+
let appSubDomain = 'jupyterlab'
89+
if (appType && appType.toLowerCase() === 'codeeditor') {
90+
appSubDomain = 'code-editor'
91+
}
9192

9293
let envSubdomain: string
9394

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ export async function prepareDevEnvConnection(
5050
session?: string,
5151
wsUrl?: string,
5252
token?: string,
53-
domain?: string
53+
domain?: string,
54+
appType?: string
5455
) {
5556
const remoteLogger = configureRemoteConnectionLogger()
5657
const { ssm, vsc, ssh } = (await ensureDependencies()).unwrap()
@@ -72,7 +73,7 @@ export async function prepareDevEnvConnection(
7273
if (connectionType === 'sm_lc') {
7374
await persistLocalCredentials(appArn)
7475
} else if (connectionType === 'sm_dl') {
75-
await persistSSMConnection(appArn, domain ?? '', session, wsUrl, token)
76+
await persistSSMConnection(appArn, domain ?? '', session, wsUrl, token, appType)
7677
}
7778

7879
await startLocalServer(ctx)

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ export function register(ctx: ExtContext) {
1818
params.session,
1919
`${params.ws_url}&cell-number=${params['cell-number']}`,
2020
params.token,
21-
params.domain
21+
params.domain,
22+
params.app_type
2223
)
2324
})
2425
}
@@ -34,7 +35,8 @@ export function parseConnectParams(query: SearchParams) {
3435
'session',
3536
'ws_url',
3637
'cell-number',
37-
'token'
38+
'token',
39+
'app_type'
3840
)
3941
return params
4042
}

0 commit comments

Comments
 (0)