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

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

  1. 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 Q subscription - Not an add-on but a specific subscription type. I can share mine, or someone in #s_fulfillment_engineering can create one for you.
  2. Create an MR and enter /q review as 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.

Edited by Mark Lapierre

Merge request reports

Loading