Skip to content

chore(v4): Disable Amazon Q in Code Editor for SMAI + SMUS - #1289

Open
marfriaz wants to merge 1 commit into
aws:mainfrom
marfriaz:marfriaz/disable-q-code-editor-smai-smus
Open

chore(v4): Disable Amazon Q in Code Editor for SMAI + SMUS#1289
marfriaz wants to merge 1 commit into
aws:mainfrom
marfriaz:marfriaz/disable-q-code-editor-smai-smus

Conversation

@marfriaz

@marfriaz marfriaz commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Description

Disable (do not uninstall) the amazon-q-vscode VS Code extension in Code Editor via the VS Code extensions.allowed policy in code_editor_machine_settings.json. That settings file is copied into both the SMAI (sagemaker-code-editor-server-data) and SMUS (sagemaker-ui-code-editor-server-data) server-data dirs, so this single edit disables Q on both surfaces. The extension stays installed on disk and can be re-enabled by setting the value to true or removing the key.

This mirrors the intent of #1286 (which disabled the JupyterLab gen-AI Q extension); this is the Code Editor / VS Code equivalent. It supersedes #1255, which removed Q from the SMUS manifest only (uninstall, SMUS-only).

Type of Change

  • Image update - Bug fix
  • Image update - New feature
  • Image update - Breaking change
  • SMD image build tool update
  • Documentation update

Release Information

Does this change need to be included in patch version releases? By default, any pull requests will only be added to the next SMD image minor version release once they are merged in template folder. Only critical bug fix or security update should be applied to new patch versions of existed image minor versions.

  • Yes (Critical bug fix or security update)
  • No (New feature or non-critical change)
  • N/A (Not an image update)

If yes, please explain why:
N/A — template-only change; applies to the next minor image release and onward, no patch backport.

How Has This Been Tested?

  • Confirmed code_editor_machine_settings.json is valid JSON.
  • Confirmed via the v4.4 Dockerfile that this settings file is copied into both server-data dirs (sagemaker-code-editor-server-data and sagemaker-ui-code-editor-server-data), so the policy applies to both SMAI and SMUS.
  • Pending build-image smoke test: open Code Editor and confirm Amazon Q is installed but does not load (no Q UI), and that flipping the value to true re-enables it. Note: extensions.allowed requires the Code Editor fork to be VS Code ≥ 1.96 — please confirm the current sagemaker-code-editor version honors it.

Checklist:

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works

Test Screenshots (if applicable):

Related Issues

Additional Notes

Single-file, reversible change. Reverting = set "amazonwebservices.amazon-q-vscode": true or remove the extensions.allowed entry.

@marfriaz
marfriaz requested a review from a team as a code owner August 5, 2026 19:14
@TRNWWZ

TRNWWZ commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Please wait for 4.4 PR close and make the change to 4.5 template following https://build.amazon.com/7965453141

Description:
Disable (do not uninstall) the amazon-q-vscode VS Code extension in Code
Editor by passing --disable-extension amazonwebservices.amazon-q-vscode to
the sagemaker-code-editor launch in both start scripts:
- start-code-editor (SMAI)
- start-sagemaker-ui-code-editor (SMUS)

The flag is added to every launch invocation (persistent, recovery, and
default settings-folder paths) so Q is disabled on both surfaces. The
extension remains installed on disk.
@marfriaz
marfriaz force-pushed the marfriaz/disable-q-code-editor-smai-smus branch from 6d660fc to cdee537 Compare August 6, 2026 17:25
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.

3 participants