Gating external triggers UI based on Duo add-on
What does this MR do and why?
As part of the work to move Duo to usage billing, we want to gate Duo Chat external triggers with the new DAP monetization strategy.
This change implements the first part of scenario 3 in described here: https://gitlab.com/gitlab-org/gitlab/-/issues/581209#note_2911560535. This change is behind a WIP feature flag.
With this change, the external trigger UI will always show when a user has Duo Core, Pro, or Enterprise add-ons. These include:
- Troubleshoot / Root Cause Analysis (Button)
- Code Explanation in GitLab UI (Button)
- Code Explanation in IDE (Command in Chat)
- Discussion Summary / View Summary (Button)
- Vulnerability explain (Button)
The second part of scenario 3 covers the execution of these triggers. The execution will be gated behind their current policies, but a different upsell message will be shown to customers if they do not have access to an external trigger because of their add-on tier. This work will be covered in a follow-up MR.
References
https://gitlab.com/gitlab-org/gitlab/-/work_items/581917 https://gitlab.com/gitlab-org/gitlab/-/work_items/581587
How to set up and validate locally
- Check out this branch
- Turn on the
dap_external_trigger_usage_billingflag - Turn off gitlab duo for your test group like in http://gdk.test:8080/groups/gitlab-duo/-/settings/gitlab_duo if using
gitlab-duo/test - Check that the external triggers are still there
-
View Summarybutton on an issue -
?icon when you highlight code in a repository -
Troubleshootbutton at the bottom of a failed pipeline
-
- Clicking these external triggers however does nothing.
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.