Fix Amazon Q usage quota check
What does this MR do and why?
Fixes the Amazon Q MR review feature and stops a Unavailable - no credits error message appearing when the Amazon Q service user is visible.
Amazon Q is licensed via a Duo with Amazon Q subscription, not via Duo Agent Platform usage credits, so its service account must not be subjected to a DAP usage quota check even though it is a composite identity agent.
References
- Customer RFH: https://gitlab.com/gitlab-com/request-for-help/-/work_items/4859
- Likely cause of the
"Unavailable - no credits"error !228141 (merged)
Note: The customer RFH refers to assigning Amazon Q as a reviewer. That does not work and is not intended to. The feature works via a /q review slash command in a comment in an MR, as documented. Amazon Q can also review code in merge requests automatically, if enabled in admin Amazon Q settings.
How to set up and validate locally
- Follow these instructions to set up a test (non-GDK) instance in an AWS sandbox: https://docs.gitlab.com/development/ai_features/amazon_q_integration/
- Note the instructions are out of date regarding the license. It says you can just use an Ultimate subscription. That's no longer correct, it needs to be a
GitLab Duo with Amazon Qsubscription - Not an add-on but a specific subscription type. I can share mine, or someone in#s_fulfillment_engineeringcan create one for you.
- Note the instructions are out of date regarding the license. It says you can just use an Ultimate subscription. That's no longer correct, it needs to be a
- Create an MR and enter
/q reviewas a comment
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.