Skip to content

Commit d864d99

Browse files
author
Arun Bhati
committed
Fix patch merge failures from feature/smus remote branch
1 parent 3983b4d commit d864d99

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

patched-vscode/extensions/sagemaker-extension/src/constant.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export function getExpiryTime(cookie: SagemakerCookie): number {
8484
* Constructs the SMUS portal URL using domain, region, and project information
8585
* Returns null if not in SMUS environment or if required fields are missing
8686
*/
87-
export const getSmusVscodePortalUrl = (metadata: SagemakerMetadata): string | null => {
87+
export const getSmusVscodePortalUrl = (metadata: SagemakerResourceMetadata): string | null => {
8888
if (process.env[SERVICE_NAME_ENV_VAR] !== SMUS_SERVICE_NAME) {
8989
return null;
9090
}

patches/sagemaker-extension-smus-support.patch

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ Index: sagemaker-code-editor/vscode/extensions/sagemaker-extension/src/extension
6767
===================================================================
6868
--- sagemaker-code-editor.orig/vscode/extensions/sagemaker-extension/src/extension.ts
6969
+++ sagemaker-code-editor/vscode/extensions/sagemaker-extension/src/extension.ts
70-
@@ -11,13 +11,17 @@ import {
70+
@@ -11,7 +11,8 @@ import {
7171
WARNING_BUTTON_SAVE_AND_RENEW_SESSION,
7272
SagemakerCookie,
7373
SagemakerResourceMetadata,
@@ -77,16 +77,17 @@ Index: sagemaker-code-editor/vscode/extensions/sagemaker-extension/src/extension
7777
} from "./constant";
7878
import * as console from "console";
7979

80-
80+
@@ -19,6 +20,9 @@ import * as console from "console";
8181
const PARSE_SAGEMAKER_COOKIE_COMMAND = 'sagemaker.parseCookies';
82+
const ENABLE_AUTO_UPDATE_COMMAND = 'workbench.extensions.action.enableAutoUpdate';
8283

8384
+// Global redirect URL for SMUS environment
8485
+let smusRedirectUrl: string | null = null;
8586
+
8687
function showWarningDialog() {
8788
vscode.commands.executeCommand(PARSE_SAGEMAKER_COOKIE_COMMAND).then(response => {
8889

89-
@@ -58,11 +62,12 @@ function showWarningDialog() {
90+
@@ -59,11 +63,12 @@ function showWarningDialog() {
9091
}
9192

9293
function signInError(sagemakerCookie: SagemakerCookie) {
@@ -100,7 +101,7 @@ Index: sagemaker-code-editor/vscode/extensions/sagemaker-extension/src/extension
100101
}
101102
});
102103
}
103-
@@ -93,32 +98,31 @@ function saveWorkspace() {
104+
@@ -94,32 +99,31 @@ function saveWorkspace() {
104105
});
105106
}
106107
function renewSession(sagemakerCookie: SagemakerCookie) {
@@ -150,8 +151,8 @@ Index: sagemaker-code-editor/vscode/extensions/sagemaker-extension/src/extension
150151
+ }
151152
}
152153

153-
export function activate(context: vscode.ExtensionContext) {
154-
@@ -126,12 +130,22 @@ export function activate(context: vscode
154+
// Render warning message regarding auto upgrade disabled
155+
@@ -158,15 +162,25 @@ export function activate(context: vscode
155156
// TODO: log activation of extension
156157
console.log('Activating Sagemaker Extension...');
157158

@@ -166,6 +167,9 @@ Index: sagemaker-code-editor/vscode/extensions/sagemaker-extension/src/extension
166167
initialize(sagemakerCookie);
167168
- updateStatusItemWithMetadata(context);
168169
});
170+
171+
// render warning message regarding auto upgrade disabled
172+
renderExtensionAutoUpgradeDisabledNotification();
169173
}
170174
+
171175
+/**
@@ -175,4 +179,3 @@ Index: sagemaker-code-editor/vscode/extensions/sagemaker-extension/src/extension
175179
+function getRedirectUrl(sagemakerCookie: SagemakerCookie): string {
176180
+ return smusRedirectUrl || sagemakerCookie.redirectURL;
177181
+}
178-
\ No newline at end of file

0 commit comments

Comments
 (0)