-
Notifications
You must be signed in to change notification settings - Fork 83
feat: Add Q CLI and local SMUS MCP #736
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I want this. thank you. hopefully it will get merged soon. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, can you add some more detail of how you tested/which cases you ran?
@@ -62,6 +62,12 @@ RUN apt-get update && apt-get upgrade -y && \ | |||
sudo ./aws/install && \ | |||
rm -rf aws awscliv2.zip && \ | |||
: && \ | |||
# Install Q CLI | |||
curl --proto '=https' --tlsv1.2 -sSf "https://desktop-release.q.us-east-1.amazonaws.com/latest/q-x86_64-linux.zip" -o "q.zip" && \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how do we plan to consume new updates to the Q CLI?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIUC, it's checking out newest release Q CLI.
QCLI doc: https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/command-line-installing-ssh-setup-autocomplete.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, when new images are built, we'll pull the latest Q CLI version at that time.
@@ -200,6 +200,30 @@ else | |||
echo readonly LOGNAME >> ~/.bashrc | |||
fi | |||
|
|||
# Setup Q CLI auth mode | |||
q_settings_file="$HOME/.aws/amazon_q/settings.json" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When will this get executed?
Lets say there is a tier change from free to pro or pro to tier, can you explain the flow that happens?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is executed when the space starts up. So if we start with free tier, this will add the AMAZON_Q_SIGV4 variable to the local .bashrc file. If we switch tiers to paid, then the next time we open the space it will not set that variable. If the tier switch happens while we're actively using the space, then we'd need to restart the space to update the environment.
…ectContext initialization
Description
This PR adds a Q CLI install to the v2 and v3 Dockerfiles similar to AWS CLI. It also enables free tier Q CLI login based on the SageMaker Unified Studio domain's Q Developer settings and sets some environment variables for Q CLI telemetry. We're also adding a SageMaker Unified Studio local MCP server for use with Q CLI.
Type of Change
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.
If yes, please explain why:
[Explain the criticality of this change and why it should be included in patch releases]
How Has This Been Tested?
We tested the features by building an image locally and attaching it to a SageMaker Unified Studio domain. We verified that Q CLI is accessible from the terminal, Q CLI loads in the added MCP server, and that users can chat with Q in their terminal. Additionally, we ran the tests when building the images. Most of the tests passed with a few failures from the GPU image tests, but those seem unrelated to our changes.
Checklist:
Test Screenshots (if applicable):
Related Issues
[Link any related issues here]
Additional Notes
[Any additional information that might be helpful for reviewers]