Skip to content

Conversation

@yueny2020
Copy link
Contributor

@yueny2020 yueny2020 commented Jul 15, 2025

Problem

After Remote - SSH to a sagemaker space via VS Code, the amazon Q plugin cannot be loaded for the following error.

2025-07-10 17:23:52.976 [info] ExtensionService#_doActivateExtension amazonwebservices.aws-toolkit-vscode, startup: false, activationEvent: 'onStartupFinished'
2025-07-10 17:23:57.478 [error] Activating extension amazonwebservices.amazon-q-vscode failed due to an error:
2025-07-10 17:23:57.478 [error] Error: command 'sagemaker.parseCookies' not found
    at mYe.n (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:1855:1328)
    at mYe.executeCommand (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:1855:1260)

Solution

After discussed with the Sagemaker team folks @sunp and @arkaprav, we decide that if cmd sagemaker.parseCookies not found, we just swallow the error and add a log for it.

Test

a local build is created for testing.
image


  • 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.
  • License: I confirm that my contribution is made under the terms of the Apache 2.0 license.

@yueny2020 yueny2020 requested a review from a team as a code owner July 15, 2025 00:54
@github-actions
Copy link

  • This pull request modifies code in src/* but no tests were added/updated.
    • Confirm whether tests should be added or ensure the PR description explains why tests are not required.
  • This pull request implements a feat or fix, so it must include a changelog entry (unless the fix is for an unreleased feature). Review the changelog guidelines.
    • Note: beta or "experiment" features that have active users should announce fixes in the changelog.
    • If this is not a feature or fix, use an appropriate type from the title guidelines. For example, telemetry-only changes should use the telemetry type.

Copy link
Contributor

@arkaprava08 arkaprava08 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Tested in remoteIDE environment

initializeCredentialsProviderManager()
}
} catch (e) {
getLogger().warn(`Failed to execute command "sagemaker.parseCookies": ${e}`)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We cannot assume all exceptions come from "sagemaker.parseCookies".
Please consider conditionally ignore the exception only for "sagemaker.parseCookies" issue. For other exceptions, we still need to throw the exception.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated the pr.

@edwardps
Copy link

Please add some UT and I can approve this PR.

@yueny2020
Copy link
Contributor Author

Please add some UT and I can approve this PR.

i will add ut in a follow up pr, and ask you to review. and for now i will merge the pr.

@yueny2020 yueny2020 merged commit 90f5459 into aws:master Jul 15, 2025
45 of 46 checks passed
@edwardps
Copy link

edwardps commented Jul 17, 2025

UT is in another PR.
408cab2
Approved.

yueny2020 added a commit that referenced this pull request Jul 17, 2025
## Problem
This pr: #7670 didn't been
covered by the unit test

## Solution
Add unit test for the activation initialize method.

---

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

5 participants