Skip to content

Commit 941a918

Browse files
authored
Merge pull request #89 from cinlo/1.4
feat:enable deeplink for eks notebook
2 parents dacc210 + b889019 commit 941a918

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

patched-vscode/extensions/sagemaker-open-notebook-extension/src/extension.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,15 @@ function processNotebookContent(content: string, clusterId: string, region: stri
4545
];
4646
cell.cell_type = "code";
4747
}
48+
49+
if (cell.metadata &&
50+
cell.metadata.jumpStartAlterations &&
51+
cell.metadata.jumpStartAlterations.includes('clusterName')) {
52+
cell.source = [
53+
`!hyperpod connect-cluster --cluster-name ${clusterId}`
54+
]
55+
cell.cell_type = "code";
56+
}
4857
return cell;
4958
});
5059
return JSON.stringify(notebook, null, 2);

patches/sagemaker-open-notebook-extension.patch

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ Index: sagemaker-code-editor/vscode/extensions/sagemaker-open-notebook-extension
162162
===================================================================
163163
--- /dev/null
164164
+++ sagemaker-code-editor/vscode/extensions/sagemaker-open-notebook-extension/src/extension.ts
165-
@@ -0,0 +1,80 @@
165+
@@ -0,0 +1,89 @@
166166
+
167167
+import * as vscode from 'vscode';
168168
+import * as https from 'https';
@@ -210,6 +210,15 @@ Index: sagemaker-code-editor/vscode/extensions/sagemaker-open-notebook-extension
210210
+ ];
211211
+ cell.cell_type = "code";
212212
+ }
213+
+
214+
+ if (cell.metadata &&
215+
+ cell.metadata.jumpStartAlterations &&
216+
+ cell.metadata.jumpStartAlterations.includes('clusterName')) {
217+
+ cell.source = [
218+
+ `!hyperpod connect-cluster --cluster-name ${clusterId}`
219+
+ ]
220+
+ cell.cell_type = "code";
221+
+ }
213222
+ return cell;
214223
+ });
215224
+ return JSON.stringify(notebook, null, 2);

0 commit comments

Comments
 (0)