Commit 4f90bc6
authored
fix(smus): update space before creating new app if space setting is changed (aws#8173)
## Problem
Upgrading Space from Toolkit from ml.t3.medium to ml.t3.large does not
update the Space properties. It only creates a new app with the updated
instance type.
## Solution
Make sure to update Space before creating App when it is needed
## Testing
Verified that the it does not overwrite the the missing props. Diff link
https://diff.corp.amazon.com/compare/54b0ofvc
- before updating space
```
sagemaker-user@default:~$ aws sagemaker describe-space --domain-id d-rxs4hhmzrnho --space-name ce
{
"DomainId": "d-rxs4hhmzrnho",
"SpaceArn": "arn:aws:sagemaker:us-east-2:050752642559:space/d-rxs4hhmzrnho/ce",
"SpaceName": "ce",
"Status": "InService",
"LastModifiedTime": "2025-10-13T21:21:00.933000+00:00",
"CreationTime": "2025-09-08T20:58:08.976000+00:00",
"SpaceSettings": {
"CodeEditorAppSettings": {
"DefaultResourceSpec": {
"SageMakerImageArn": "arn:aws:sagemaker:us-east-2:137914896644:image/sagemaker-distribution-cpu",
"SageMakerImageVersionAlias": "2.8",
"InstanceType": "ml.t3.medium"
},
"AppLifecycleManagement": {
"IdleSettings": {
"IdleTimeoutInMinutes": 60
}
}
},
"AppType": "CodeEditor",
"SpaceStorageSettings": {
"EbsStorageSettings": {
"EbsVolumeSizeInGb": 16
}
},
"CustomFileSystems": [
{
"S3FileSystem": {
"S3Uri": "s3://amazon-sagemaker-050752642559-us-east-2-63f9df3f396b/dzd_bh80g0fbj1h7xl/c1wqm5rlzb150p/shared"
}
}
],
"RemoteAccess": "DISABLED"
},
"OwnershipSettings": {
"OwnerUserProfileName": "915b9590-a081-704d-8914-0e482edfb1ef"
},
"SpaceSharingSettings": {
"SharingType": "Private"
},
"Url": "https://y89msnjovs0fqgr.studio.us-east-2.sagemaker.aws/codeeditor/default"
}
```
After updating space:
```
sagemaker-user@default:~$ aws sagemaker describe-space --domain-id d-rxs4hhmzrnho --space-name ce
{
"DomainId": "d-rxs4hhmzrnho",
"SpaceArn": "arn:aws:sagemaker:us-east-2:050752642559:space/d-rxs4hhmzrnho/ce",
"SpaceName": "ce",
"Status": "InService",
"LastModifiedTime": "2025-10-13T21:28:28.870000+00:00",
"CreationTime": "2025-09-08T20:58:08.976000+00:00",
"SpaceSettings": {
"CodeEditorAppSettings": {
"DefaultResourceSpec": {
"SageMakerImageArn": "arn:aws:sagemaker:us-east-2:137914896644:image/sagemaker-distribution-cpu",
"SageMakerImageVersionAlias": "2.8",
"InstanceType": "ml.t3.large"
},
"AppLifecycleManagement": {
"IdleSettings": {
"IdleTimeoutInMinutes": 60
}
}
},
"AppType": "CodeEditor",
"SpaceStorageSettings": {
"EbsStorageSettings": {
"EbsVolumeSizeInGb": 16
}
},
"CustomFileSystems": [
{
"S3FileSystem": {
"S3Uri": "s3://amazon-sagemaker-050752642559-us-east-2-63f9df3f396b/dzd_bh80g0fbj1h7xl/c1wqm5rlzb150p/shared"
}
}
],
"RemoteAccess": "ENABLED"
},
"OwnershipSettings": {
"OwnerUserProfileName": "915b9590-a081-704d-8914-0e482edfb1ef"
},
"SpaceSharingSettings": {
"SharingType": "Private"
},
"Url": "https://y89msnjovs0fqgr.studio.us-east-2.sagemaker.aws/codeeditor/default"
}
```
---
- Treat all work as PUBLIC. Private `feature/x` branches will not be
squash-merged at release time.
- Your code changes must meet the guidelines in
[CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines).
- License: I confirm that my contribution is made under the terms of the
Apache 2.0 license.1 parent e476550 commit 4f90bc6
File tree
3 files changed
+37
-11
lines changed- packages
- core/src
- toolkit/.changes/next-release
3 files changed
+37
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
55 | 60 | | |
56 | 61 | | |
57 | 62 | | |
| |||
136 | 141 | | |
137 | 142 | | |
138 | 143 | | |
139 | | - | |
| 144 | + | |
140 | 145 | | |
141 | 146 | | |
142 | 147 | | |
143 | 148 | | |
144 | 149 | | |
145 | | - | |
| 150 | + | |
146 | 151 | | |
147 | 152 | | |
148 | 153 | | |
| |||
181 | 186 | | |
182 | 187 | | |
183 | 188 | | |
184 | | - | |
185 | | - | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
186 | 210 | | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
| 211 | + | |
| 212 | + | |
194 | 213 | | |
195 | 214 | | |
196 | 215 | | |
| |||
214 | 233 | | |
215 | 234 | | |
216 | 235 | | |
| 236 | + | |
217 | 237 | | |
218 | 238 | | |
219 | 239 | | |
| |||
223 | 243 | | |
224 | 244 | | |
225 | 245 | | |
| 246 | + | |
226 | 247 | | |
227 | 248 | | |
228 | 249 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
360 | 360 | | |
361 | 361 | | |
362 | 362 | | |
| 363 | + | |
363 | 364 | | |
364 | 365 | | |
365 | 366 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
0 commit comments