Skip to content

Conversation

aws-toolkit-automation
Copy link
Collaborator

Automatic merge failed

  • Resolve conflicts and push to this PR branch.
  • Do not squash-merge this PR. Use the "Create a merge commit" option to do a regular merge.

Command line hint

To perform the merge from the command line, you could do something like the following (where "origin" is the name of the remote in your local git repo):

git stash
git fetch --all
git checkout origin/feature/ui-e2e-tests
git merge origin/master
git commit
git push origin HEAD:refs/heads/autoMerge/feature/ui-e2e-tests

aws-toolkit-automation and others added 30 commits July 17, 2025 21:34
…rer view (#2165)

## Problem
The current SageMaker Unified Studio explorer implementation loads all
projects at startup and doesn't provide a way to select specific
projects or regions. This creates a poor user experience when there are
many projects or when users need to work with specific regions.

## Solution
- Restructured the explorer view with a hierarchical approach (region
and project nodes)
- Added a new SageMakerUnifiedStudioRegionNode to display region
information
- Modified SageMakerUnifiedStudioProjectNode to support project
selection
- Implemented a project selection UI with QuickPick
- Added proper resource cleanup with DataZoneClient.dispose()
- Updated tests to match the new structure
- Renamed tree view ID from 'aws.smus.projectsView' to
'aws.smus.rootView' for consistency

<img width="503" height="121" alt="Screenshot 2025-07-16 at 9 18 48 AM"
src="https://github.com/user-attachments/assets/be55651b-8c8b-40ac-830f-be554b3d7b2c"
/>

---

- 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.

Co-authored-by: guntamb <[email protected]>
Improve the SageMaker Unified Studio project switching experience with the following changes:
- Add pagination support to fetch all projects via new fetchAllProjects method
- Sort projects by last updated time for better user experience
- Filter out the current project from the selection list to avoid redundant selection
- Implement proper tree view refresh after project selection
- Add getProject method to retrieve the current project
- Rename setSelectedProject to setProject for consistency
- Update error messages to be more specific

This change makes project switching more intuitive by showing recently updated projects first and ensuring the UI properly refreshes after selection.
**Description**

Added a basic flow to handle auth in SMUS explorer. Trying to keep the
authentication and credentials separate for the SMUS explorer from
AWSToolkit explorer - This will allow users to continue using AWS
explorer with credentials of their choice while using SMUS with
credentials vended by DZ.

Making incremental changes to ensure everyone is able to factor in
changes in their PRs.

Plan for PRs for auth :

PR 1 : UI to go from unauthenticated view to login and then redirect to
explorer with authenticated view. Basically mock auth and set the value
for DomainId and Region.
PR 2: Setup CredentialProvider - Authentication actually invokes SSO
PKCE flow and store SSO tokens in `~/.aws/sso/cache`
PR 3: Use tokens to obtain DER credentials and make it available in
credential provider.
PR 4 : Add environment role credential fetching and refresh
PR 5 : Cache and refresh for both credentials

**NOTE: Not really sure if the telemetry code is actually working.
Unable to access kibana. Will check with toolkit team**

**Motivation**

Support auth flow in AWSToolkit for SMUS.

**Testing Done**

Updated unit tests. Ran the extension locally and did manual testing.

## Problem


## Solution


---

- 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.

Co-authored-by: Bhargava Varadharajan <[email protected]>
ctlai95 and others added 30 commits September 25, 2025 23:00
This merges the released changes for rc-20250925 into main.
MCM-135176338

---------

Co-authored-by: aws-toolkit-automation <>
## Problem
1. timestamp used in LSP path is cross-process, which requires a common
starting point, so should use epoch based time instead of
`peformance.now()` which starts at process starting point.

## Solution
1. replace all `performance.now` with `Date.now()`

---

- 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.
…le (#8099)

## Problem

We need to remove the notifcation pop-up for data sharing toggle in
Amazon Q settings


## Solution

- removed the toggle



https://github.com/user-attachments/assets/6a56de02-26a0-4d28-8190-88d238740e22



---

- 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.

Co-authored-by: Tai Lai <[email protected]>
## Problem
Typo in log statement for Sagemaker Update IAM Credential logic
currently prints expiration time

## Solution
- Fix typo to show availability of field in credentials
- `npm run compile && npm run test` succeeded

---

- 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.
## Problem

We removed `/agents` in this PR but the security.scan command was not
removed:
- #8026

<img width="1206" height="56" alt="Screenshot 2025-09-29 at 10 45 22 AM"
src="https://github.com/user-attachments/assets/70db455a-8efe-43f3-94a9-629d094c6d29"
/>



## Solution
Remove left over code


## Testing

Tested and command was removed

---

- 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.
This merges the released changes for rc-20250929 into main.
MCM-135435238

---------

Co-authored-by: aws-toolkit-automation <>
## Problem


## Solution


---

- 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.
## Problem

The Toolkit login webview throws an error when calling `setUiReady()`
because `loadMetadata` is undefined:

```
[error] webviewId="aws.toolkit.AmazonCommonAuth": Error: Webview error
-> Error: Webview backend command failed: "setUiReady()"
-> TypeError: Cannot read properties of undefined (reading 'start')
```

This occurs because `supportsLoadTelemetry` defaults to false in the
base `VueWebview` class, preventing the initialization of `loadMetadata`
during webview setup. Without `loadMetadata`, the webview cannot track
load timing or emit load telemetry.

## Solution

Added one line to enable load telemetry in `ToolkitLoginWebview`.

This flag was originally introduced in
[e7b7307](e7b7307)
to track Amazon Q webview load times and failures. We're now extending
this functionality to the Toolkit login webview for consistent telemetry
across both implementations.




### Before fix:
<img width="2108" height="1109" alt="before-toolkit-auth-webview-error"
src="https://github.com/user-attachments/assets/e53fb12b-6966-45ca-bee5-645e48a09cd4"
/>




Toolkit login webview error showing loadMetadata undefined. This occurs
because `supportsLoadTelemetry` defaults to false in the base
`VueWebview` class, preventing the initialization of `loadMetadata`
during webview setup. Without `loadMetadata`, the webview cannot track
load timing or emit load telemetry. The error happens
[here](https://github.com/aws/aws-toolkit-vscode/blob/da8fc990bc50689e043ff1d7cbde3615d2d7571e/packages/core/src/webviews/main.ts#L401)
when trying to calculate duration:

```typescript
const duration = globals.clock.Date.now() - this.loadMetadata!.start
```

### After fix:

Toolkit login webview successfully loading with duration metrics.

<img width="2107" height="1115"
alt="after-toolkit-auth-webview-with-load-duration"
src="https://github.com/user-attachments/assets/0f9d5bf4-dc5b-49de-a76e-776670ef683d"
/>

---

- 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.
…nced payload management (#8068)

## Problem
Few UI feedback: 
- Payload is not intuitive
- Open Handler should be a button
Inconsistent layer behavior

## UI before
<img width="921" height="653" alt="image"
src="https://github.com/user-attachments/assets/0d7c2f27-78f6-453d-91fb-02ac00f2b043"
/>


## Solution
This PR refactors the Lambda Remote Invoke UI to follow VSCode's native
design patterns, optimizes the codebase by removing unused components,
and enhances the payload management experience with integrated quickpick
functionality for remote test events.

<img width="857" height="899" alt="image"
src="https://github.com/user-attachments/assets/1e446174-8cea-43a6-8ef1-44c1c8008c23"
/>

Update global layer version to 2

### 🎨 UI/UX Improvements

- __Redesigned Remote Debugging section__ to follow VSCode Settings UI
pattern

  - Title with inline "Remove Debug Setup" button and timer info
- Checkbox aligned with description on same line for better visual
hierarchy

- __Redesigned Local Root Path section__ with VSCode Settings style

  - Added "Open Handler" button with disabled state and helpful tooltips
- Shortened button labels to "Browse" and "Download" for cleaner
interface
  - Enhanced descriptions with bold text to guide user actions

- __Completely redesigned Payload section__

  - Removed radio buttons for cleaner, unified interface
- Added button group: "Load sample event", "Load local file", "Load
remote event", "Save as remote event"
  - Improved textarea with monospace font and better sizing

### 🚀 New Features

- __VSCode quickpick integration for remote test events__

- `selectRemoteTestEvent()`: Shows native quickpick for loading saved
events
- `saveRemoteTestEvent()`: Quickpick with options to create new or
overwrite existing events
  - Input validation for event names
  - Confirmation dialogs for overwriting existing events

- __Enhanced error handling__

- Gracefully handles "lambda-testevent-schemas registry not found" error
  - Returns empty array instead of throwing when no test events exist
  - Helpful user messages when no events are found

- __Force flag support__ for overwriting existing test events

  - Added `force` parameter to `SamCliRemoteTestEventsParameters`
  - Automatically uses `--force` when user confirms overwrite

###


---

- 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.
## Problem
- Remote Debugging doesn't auto detect sam build dir as outFile before
- Deployed lambda node in appbuilder is very hidden.

## Solution
### 1. App Builder Resource Node Enhancements (`resourceNode.ts`)
- **Enhanced icon logic**: Deployed Lambda functions now show a
different icon (`aws-lambda-deployed-function`) to indicate deployment
status
- ** Support Remote Actions**: Deployed Lambda functions now directly
support "remote invoke" and "fetch log" functionality.

### 2. Remote Invoke TypeScript Support (`invokeLambda.ts`)
- **Added `outFile` property**: Stores the TypeScript output directory
for debugging
- **Auto-detection of TypeScript build directories**: Automatically
populates `outFile` for TypeScript/TSX files when SAM build directory
exists
  - Looks for `.aws-sam/build/{LogicalID}/` directory structure
  - Enables proper source mapping during debugging
- **Added `getOutFile()` method**: Public accessor for the output file
path
- **Improved file watching logic**: Disabled automatic file watching
when coming from App Builder to prevent unnecessary watchers

## Impact
- **Improved Developer Experience**: TypeScript developers will benefit
from automatic detection of build output directories, making remote
debugging setup easier
- **Better App Builder Integration**: The new
`generateLambdaNodeFromResource` function enables seamless conversion
between App Builder resources and Lambda nodes
- **Enhanced Visual Feedback**: Users can now distinguish between
deployed and non-deployed Lambda functions in the explorer

## Screenshots/Examples
<img width="938" height="756" alt="image"
src="https://github.com/user-attachments/assets/15963000-a270-40a1-b618-cfc1c8698485"
/>

When outFiles are not set in CDK/SAM projects with TS debug
For CDK
```
2025-09-24 17:36:58.567 [info] Starting debugger for arn:aws:lambda:us-west-2:account:function:TriageFn
2025-09-24 17:36:58.685 [info] Creating secure tunnel...
2025-09-24 17:36:58.886 [info] Configuring Lambda function for debugging...
2025-09-24 17:36:58.940 [info] CDK outFile auto-detected from template.json: /Users/user/proj/test/cdk-test/cdk.out/asset.728566f9cc2388f3c89a024fd2e887b4d82715454a0fc478f57d7d034364fdd5
2025-09-24 17:36:58.940 [info] outFile auto-detected: /Users/user/proj/test/cdk-test/cdk.out/asset.728566f9cc2388f3c89a024fd2e887b4d82715454a0fc478f57d7d034364fdd5
```
For SAM
```
2025-09-24 17:40:03.597 [info] Creating secure tunnel...
2025-09-24 17:40:03.776 [info] Configuring Lambda function for debugging...
2025-09-24 17:40:03.777 [info] SAM outFile auto-detected: /Users/user/proj/test/test-remote-debug/.aws-sam/build/TestFunction
2025-09-24 17:40:03.777 [info] outFile auto-detected: /Users/user/proj/test/test-remote-debug/.aws-sam/build/TestFunction
```



---

- 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.
This merges the released changes for rc-20251002 into main.
MCM-135637957


- 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.

---------

Co-authored-by: aws-toolkit-automation <>
ci: Add automated license scanning for third-party dependencies
## Problem

When users provide a YAML config file, we were not validating the
contents of it very strictly.


## Solution

Improve validation logic to be more strict so that invalid YAML files
are rejected client-side with a relevant error message.

---

- 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.

---------

Co-authored-by: David Hasani <[email protected]>
#8141)

## Problem
Both completion suggestions (ghost text) and edit suggestions (diff
view) could appear simultaneously due to a race condition. The
EditSuggestionState flag was set too late in the edit display flow,
allowing completion requests to check the state, see it as false, and
proceed even while an edit was being displayed.

## Solution
Fixed the race condition by setting the edit state immediately at the
start of displaySvgDecoration() before any async operations:

* Set EditSuggestionState to true at the beginning of the edit flow
* Add state cleanup when edit cannot be shown (completion already active
or invalid patch)
* Avoid calling clearDecorations() in displayEditSuggestion() to prevent
premature state reset
* Check EditSuggestionState before making completion requests in
recommendationService.ts.

This ensures only one suggestion type is displayed at a time with proper
mutual exclusion.

---

- 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.
…tion (#8124)

## Problem

## Solution


---

- 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.

---------

Co-authored-by: Boyu <[email protected]>
## Problem

We need to validate dependency IDs differently from plugin IDs

## Solution

Update validation logic


---

- 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.

---------

Co-authored-by: David Hasani <[email protected]>
## Problem

Absolute paths sometimes contain spaces, preventing Maven from running.


## Solution

Handle spaces by surrounding the full path with double quotes.

---

- 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.

---------

Co-authored-by: David Hasani <[email protected]>
… Studio compute (#8156)

Problem:
Incorrect SSH configuration causing connection failures

Solution:
- Updated SSH config by removing "User '%r'" to properly handle remote
connections to Studio compute

Co-authored-by: Arkaprava De <[email protected]>
## Description 

Added status checks for SageMaker space operations to prevent invalid
actions.

Picture: When opening remote connection:

<img width="507" height="302" alt="Screenshot 2025-10-08 at 4 20 19 PM"
src="https://github.com/user-attachments/assets/905cb51e-daf0-4db5-91ca-fbbc53de28d5"
/>


## fix done 

1. The stopSpace function now validates space status before attempting
to stop, showing appropriate warning messages for spaces already in
Stopped/Stopping states or currently Starting.

2. Also added status refresh before open remote connect

## Testing Done

code debug



---

- 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.
## Problem

`.github` directory should not be uploaded to QCT backend, since it
contains unrelated files, which can show up in the diff, and can cause
the parsing of the patch file to fail.

## Solution

Exclude it when zipping.

---

- 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.

Co-authored-by: David Hasani <[email protected]>
## Problem
This merges the released changes for rc-20251010 into main.
MCM-136118981

## Solution


---

- 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.

---------

Co-authored-by: aws-toolkit-automation <>
## Problem
-All space reconnection redirect links were hardcoded to route users to
the JupyterLab details page, due to a bug in the Studio web application.


## Solution
- With the bug now fixed in SageMaker Studio, we can support redirecting
to the Code Editor details page via refreshUrl.
- For backward compatibility, the default remains set to JupyterLab.
Once the fix is verified and rolled out across all regions, we can
remove the default behavior and instead explicitly check for the appType
(e.g., JupyterLab) before setting the redirect.

---

- 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.

---------

Co-authored-by: Newton Der <[email protected]>
Co-authored-by: Newton Der <[email protected]>
Co-authored-by: Laxman Reddy <[email protected]>
## Problem


## Solution


---

- 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.
…8163)

## Problem
When pressing Enter to trigger inline suggestions, ghost text fails to
appear in the editor despite the language server returning valid
suggestions.

Root Cause: VS Code triggers two provideInlineCompletionItems calls
simultaneously when Enter is pressed:

1. Automatic trigger (t=0ms) - sends LSP request, receives valid
suggestions after ~380ms
2. Invoke trigger (t=2ms) - sends duplicate LSP request, receives empty
response after ~6ms (language server skips concurrent requests)
3. VS Code uses the most recent provider response, which is the empty
result from the second call, causing the first call's valid suggestions
to be ignored.

Evidence from logs:

```
[info] Sending inline completion request (474)
[info] Sending inline completion request (476)
[info] Received response (476): { sessionId: '', items: [] }  ← Used by VS Code
[info] Received response (474): { items: [{ itemId: '...', insertText: '...' }] }  ← Ignored
```

## Solution
I am not able to have a working fix to prevent either automatic or
invoke trigger, which is controlled in toolkit. So I implement request
deduplication on Q side by tracking pending requests in the inline
completion provider:

* Shared Request Pattern: When a request is in progress, subsequent
concurrent calls reuse the same pending promise instead of creating new
LSP requests

* Independent Cancellation: Each call checks its own CancellationToken
after the shared request completes, allowing independent cancellation
semantics

Key Changes:

* Added pendingRequest field to track in-flight requests
* Wrapped provideInlineCompletionItems to check for and reuse pending
requests
* Added per-call cancellation check when reusing requests
* Ensured pendingRequest is cleared after completion for fresh
subsequent requests

Tests:

Tested on the same scenarios, both concurrent calls now return the same
valid suggestions, ghost text appears reliably when pressing Enter

Logs after fix:

```
[info] _provideInlineCompletionItems called (Automatic)
[info] _provideInlineCompletionItems called (Invoke)
[info] Reusing pending inline completion request to avoid race condition
[info] Received response: { sessionId: '...', itemCount: 2, items: [...] }
```

---

- 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.
…ay (#8174)

## Problem

If suggestion is at least 10 lines away, we don't want to show it to the
user.

## Solution

discard edits suggestion when the cursor position is at least 10 lines
away

---

- 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.
…hanged (#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.
There may not always be a change to the license file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.