Skip to content

Commit aa90c70

Browse files
NewtonDerNewton Der
andauthored
Fix idle shutdown from happening when active process is still running (#96)
* Fix idle shutdown when active process is still running --------- Co-authored-by: Newton Der <[email protected]>
1 parent f94909a commit aa90c70

9 files changed

+253
-264
lines changed

patches/sagemaker/fix-port-forwarding.diff

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
Index: third-party-src/src/vs/code/browser/workbench/workbench.ts
1+
Index: code-editor-src/src/vs/code/browser/workbench/workbench.ts
22
===================================================================
3-
--- third-party-src.orig/src/vs/code/browser/workbench/workbench.ts
4-
+++ third-party-src/src/vs/code/browser/workbench/workbench.ts
3+
--- code-editor-src.orig/src/vs/code/browser/workbench/workbench.ts
4+
+++ code-editor-src/src/vs/code/browser/workbench/workbench.ts
55
@@ -635,7 +635,7 @@ function readCookie(name: string): strin
66
const localhostMatch = extractLocalHostUriMetaDataForPortMapping(resolvedUri)
77
if (localhostMatch && resolvedUri.authority !== location.host) {

patches/sagemaker/post-startup-notifications.diff

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
Index: third-party-src/extensions/post-startup-notifications/.vscode/extensions.json
1+
Index: code-editor-src/extensions/post-startup-notifications/.vscode/extensions.json
22
===================================================================
33
--- /dev/null
4-
+++ third-party-src/extensions/post-startup-notifications/.vscode/extensions.json
4+
+++ code-editor-src/extensions/post-startup-notifications/.vscode/extensions.json
55
@@ -0,0 +1,5 @@
66
+{
77
+ // See http://go.microsoft.com/fwlink/?LinkId=827846
88
+ // for the documentation about the extensions.json format
99
+ "recommendations": ["dbaeumer.vscode-eslint", "amodio.tsl-problem-matcher", "ms-vscode.extension-test-runner"]
1010
+}
11-
Index: third-party-src/extensions/post-startup-notifications/.vscode/launch.json
11+
Index: code-editor-src/extensions/post-startup-notifications/.vscode/launch.json
1212
===================================================================
1313
--- /dev/null
14-
+++ third-party-src/extensions/post-startup-notifications/.vscode/launch.json
14+
+++ code-editor-src/extensions/post-startup-notifications/.vscode/launch.json
1515
@@ -0,0 +1,21 @@
1616
+// A launch configuration that compiles the extension and then opens it inside a new window
1717
+// Use IntelliSense to learn about possible attributes.
@@ -35,10 +35,10 @@ Index: third-party-src/extensions/post-startup-notifications/.vscode/launch.json
3535
+ ]
3636
+}
3737
\ No newline at end of file
38-
Index: third-party-src/extensions/post-startup-notifications/.vscode/settings.json
38+
Index: code-editor-src/extensions/post-startup-notifications/.vscode/settings.json
3939
===================================================================
4040
--- /dev/null
41-
+++ third-party-src/extensions/post-startup-notifications/.vscode/settings.json
41+
+++ code-editor-src/extensions/post-startup-notifications/.vscode/settings.json
4242
@@ -0,0 +1,13 @@
4343
+// Place your settings in this file to overwrite default and user settings.
4444
+{
@@ -54,10 +54,10 @@ Index: third-party-src/extensions/post-startup-notifications/.vscode/settings.js
5454
+ "typescript.tsc.autoDetect": "off"
5555
+}
5656
\ No newline at end of file
57-
Index: third-party-src/extensions/post-startup-notifications/.vscode/tasks.json
57+
Index: code-editor-src/extensions/post-startup-notifications/.vscode/tasks.json
5858
===================================================================
5959
--- /dev/null
60-
+++ third-party-src/extensions/post-startup-notifications/.vscode/tasks.json
60+
+++ code-editor-src/extensions/post-startup-notifications/.vscode/tasks.json
6161
@@ -0,0 +1,40 @@
6262
+// See https://go.microsoft.com/fwlink/?LinkId=733558
6363
+// for the documentation about the tasks.json format
@@ -100,10 +100,10 @@ Index: third-party-src/extensions/post-startup-notifications/.vscode/tasks.json
100100
+ ]
101101
+}
102102
\ No newline at end of file
103-
Index: third-party-src/extensions/post-startup-notifications/.vscodeignore
103+
Index: code-editor-src/extensions/post-startup-notifications/.vscodeignore
104104
===================================================================
105105
--- /dev/null
106-
+++ third-party-src/extensions/post-startup-notifications/.vscodeignore
106+
+++ code-editor-src/extensions/post-startup-notifications/.vscodeignore
107107
@@ -0,0 +1,14 @@
108108
+.vscode/**
109109
+.vscode-test/**
@@ -119,10 +119,10 @@ Index: third-party-src/extensions/post-startup-notifications/.vscodeignore
119119
+**/*.map
120120
+**/*.ts
121121
+**/.vscode-test.*
122-
Index: third-party-src/extensions/post-startup-notifications/CHANGELOG.md
122+
Index: code-editor-src/extensions/post-startup-notifications/CHANGELOG.md
123123
===================================================================
124124
--- /dev/null
125-
+++ third-party-src/extensions/post-startup-notifications/CHANGELOG.md
125+
+++ code-editor-src/extensions/post-startup-notifications/CHANGELOG.md
126126
@@ -0,0 +1,9 @@
127127
+# Change Log
128128
+
@@ -134,19 +134,19 @@ Index: third-party-src/extensions/post-startup-notifications/CHANGELOG.md
134134
+
135135
+- Initial release
136136
\ No newline at end of file
137-
Index: third-party-src/extensions/post-startup-notifications/README.md
137+
Index: code-editor-src/extensions/post-startup-notifications/README.md
138138
===================================================================
139139
--- /dev/null
140-
+++ third-party-src/extensions/post-startup-notifications/README.md
140+
+++ code-editor-src/extensions/post-startup-notifications/README.md
141141
@@ -0,0 +1,4 @@
142142
+# post-startup-notifications README
143143
+
144144
+This extension monitors post startup script execution and notifies users on success/failure.
145145
+
146-
Index: third-party-src/extensions/post-startup-notifications/eslint.config.mjs
146+
Index: code-editor-src/extensions/post-startup-notifications/eslint.config.mjs
147147
===================================================================
148148
--- /dev/null
149-
+++ third-party-src/extensions/post-startup-notifications/eslint.config.mjs
149+
+++ code-editor-src/extensions/post-startup-notifications/eslint.config.mjs
150150
@@ -0,0 +1,28 @@
151151
+import typescriptEslint from "@typescript-eslint/eslint-plugin";
152152
+import tsParser from "@typescript-eslint/parser";
@@ -177,10 +177,10 @@ Index: third-party-src/extensions/post-startup-notifications/eslint.config.mjs
177177
+ },
178178
+}];
179179
\ No newline at end of file
180-
Index: third-party-src/extensions/post-startup-notifications/package.json
180+
Index: code-editor-src/extensions/post-startup-notifications/package.json
181181
===================================================================
182182
--- /dev/null
183-
+++ third-party-src/extensions/post-startup-notifications/package.json
183+
+++ code-editor-src/extensions/post-startup-notifications/package.json
184184
@@ -0,0 +1,57 @@
185185
+{
186186
+ "name": "post-startup-notifications",
@@ -240,19 +240,19 @@ Index: third-party-src/extensions/post-startup-notifications/package.json
240240
+ }
241241
+}
242242
\ No newline at end of file
243-
Index: third-party-src/extensions/post-startup-notifications/src/constant.ts
243+
Index: code-editor-src/extensions/post-startup-notifications/src/constant.ts
244244
===================================================================
245245
--- /dev/null
246-
+++ third-party-src/extensions/post-startup-notifications/src/constant.ts
246+
+++ code-editor-src/extensions/post-startup-notifications/src/constant.ts
247247
@@ -0,0 +1,3 @@
248248
+export const POST_START_UP_STATUS_FILE = '/tmp/.post-startup-status.json';
249249
+export const SERVICE_NAME_ENV_VALUE = 'SageMakerUnifiedStudio';
250250
+export const SERVICE_NAME_ENV_KEY = 'SERVICE_NAME';
251251
\ No newline at end of file
252-
Index: third-party-src/extensions/post-startup-notifications/src/extension.ts
252+
Index: code-editor-src/extensions/post-startup-notifications/src/extension.ts
253253
===================================================================
254254
--- /dev/null
255-
+++ third-party-src/extensions/post-startup-notifications/src/extension.ts
255+
+++ code-editor-src/extensions/post-startup-notifications/src/extension.ts
256256
@@ -0,0 +1,117 @@
257257
+import * as vscode from 'vscode';
258258
+import * as fs from 'fs';
@@ -371,10 +371,10 @@ Index: third-party-src/extensions/post-startup-notifications/src/extension.ts
371371
+ outputChannel.dispose();
372372
+ }
373373
+}
374-
Index: third-party-src/extensions/post-startup-notifications/src/test/extension.test.ts
374+
Index: code-editor-src/extensions/post-startup-notifications/src/test/extension.test.ts
375375
===================================================================
376376
--- /dev/null
377-
+++ third-party-src/extensions/post-startup-notifications/src/test/extension.test.ts
377+
+++ code-editor-src/extensions/post-startup-notifications/src/test/extension.test.ts
378378
@@ -0,0 +1,267 @@
379379
+import * as vscode from 'vscode';
380380
+import * as fs from 'fs';
@@ -643,10 +643,10 @@ Index: third-party-src/extensions/post-startup-notifications/src/test/extension.
643643
+ });
644644
+});
645645
+
646-
Index: third-party-src/extensions/post-startup-notifications/src/types.ts
646+
Index: code-editor-src/extensions/post-startup-notifications/src/types.ts
647647
===================================================================
648648
--- /dev/null
649-
+++ third-party-src/extensions/post-startup-notifications/src/types.ts
649+
+++ code-editor-src/extensions/post-startup-notifications/src/types.ts
650650
@@ -0,0 +1,6 @@
651651
+export interface StatusFile {
652652
+ status: string;
@@ -655,10 +655,10 @@ Index: third-party-src/extensions/post-startup-notifications/src/types.ts
655655
+ label: string;
656656
+}
657657
\ No newline at end of file
658-
Index: third-party-src/extensions/post-startup-notifications/tsconfig.json
658+
Index: code-editor-src/extensions/post-startup-notifications/tsconfig.json
659659
===================================================================
660660
--- /dev/null
661-
+++ third-party-src/extensions/post-startup-notifications/tsconfig.json
661+
+++ code-editor-src/extensions/post-startup-notifications/tsconfig.json
662662
@@ -0,0 +1,17 @@
663663
+{
664664
+ "compilerOptions": {
@@ -678,10 +678,10 @@ Index: third-party-src/extensions/post-startup-notifications/tsconfig.json
678678
+ }
679679
+}
680680
\ No newline at end of file
681-
Index: third-party-src/extensions/post-startup-notifications/webpack.config.js
681+
Index: code-editor-src/extensions/post-startup-notifications/webpack.config.js
682682
===================================================================
683683
--- /dev/null
684-
+++ third-party-src/extensions/post-startup-notifications/webpack.config.js
684+
+++ code-editor-src/extensions/post-startup-notifications/webpack.config.js
685685
@@ -0,0 +1,48 @@
686686
+//@ts-check
687687
+
@@ -732,34 +732,34 @@ Index: third-party-src/extensions/post-startup-notifications/webpack.config.js
732732
+};
733733
+module.exports = [extensionConfig];
734734
\ No newline at end of file
735-
Index: third-party-src/build/npm/dirs.js
735+
Index: code-editor-src/build/npm/dirs.js
736736
===================================================================
737-
--- third-party-src.orig/build/npm/dirs.js
738-
+++ third-party-src/build/npm/dirs.js
739-
@@ -42,6 +42,7 @@ const dirs = [
737+
--- code-editor-src.orig/build/npm/dirs.js
738+
+++ code-editor-src/build/npm/dirs.js
739+
@@ -43,6 +43,7 @@ const dirs = [
740740
'extensions/sagemaker-terminal-crash-mitigation',
741741
'extensions/sagemaker-open-notebook-extension',
742742
'extensions/sagemaker-ui-dark-theme',
743743
+ 'extensions/post-startup-notifications',
744744
'extensions/search-result',
745745
'extensions/simple-browser',
746746
'extensions/tunnel-forwarding',
747-
Index: third-party-src/build/gulpfile.extensions.js
747+
Index: code-editor-src/build/gulpfile.extensions.js
748748
===================================================================
749-
--- third-party-src.orig/build/gulpfile.extensions.js
750-
+++ third-party-src/build/gulpfile.extensions.js
751-
@@ -64,6 +64,7 @@ const compilations = [
749+
--- code-editor-src.orig/build/gulpfile.extensions.js
750+
+++ code-editor-src/build/gulpfile.extensions.js
751+
@@ -65,6 +65,7 @@ const compilations = [
752752
'extensions/sagemaker-terminal-crash-mitigation/tsconfig.json',
753753
'extensions/sagemaker-open-notebook-extension/tsconfig.json',
754754
'extensions/sagemaker-ui-dark-theme/tsconfig.json',
755755
+ 'extensions/post-startup-notifications/tsconfig.json',
756756
'extensions/tunnel-forwarding/tsconfig.json',
757757
'extensions/typescript-language-features/test-workspace/tsconfig.json',
758758
'extensions/typescript-language-features/web/tsconfig.json',
759-
Index: third-party-src/extensions/post-startup-notifications/extension-browser.webpack.config.js
759+
Index: code-editor-src/extensions/post-startup-notifications/extension-browser.webpack.config.js
760760
===================================================================
761761
--- /dev/null
762-
+++ third-party-src/extensions/post-startup-notifications/extension-browser.webpack.config.js
762+
+++ code-editor-src/extensions/post-startup-notifications/extension-browser.webpack.config.js
763763
@@ -0,0 +1,17 @@
764764
+/*---------------------------------------------------------------------------------------------
765765
+ * Copyright Amazon.com Inc. or its affiliates. All rights reserved.
@@ -778,10 +778,10 @@ Index: third-party-src/extensions/post-startup-notifications/extension-browser.w
778778
+ extension: './src/extension.ts'
779779
+ },
780780
+});
781-
Index: third-party-src/extensions/post-startup-notifications/extension.webpack.config.js
781+
Index: code-editor-src/extensions/post-startup-notifications/extension.webpack.config.js
782782
===================================================================
783783
--- /dev/null
784-
+++ third-party-src/extensions/post-startup-notifications/extension.webpack.config.js
784+
+++ code-editor-src/extensions/post-startup-notifications/extension.webpack.config.js
785785
@@ -0,0 +1,20 @@
786786
+/*---------------------------------------------------------------------------------------------
787787
+ * Copyright Amazon.com Inc. or its affiliates. All rights reserved.

patches/sagemaker/sagemaker-extension-smus-support.diff

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
Index: third-party-src/extensions/sagemaker-extension/src/constant.ts
1+
Index: code-editor-src/extensions/sagemaker-extension/src/constant.ts
22
===================================================================
3-
--- third-party-src.orig/extensions/sagemaker-extension/src/constant.ts
4-
+++ third-party-src/extensions/sagemaker-extension/src/constant.ts
3+
--- code-editor-src.orig/extensions/sagemaker-extension/src/constant.ts
4+
+++ code-editor-src/extensions/sagemaker-extension/src/constant.ts
55
@@ -27,6 +27,10 @@ export const FIVE_MINUTES_INTERVAL_MILLI
66

77
export const SAGEMAKER_METADATA_PATH = '/opt/ml/metadata/resource-metadata.json';
@@ -63,10 +63,10 @@ Index: third-party-src/extensions/sagemaker-extension/src/constant.ts
6363
+
6464
+ return `https://${DataZoneDomainId}.sagemaker.${DataZoneDomainRegion}.on.aws/projects/${DataZoneProjectId}/overview`;
6565
+}
66-
Index: third-party-src/extensions/sagemaker-extension/src/extension.ts
66+
Index: code-editor-src/extensions/sagemaker-extension/src/extension.ts
6767
===================================================================
68-
--- third-party-src.orig/extensions/sagemaker-extension/src/extension.ts
69-
+++ third-party-src/extensions/sagemaker-extension/src/extension.ts
68+
--- code-editor-src.orig/extensions/sagemaker-extension/src/extension.ts
69+
+++ code-editor-src/extensions/sagemaker-extension/src/extension.ts
7070
@@ -11,7 +11,8 @@ import {
7171
WARNING_BUTTON_SAVE_AND_RENEW_SESSION,
7272
SagemakerCookie,

0 commit comments

Comments
 (0)